Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ Electronics ➜ Microprocessors ➜ Multiple data over Serial port

Multiple data over Serial port

Postings by administrators only.

Refresh page


Posted by Catalina   (2 posts)  Bio
Date Fri 27 Jan 2012 04:01 AM (UTC)
Message
We had a hardware failure and one of the controllers went kaboom. This controller receive serial data from a piece of software installed in one of the PC's. A co-worker years ago made a controller based on PIC and studied all the data coming from the software. Basically in a PC you type 54 different variables, hit send and the software spits out 225 variables in a format like this:

###### ; ##### ; ### ; ## ; #### ; ##### ; ##### ; #### ; ..... ; # ; ##### ; FIN

##### are 224 random numbers based on the inputs on the PC. These are only numbers (no letters or symbols) and up to 5 numbers per variable (from 0 to 99999)
FIN is to indicate the end of the data transmission.

After reading and copying your Buffering input code from http://mushclient.com/serial, I have the info in the arduino, I only change case '\n' for case ';' and MAX_INPUT to 224.

Now my real problem... If the variables are named:

Variable_1
Variable_2
Variable_3
...
Variable_224

Would you PLEASE explain me how I assign the values to those variables?

Thanks a lot,

Cataina
Top

Posted by Nick Gammon   Australia  (23,070 posts)  Bio   Forum Administrator
Date Reply #1 on Fri 27 Jan 2012 04:44 AM (UTC)
Message
You'll forgive me if I don't answer this, I hope, as you have cross-posted a very very similar question to the Arduino forum.

http://arduino.cc/forum/index.php/topic,89055.0.html

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Catalina   (2 posts)  Bio
Date Reply #2 on Fri 27 Jan 2012 06:26 AM (UTC)
Message
Hi Nick,

I'm sorry if I double post. I'm a little desperate and just looking for any possible help.. I looked at the code that zoomkat posted and search on internet and found you, that is why I re-posted here.

Is just embarrassing for me asking many simple questions if I do not really understand many things, that is why I'm looking for similar codes and change what I need.

Again, I apologize and delete this post if you want it.

I'll keep looking for more examples around.

Catalina
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


12,407 views.

Postings by administrators only.

Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.