So I have an xbee (API mode, series 2) communicating with either a naked 328p on a breadboad (8 MHz external oscilator) or an adafruit pro trinket (328p based, 12 MHz external oscilator). Though never both at the same time.
Note the xbee has a 16 MHz internal oscilator of some description - and doesn't really the "standard" baud rates.
I picked a baud rate of 200,000 as a non-standard rate that's a perfect multiple of both clock speeds. Should be able to work with either flawlessly. And yet.... it doesn't.
- Test 1: The 8 MHz breadboard works perfectly at 200K, with 8 bits and 1 stop bit. Fine as intended.
- Test 2: The 12 MHz trinket... just doesn't at 200K, 8N1.
- Test 3: 12 MHz at 200K, 8N1 - no joy.
- Test 4: 12 MHz, 100K 8N2 works.
And now I'm just confused. I appear to have missed something basic somewhere. What speed should I have used? Why?