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!
Fixed baud rate?
Re: Fixed baud rate?
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?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.
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?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.
Don
Re: Fixed baud rate?
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.
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.