serial communication max speed.
DXC
Posts: 33
Hello all,
I have a question according to the rs232 communication.
What is the maximum speed or RS232? Can the prop communicate with a speed of 921600?
I saw the code where the clock speed is devided by the com speed, for example 19200 baud.
by deviding the clock with 19200 the speed will not be accurate. When going to higher speeds like 921600 the timing will be more wrong?
Is it true what I said above?
gr,
I have a question according to the rs232 communication.
What is the maximum speed or RS232? Can the prop communicate with a speed of 921600?
I saw the code where the clock speed is devided by the com speed, for example 19200 baud.
by deviding the clock with 19200 the speed will not be accurate. When going to higher speeds like 921600 the timing will be more wrong?
Is it true what I said above?
gr,
Comments
At 921600 baud the bit time is 1.085uSec so the receiver has to detect the leading edge of the start bit and then sample each of the following bits in the middle of the bit time. That means the first bit needs to be sampled at 1.63uSec, and each following bit sampled 1.085uSec after the previous bit. The timing is tight but the hardware can do this relatively easily (the prop can do it in software), the problem is with the signal. It is very susceptible to noise and distortion.
The distance will be less then an inch for shure.
The speed I can chose from are:
19200 - 921600
I could not find the max speed when I use fullduplex for example.
I looked in the spin software but could not find what the max baudrate is which I could use.
gr,
I've been trying to get my prop to talk to a another device at 921,600 baud for a while now, the best I have been able to do using FDX is 250,000, I have less than 3 inches of wire between the prop and the device(going to run shorter wire today to test).
Take at look at this thread here:
http://forums.parallax.com/showthread.php?t=126471
As Charleyshf confirmed, FDX will not run at 921600. It might sort of run at half that speed, but each byte received is subject to sample timing alignment, and will output a lot of false data. At one quarter things get much better, but still not bullet proof. Slower than that will be OK.
Read the thread suggested by Charley.
Cheers,
Peter (pjv)
Finding it hard to believe that the prop can make a good timing with 900Kbaud.
So 230400baud is the maximum speed with FDS?
What is the best way to connect the rx and dx.
33 Ohm resistor is serie?
gr,
It is written with PropBasic.
Bean
As Bean indicated there are other routines that will run at higher speeds. I run some as high as 10Mega bits per second although for that I do not use the standard ASCII protocol.
However, you referenced Full Duplex, and I took that to mean the Spin program from the OBEX, and that will not run at 921,600.
I have now altered (but not tested) the Full Duplex assembly portion of the code, and I believe it will now just barely run 921,600, and perhaps not totally reliably.
See my post about this.
Cheers,
Peter (pjv)
I am presuming you are talking about the TTL equivalent using these short distances - that means, no real drivers/receivers, but just going prop pins to some other processor or device.
Here, the issue becomes the micros performance which of course includes the software on both ends. Assuming the other end is capable of 1Mb(used instead of the actual multiple) then there are various ways for the prop to achieve this accurately by software.
The FDX software will not run at this speed because as has been said elsewhere, the software does a pin-pong between transmit and receive. There are better objects available which do higher speeds, but most will likely use 2 cogs, 1 for transmit and 1 for receive at speeds around 1Mb and above.
As for accuracy of the signal, the prop is not using a multiple divide by 2 to calculate the frequency, so it can be accurate with the right software. For instance, FDX will happily run at 100,000 baud - most UARTs cannot do this speed because it is not a multiple of 300 time 2^n.
I hope this helps you to rephrase your question if this does not answer it.
Postedit: fixed the following details - thanks kuroneko to pointing me to link.
BTW Beau has published an ultra high speed prop to prop comms that runs at 14.5Mb. http://forums.parallax.com/showthread.php?p=691952#post691952
Hanno
BTW I see you are still being shaken over there! (Hanno is in New Zealand and they are still receiving large earthquakes)
Well I communicate to another chip next to the prop.
Layout is allmost finished.
(the wires are less then 1 inch long.)
The signal levels are 0V and 3.3V.
I have tested it with an ft232 at speed I mentioned which worked.
FDX is what I use now, if I knew about a faster one which would use more cogs that would be better, but I'll stick with FDX.
I used rs232 communication because the chip which communicates with the prop has rs232 and no other communication.
Next to rs232 I use I2C to communicate with other chips.
thnx for all the explanation!
gr,
SerPlug, Morpheus/Mem+, PropCade and some unreleased boards of mine
The above was with 1Mbps capable USB<->RS232 adapters plugged directly into the DB9F on the above boards.
Yes- still rocking and rolling over here. It's been 6 weeks since the 7.1 quake- and we've had something like 1000 aftershocks that you can feel- magnitude 3+. We've also had roughly one 5.x magnitude per week to keep us on our toes. People are getting very tired of them- but we did manage to throw a pretty cool party- 140,000 people attended a free concert- not bad for a city with population 400,000!
Hanno