0
votes

I have this 3-axis dongle serial accelerometer connected using RS-232 cable. I am putting the baud rate as 9600 and im getting 80 XXXX-YYYY-ZZZZ readout per second. I am trying to justify why does it shows 80 readings in a second, and here is my calculation,

2 Bytes of data x (1 Start bit + 1 Stop bit + 8 bits) = 20 bits 20 bits x 3 axis x 80 readouts = 4800 bits

While im getting 4800 bits instead of 9600 bits, so i am wondering did i miss out anything in justifying the 80 readouts?

Thanks guys :)

1
You are working under the assumption that the rate of data it is providing is limited by the serial connection. This may or may not be true. It may simply generate samples at a fixed rate of 80 Hz. Adding information about the specific device you're using may be helpful. - Jonathon Reinhart

1 Answers

0
votes

You indicate that you're getting 80 XXXX-YYYY-ZZZZ readouts per second. I'm assuming this is ASCII, so each digit is one byte.

So each "message" is len('XXXX-YYYY-ZZZZ')*8 = 112 bits long. Add a start and stop bit and you have 114. Multiply that times 80 messages per second, and you're transmitting 9120 bits per second, which is much close to the theoretical limit.