Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 11 months ago.
High speed serial Communication with PC
I am trying to send data gathered from MPU9250 motion sensors to my PC terminal via USB cable. I need to send data as much fast as possible.. at least 1000 data sets per sec. A data set is just 4 floating point numbers with comma separated.
How Can I send it..
Is there any other way using wifi or bluetooth or etthernet to achieve such a rate.
I am new to this mbed platform, please help me.
Thank You
Question relating to:
1 Answer
8 years, 11 months ago.
This is achievable with the serial port over USB. Crank it up to 460800 or faster.
Thanks Bill,
Are you talking about baudrate, I am afraid whether my processing application will handle the rate..
posted by 25 Jan 2016If your application is on a windows PC then a baud rate of 460800 maybe used. On a Linux machine much higher baud rates can be used. If the application is on another uC 460800 and higher can be used.
posted by 25 Jan 2016The application on the mbed or on the PC?
The mbed can handle it but you do have to structure the code well. Use something like MODSERIAL to buffer the serial port. Have the incoming data handled by an interrupt and put into a buffer with minimal processing and then the main loop of the code reads from the buffer, does any processing needed and sends it out on the serial.
If you are talking about the PC side then fire whoever wrote the PC application. If a 100MHz 32 bit CPU with no floating point unit can handle it then a 2GHz multicore CPU with all sorts of fancy hardware acceleration should be able to.
Sending as text a floating point will be about 8 characters plus a comma between values rate * number of values * size of data * symbols per byte = 1000 * 4 * 9 * 10 = 360kBaud needed.
So you do need to run the port at 460800 minimum. Most mbeds will happily handle twice that.
posted by 25 Jan 2016