ASCII data out errors @ 19200

Hey there,

I am trying to get my arduino dumping some analog data over the serial connection. However, I am having problems with the data rate. I usually set the rate to 19200 bps, and it works fine - clean output. For some reason the new sketch I have written just gives me random ASCII junk over the serial monitor. It's periodic, but useless....almost like the format is wrong. Reducing the data rate to 9600 solves this particular issue. I'd like to have the higher data rate if possible though.

Is there a reason that it can't send data at 19200 bps? Is it limited by the complexity of the sketch perhaps (too much additional processing)? I think there must be a really simple answer to this but I'm not sure what it is.



Try it with the asciiTable communication example sketch. If it works with that at 19200 then its probably something with your sketch. If your sketch uses or disables interrupts then have a close look to see if you are spending too much time in that code.

To reply to myself,

I don't know exactly what it was causing it, but it was something in a servo driver. With the code to run the servo in, it works at 9600 but not 19200; commented out, it works nicely at 19200. Maybe there's something in Servo.h that would be causing that? I dunno.

Anyway, servo was only there as a visual indicator of changing data (=changing angle) which I've implemented through Processing now. So no problems.

Thanks anyway!