timing question
cplatt
Posts: 55
Hello everyone.
My BS2e is polling a Memsic 2125 accelerometer and transmitting the data via an XBee to my laptop. How do I figure out how often can I poll the Memsic before I need to buffer the data stream??? Would the bottle neck be at polling the accelerometer, transmitting at the XBee, or receiving at the laptop? (The raw data is 2000-4000 range, tx and rx at 9600 baud) Thank you!!!
My BS2e is polling a Memsic 2125 accelerometer and transmitting the data via an XBee to my laptop. How do I figure out how often can I poll the Memsic before I need to buffer the data stream??? Would the bottle neck be at polling the accelerometer, transmitting at the XBee, or receiving at the laptop? (The raw data is 2000-4000 range, tx and rx at 9600 baud) Thank you!!!
Comments
You're laptop has a comparatively huge buffer but your receive app has to do something with the incoming stream.
The XBee has buffers too...
As it's single-threaded, it reads the accel., then SEROUTs its data, it can't do both simultaneously, so there's no bottleneck there.
for i=i+1
debug dec i
next
it takes about 2ms to execute per cycle (2000 cycles per minute) So basically what I am asking is what would the pause be here:
PULSIN x,y,data 'data from accelerometer
pause x
SEROUT x,y,data 'data to be transmitted
pause x
to receive a data stream at the hyperterminal of the laptop without missing any numbers?
thank you!!
PULSIN waits for a transition; HIGH to LOW or LOW to HIGH. SEROUT sends serial data. Placing a pause between commands does not make much sense. For example, execution waits until the PULSIN command sees a state change, we PAUSE a bit, send some data, and PAUSE a bit.
Please read about the PULSIN and SEROUT commands in the help file.
Are you having a problem? Are you missing numbers?