Pages: [1]   Go Down
Author Topic: Arduino UNO 300 Baud  (Read 1871 times)
0 Members and 1 Guest are viewing this topic.
Kansas City, MO
Offline Offline
Jr. Member
**
Karma: 0
Posts: 71
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've seen all the issues with 300 baud comms in the past ans also saw that the hardware serial core for the most recent build had the fixes updated to use 300 baud now. Problem is I'm using 1.0.1 and 300 baud still will not work correctly. It works at 1200 and above, but as soon as I change to Serial.begin(300); it spits out garbage to the monitor.

Any ideas why this might still not be working?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 537
Posts: 27067
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Can you confirm the 300 baud outputis bad with a different serial program?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Kansas City, MO
Offline Offline
Jr. Member
**
Karma: 0
Posts: 71
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, I'm using hyper terminal . It works on higher bauds and did verify that hyper term works with different device at 300 baud.
To clarify, I'm using the USB serial and not tx/rx through a max232 type setup.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 537
Posts: 27067
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Dunno, sounds like a library issue or something software related.
Can you grab serial files from 1.0 and replace them in the 1.0.1 core files/library or something along those lines?

Or wait a bit, see if a more knowledgeable S/W person joins the conversation.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

SE USA
Offline Offline
Faraday Member
**
Karma: 41
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

for the record I was just messing with arcane baud speeds, both 300 and 600, nothing worked properly till hitting the 1200 mark

for me it was a sanity check, I cant imagine why anyone would actually want to use those speeds, even the 1986 computer I was using with a 1984 rom nails 9600 (actually 115,200 if you get into twiddling bits in machine language)
« Last Edit: September 27, 2012, 08:27:25 pm by Osgeld » Logged


Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 537
Posts: 27067
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

So no real need then.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Canada
Offline Offline
Jr. Member
**
Karma: 1
Posts: 81
Frequently Befuddled
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The Arduino (actually the ATMega chip) sets the baud rate using a combination of clock speed and clock divider settings. There are some baud rates where it just can't hit the right bps with enough accuracy, i.e. instead of 300 baud it might be going at 310 or 312 or something like that. There is a margin of error that devices on either end can cope with, but the slower baud rates might be too far outside that margin to be workable.

The datasheet for the ATMega328 gives examples for baud rates (with the % of error)  but it only goes down to 2400 baud in its examples.

There's also something about interrupts, the serial module uses interrupts to handle things behind-the-scenes (this is why you can't use Serial inside an interupt handler) and at the low baud rates the uC can spend so much time in interrupts that the rest of the sketch gets starved out for cycles.

Cheers!
Logged

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Wasn't there a change to how the baudrate clock was setup by the arduino at one time, something about using the 'double' speed divider option. Could that effect the divider size available such that it can no longer support 300 baud option?

Lefty
Logged

Kansas City, MO
Offline Offline
Jr. Member
**
Karma: 0
Posts: 71
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

CrossRoads: I'll try the 1.0 software and see what happens. I've seen other posts in the forum where the change to the hardwareserial.cpp fixed the issue at 300 for a few people but not sure why not in my case.

Osgeld: I agree with you with the fact that the need should not exist for 300 baud anymore. Unfortunately, I work for the US government and we still have some weather data recorders in our legacy systems that are 300 baud limited.

My actual usage in this case is nothing more than a serial programmer. I have about 5 minutes worth of serial entries I have to make in order to program one of these devices. I work at a repair facility so we do a number of them all the time. Trying to cut down on time and loss of my sanity by pushing a button and having the Arduino send the commands for me. I'm not aware of another serial program (HyperTerm, Pro-Comm, RealTerm, etc) where you can build a "script" of entries with delays inbetween for such action. If you know of one please advise and I'll give it a try and leave Arduino up to some tasks that might be a little more current.
Logged

Kansas City, MO
Offline Offline
Jr. Member
**
Karma: 0
Posts: 71
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK, I got it working through the RX/TX on digital 0/1 and a MAX232 setup. Must be a restriction or other issue in the atmega usb IC code.

Thanks for the assistance!
Logged

SE USA
Offline Offline
Faraday Member
**
Karma: 41
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I'm not aware of another serial program (HyperTerm, Pro-Comm, RealTerm, etc) where you can build a "script" of entries with delays inbetween for such action

using custom software, but then you have to lug a pc around
Logged


Pages: [1]   Go Up
Jump to: