J
Jan Panteltje
I have seen several statements here about how accurate an oscillator
needs to be for serial communication in a PIC.
Lets make it simple:
Normally we have:
1 start, 8 data, 2 stop bits (or one stop bit).
Assuming for a moment the pic samples the bit somewhere in the middle,
although datasheet mentions 2 samples, hopefully these are just 2 clocks
apart in the middle of the bit position.
Now say we have 10 bits.
So to get the wrong bit in the last bit (the most critical one), you need to
be 5% off!
For 11 bits 4.9 %.
If you add a little for the '2 x test' maybe 4%.
Depends a bit how the UART works, if it samples until start bit found, add an
other clock period.
3.5 % should do it.
This assumes the 'other end' is exact on freq.
If the other end is 1% off, that leaves 2.5%.
PC is mostly 100% on baudrate (+ xtal tolerance).
Any comments?
needs to be for serial communication in a PIC.
Lets make it simple:
Normally we have:
1 start, 8 data, 2 stop bits (or one stop bit).
Assuming for a moment the pic samples the bit somewhere in the middle,
although datasheet mentions 2 samples, hopefully these are just 2 clocks
apart in the middle of the bit position.
Now say we have 10 bits.
So to get the wrong bit in the last bit (the most critical one), you need to
be 5% off!
For 11 bits 4.9 %.
If you add a little for the '2 x test' maybe 4%.
Depends a bit how the UART works, if it samples until start bit found, add an
other clock period.
3.5 % should do it.
This assumes the 'other end' is exact on freq.
If the other end is 1% off, that leaves 2.5%.
PC is mostly 100% on baudrate (+ xtal tolerance).
Any comments?