[u]Info[/u]: I'm sampling data from two inputs (12 ksps/ch, 8bits). I want to send data from both channels to the PC using the UART interface. I can successfully send data from on channel, but I need help choosing the best method for sending data from both channels.
[u]Problem[/u]: How do I "package" the data properly for a fast and reliable transmission? When dealing with one channel I simply send one byte of data per sample. If I loose a sample...not the end of the world. I'm considering the following options for sending data for two channels, but I am quite sure these are not the proper ways.
Option 1: Send data serially (i.e. - ch1,ch2,ch1,ch2,...). However, if I loose one sample the whole transmission is corrupted.
Option 2: Send one byte of data that contains channel information before sending the actual channel data. This doesn't seem efficient in keeping data rate low.
Option 3: Build some kind of package in a buffer. Send the package and have the PC check if it is correct using CRC or something. I don't know how to do this one, but it makes sense.