Baud Rate for serial communication to terminal
DF
Posts: 10
What's the fastest baud rate for serial communication with the terminal using spin?
I have been able to use 250000, but nothing higher.
Also is 250000 any different than using 230400? I was under the assumption that the baud rates had to be multiples of 1, 2, 4 or 8 of 115200
I have been able to use 250000, but nothing higher.
Also is 250000 any different than using 230400? I was under the assumption that the baud rates had to be multiples of 1, 2, 4 or 8 of 115200
Comments
The answer to your question depends on what the Spn code is doing.· If the spin code sits in a tight loop calling ser.rx and then storing it in a buffer then the answer is somewhere between 57,600 and 115,200.· Of course, this assumes there are gaps between each block of data so you can actually do something with the received data.· If you process the data in the receive loop the rate will be lower.
I have looked at this in the past, and it is possible to get much higher throughput by doing a block read.· The serial objects in the OBEX don't have this feature, but I could provide you with a routine to do if you want.· A block read will allow burst transfers of greater than 1 mbps.
Dave
·
Most standard serial devices I have worked with use a baud rate that is a power of 2 multiple of 300 (ie 300, 600,1200, .... 38400) then continue from 115200. There may be devices that use baud rates between 38400 and 115200 but I have never encountered one.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!
Some of my objects:
MCP3X0X ADC Driver - Programmable Schmitt inputs, frequency reading, and more!
Simple Propeller-based Database - Making life easier and more readable for all your EEPROM storage needs.
String Manipulation Library - Don't allow strings to be the bane of the Propeller, bend them to your will!
Fast Inter-Propeller Comm - Fast communication between two propellers (1.37MB/s @100MHz)!
Dave, my spin code will be reading information from another cog and outputting it. The income data sets are from an A/D and are around 600 bytes long. I'm looking to output each data set as quickly as possible so I can collect another. Ideally I'm looking to collect around 30 data sets a second. Will a block write transfer data as quickly as a block read? The routine you mentioned sounds very helpful if it will.
Dave