-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Baud Rate #30
Comments
The baudrate of 250000 is working ok. The link with 230400 is using hyperterminal. This selects 230400 and the next is 460800. Best regards, Erik van der Zalm ----- Original Message ----- I tried to increase the baud rate from 115200 to 250000. It did now work. According to this forum entry http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1274739897 the max baudrate is 230400. There is a boud-rate calculator here: Reply to this email directly or view it on GitHub: |
You are right, it's not a limit, but its a proven working maximum, although the jitter is pretty high for this frequency according to the baud-rate calculator. I do understand that the strange numbers occur by the outdated baud rates, and have used special frequency quartzes myself. I will try to change the baud rate again tonight. Have you really tested with an arduino Mega2560, or with the ramps board? According to the schematics, the USB transfer is handled by a atmega8 controller with a dedicated 16mhz quartz. The relevant firmware of this usb<>ttl-rxtx seems to be here: |
I just tested 230400 seems to work on linux in replicatorg, if the machine/.xml is edited of course. Could it be that this is dependent on the operating system and the drivers capabilities? |
Under windows it works. If I don't use 250000 but 115200 I get communication errors. The retransmissions influence the printing quality. Best regards, Erik van der Zalm ----- Original Message ----- I just tested 230400 seems to work on linux in replicatorg, if the machine/.xml is edited of course. Could it be that this is dependent on the operating system and the drivers capabilities? Reply to this email directly or view it on GitHub: |
Just tried 250000 with pronterface on a DFRobot 1280, working ok, no problem. Arch Linux on Thinkpad X41. |
Hi, Evdz and me have done some further investigations what could be the trouble. The unavailability of the 250k baud rate can come from two sources: First the hardware on the host, aka the USB chipset. However, for this we have not found a single proof or indication. I found two platform independent C++ Libraries for serial access (with a QT focus): QExtSerial and QSerialDevice. The latter seems more advanced and has a lot of defines for Baudrates. Both however, at least in the windows build, seem to rely on the same system interface (that QT made private in recent versions, and hence there is a also a fork who works with recent QT, don't have the name ready). The story is, at least QSerialPort did not work with 250kb in OSX. But, EvdZ was able to change some inner workings very close to the system layer, and add support. |
my system is 32bit btw... replicatorG does NOT work: When I set the replicatorG-machine to 115200, it tries to connect but hangs at |
The max baudrate on the UART of the ATMega2560 is 1MBit with the 16Mhz crystal. (This actually puts the divider at 0, running the UART as fast as possible). See the datasheet. The problem however, is the USB serial chips&interference&drivers. I've seen serial ports (both USB and normal PC port) regally drop bits at 115200. Then there is the driver/software issue. Not all software likes the none-standard baudrates above 230400, some drivers and some UART chips will choke on it. Using none-standard baudrates under linux requires a different api (TCSETS2), which is why quite a few tools might not like using those baudrates. In my experience, going beyond 115200 is not worth it unless you control every piece of hardware&software. And going beyond 38400 already introduces problems on some serial ports. |
The major problem is that 115200 is not a clean baud rate if you use a 16mhz quartz, it is faked by a close approximation frequency (IIRC 5-7% change), that creates bit-errors. You would need a baud-rate quartz for that to have the exact speed. |
Normally, yes, that 5-7% is a big problem. But, the USB<->Serial on the ArduinoMega2560 is also an AVR (the ATMega8A), using the same type of UART, with the same offset. It's almost impossible to find info about TCSETS2, I'll copy&paste some code tomorrow. You'll need to include termios2.h if I remember right. |
http://pastebin.com/Uv9JiKMj (I need to support both linux 2.4.17 and 2.6.27 with the same library) |
250000 even works from repsnapper on a FreeBSD machine via remote serial (socat) to the linux box where the DFrduino is plugged in. |
I tried to increase the baud rate from 115200 to 250000. It did now work. According to this forum entry http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1274739897 the max baudrate is 230400.
There is a boud-rate calculator here:
http://www.wormfood.net/avrbaudcalc.php?postbitrate=200000&clock_speed_table=on&postclock=16
for 200000 also a a non-jittering communication should be possible.
The text was updated successfully, but these errors were encountered: