Micro Controller Serial Data identification or classification
Posted
by
Posiedon
on Stack Overflow
See other posts from Stack Overflow
or by Posiedon
Published on 2012-10-13T15:26:25Z
Indexed on
2012/10/13
15:37 UTC
Read the original article
Hit count: 162
I have a x51 family micro controller (P89V51RD2). I'm going to send some data from computer using serial port. The data i'll be sending are
Character 'S'
Character 'R'
and a 2 digit integer
.
Upon receiving the data, I will be calling separate functions. I used if(chr=='S') and elseif(chr=='R')for character data.
The main problem lies with identifying the 2 digit number sent.
Any other data other than the above three mentioned will be discarded.
Any ideas for identifying two digit integer ??
© Stack Overflow or respective owner