I need to send consecutive batches of data over USB (to a PC or another uC) and I was wondering if there is a known and efficient way to do so. Right now I use a make-shift software flow control with an ACK and STOP bits but it feels clunky and inefficient. I am programming in Python on the PC and C on the uC.
I'm plotting data over USB onto a PC software so I don't want to miss data in the process while keeping up a good speed.
1. How do you send a bunch of data over serial? In other words, what is a good, lightweight way to communicate between two nodes, say a PC and a uC?
2. I was googling and came across the terms 'serialization' and 'framing' of packets which seem related but I'm not sure. I was wondering if someone could explain those.
3. Does it make sense to have the highest possible baud rate at the uC end of the loop to ensure high speed data transfer, especially over a UART-USB bridge? In other words, what is the best/optimum way to keep the data transfer speed to a good value.
4. What actually decides the working throughput of a communication channel, say USB? I don't have much background in communication systems, any links to a relevant resource(s) would be great.
5. I also came across Google's Protocol Buffers, which seem to be built for this kind of thing (for transmission of data in a network, they quote). I found an embedded port for it in NanoPB which looks promising. Is it relevant at all?
I am trying to figure out all the nuances of setting up a reliable communication link. I'be previously gotten by with half-baked adhoc protocols and stuff but I was looking for something better this time.
Any help would be much appreciated.
Thanks!
I'm plotting data over USB onto a PC software so I don't want to miss data in the process while keeping up a good speed.
1. How do you send a bunch of data over serial? In other words, what is a good, lightweight way to communicate between two nodes, say a PC and a uC?
2. I was googling and came across the terms 'serialization' and 'framing' of packets which seem related but I'm not sure. I was wondering if someone could explain those.
3. Does it make sense to have the highest possible baud rate at the uC end of the loop to ensure high speed data transfer, especially over a UART-USB bridge? In other words, what is the best/optimum way to keep the data transfer speed to a good value.
4. What actually decides the working throughput of a communication channel, say USB? I don't have much background in communication systems, any links to a relevant resource(s) would be great.
5. I also came across Google's Protocol Buffers, which seem to be built for this kind of thing (for transmission of data in a network, they quote). I found an embedded port for it in NanoPB which looks promising. Is it relevant at all?
I am trying to figure out all the nuances of setting up a reliable communication link. I'be previously gotten by with half-baked adhoc protocols and stuff but I was looking for something better this time.
Any help would be much appreciated.
Thanks!
Last edited: