Newbie Problems
Hi Guys,
I am a newbie to C so please excuse me if my question seems stupid. I have just written a serial communications protocol for my current employer, I have now been asked to implement it in the C programming language which has me really nervous as I have never really done much in C.They are aware of this and probably don't expect much, but i'd like to think i can do it.
Basically, what i'm looking for is some ideas on how to go about it. This is roughly what i need to do:
I will be writing the C code for a microcontroller which will be accepting the serial messages sent from a pc. The serial messages will be a 2byte instruction code which requires the microcontroller to simply respond with a similar 2 byte response depending on the instruction code.
An example of the sent message to the microcontroller,
*STX character 02h*2byte instruction code*ETX character 03h
Last edited by madbunny; 05-11-2008 at 06:59 AM.
|