I D/l an example simple c code which included this:
#define FOSC 8000000UL //system clock speed #define BAUD 9600UL #define MYUBRR FOSC/16/(BAUD-1)
Ok, so my clock is 16M so I make that change. I look at the datasheet for my chip under the heading "Examples of UBRR Settings for Commonly Used Oscillator Frequencies" is a chart. I suppose lower error is better, right? So if the chart shows 0.0% error at 250k, 0.5M and 1M then my supposition is that I should change BAUD to one of those figures. Is that right?
But mostly I don't get the MYUBRR calculation. Doing the math (with 8M) results in 52 and change. The chart says it should be 51. Why not just look up what the chart says and write that in?
Why would I NOT want to be operating at as fast a speed as possible?
Sorry for dumb Qs as always :) thanks.