Hi All,
I'm working on a project where I need a serial protocol. The idea is that the uC has a small fifo buffer, and the PC has to keep the buffer filled. The uC program takes one value out of the fifo buffer at a time, about 100 times per second.
I have made a small protocol that works like this:
1) PC sends a message: start
2) uC sends a message: request first datablock
3) PC sends first datablock
4) uC checks if the buffer is empty enough to request the next datablock
5) PC sends the next datablock.
6) PC sends the stop command
7) uC stops.
The uC also sends data back:
a) if there's more than one block of data to send, send the data, and wait until there's again more than one block to send.
While this protocol works, I wonder if there's a standard protocol for this. I figure if I follow a standard, somebody has thought a lot more than me about corner cases. For instance when serial packets are damaged. Also, it could be that other people have already made PC program that use the protocol. Then My uC would automatically be compatible.
Does anybody knows about a serial protocol that does the above?
Kind regards,
Cedric