Hi, I'm not really familiar with the data transfer calculations, and when I tried looking online I'm getting confused between bits and baud.
I'm receiving readings from the CurieIMU at 100 Hz, each stored in 16 bits. I need to calculate what is the time taken to transfer the data through, assuming no start/stop bit. My baud rate is 460,800 and I am sending 3 values through using the print() function, each value taking up 32 bits. Can anyone show me how to do the math?
The baud rate tells you how many bits per second you can send.
In your case, it sounds like you want to send 3 values of 32 bits at a rate of 100Hz, correct?
First, you will need a start and stop bit. These bits are standard if you're using the Serial.print() function. They indicate to the receiver when a new byte begins and ends.
So, that means you need a start and stop bit for each byte you send. 32 bits is 4 bytes. That means each 32 bit value will require 40 bits to send.
Now, you want to send 3 values at a rate of 100Hz, so you will need to send 340100 bits per second.
This means you need a MINIMUM baud rate of 12,000 bits per second. The closest standard baud rate to that is probably 19200.
Similarly, if your baud rate is 460800, you can send 460800 bits per second, which corresponds to about 2.17 microseconds per bit.
Again, you need to send 3 values that each require 40 bits. Therefore, if you send those values immediately after one another, you'll require 3402.17 = 260.4 microseconds.