Timing Error at 115200 baud

Hi guys,

I am currently trying to interface my Arduino Mega with a Logomatic v2 from SparkFun. The Logomatic is basically a data logging module that writes any data received on its serial line to uSD card.

Everything is wired correctly and I can successfully log data at all baud rates up to and including 57600. However, when I attempt to log at 115200, the module logs garbage.

As a test, I connected my XBee (which is configured for 115200 baud) directly to the logomatic. With this configuration, I was able to successfully log data. This test therefore rules out the logomatic, the level converters and a noisy signal as the cause.

My next test was to gradually increment the baud rate of the Mega and attempt to write a sentence. I was attempting to write:

"This is a test - 123456789 " followed by the current baud rate

But the best output I logged was:

“Ôhés ió á ôeót - 1²3´5¶7¸9 ±2¸1·”

Any ideas on the matter would be greatly appreciated.

Dan

This test therefore rules out the logomatic

Not necessarily: this looks like it might be a baud rate error, and it's possible that the logomatic and XBee both err slightly in one direction, while the Mega errs in the other. Unless you pick a system clock rate that's an exact multiple of the baud rate, there's always some small error in the final baud rate. Sometimes, that can be significant. You should check the datasheet to see what the typical error is for an ATMega at 16MHz.

Does the XBee talk reliably to the Mega at 115200?

Ran