Fixed baud rate?

Problems uploading, serial connections, BUBs, P4, FTDI cables, etc
Post Reply
Stokes
Posts: 1
Joined: Thu Apr 21, 2011 1:39 pm

Fixed baud rate?

Post by Stokes » Thu Apr 21, 2011 2:04 pm

I have a piece of hardware that needs a 9600bps serial connection; I'm trying to get a BBB to receive data from it and send a modified form of that data to my computer. Problem is, I've not been able to get the BBB to communicate with my computer at any speed other than 19.2Kbps, regardless of what rate I set when starting Serial in the sketch.

Maybe this is an issue with the FTDI drivers, but I can hook the FTDI cable to the serial I/O pins on an Uno and it will work at different speeds. I'm also not sure how a speed dictated by the cable (if that is indeed the case) could change the speed specified in code.

My second guess as to the source of the problem would be bootloader, but that also seems unlikely. The BareBonesBoards I have are several years old. Two have the stock 168 that they came with; one has a 328 I got from SparkFun a while back. The problem occurs on all three; presumably, the 328 version has a different bootloader.

My third guess would be that the problem lies in the libraries used by the IDE. I've seen library bugs in the past, but the same sketch compiled and uploaded from the same IDE works on 'official' Arduino boards; if the library were at fault, I'd think that the problem would be universal.

Has anyone seen anything like this?

Thanks!

floresta
Posts: 93
Joined: Mon Jul 28, 2008 6:52 pm
Location: Western New York, USA
Contact:

Re: Fixed baud rate?

Post by floresta » Fri Apr 22, 2011 7:55 am

I have a piece of hardware that needs a 9600bps serial connection; I'm trying to get a BBB to receive data from it and send a modified form of that data to my computer.
You are talking about two different serial connections here, one at 9600 baud to your hardware and a second at the same or a different speed to your computer. Which one is giving you the problem?
Problem is, I've not been able to get the BBB to communicate with my computer at any speed other than 19.2Kbps, regardless of what rate I set when starting Serial in the sketch.
When you change the speed in your sketch you are only changing one end of the system. Did you change the speed at the other end, in your computer?

Don

paul
Site Admin
Posts: 735
Joined: Mon May 12, 2008 4:19 pm

Re: Fixed baud rate?

Post by paul » Sat May 07, 2011 1:52 pm

Stokes,

I'm puzzled too. You can easily verify serial speeds by opening the Arduino monitor after using something like

Serial.begin(38400);

in a sketch. You will only be able to read the (correct) data at 38400 baud.

Maybe include some more information if you haven't figured it out.

Paul

PS - the UNO and the BBB despite some fiddling with the power, and USB upload systems, are essentially the same at core, an Atmega 328.
Anything that will run on one, will run on the other, by just using the Duemilanove (2nd) bootload setting.

Post Reply