This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How can I create a user defined protocol for communication over UART?

I need to use STX, ETX, Length, Data, Checksum , CMD(Command) bytes in my protocol structure. Data and Length will be variable fields where length refers to length of data. I am new to Embedded c and just need an idea, where i can start as I am confused that, what kind of data(structure of data) user should sent over uart to initiate communication with micro controller. The protocol structure I am trying to develop is as follows:

STX|CMD|LENGTH|DATA|CHECKSUM|ETX.

Thanks in advance.