Hi,
As an example for this question, I am using an oscillator with a frequency of 8 MHz and I desire a baud of 9600 to communicate with my laptop's RealTerm using 8-bit asynchronous on a PIC18F4550.
The equation to calculate the SPBRG term for my specific config settings to set the baud rate is:
\(SPBRG = \frac{F_{osc}}{64*Baud} - 1 = \frac{8000000}{64*9600} - 1 = 12.02 \approx 12\)
\(Baud_{actual} = \frac{F_{osc}}{64*(SPBRG + 1)} = \frac{8000000}{64*(12 + 1)} = 9615.38 \approx 9615\)
\(Baud_{error} = \frac{Baud - Baud_{actual}}{Baud}*100% = \frac{9600 - 9615}{9600}*100% = 0.16%\)
My question is, what does this error actually refer to while my PIC is communicating with my laptop? The characters show up correctly every time with no error so is it only over a really long operation time that one character might show up incorrectly when the error% adds up?
On the other hand, if my actual baud rate is sending 15 more symbols every second, are those all lost on the host end?
Thanks
As an example for this question, I am using an oscillator with a frequency of 8 MHz and I desire a baud of 9600 to communicate with my laptop's RealTerm using 8-bit asynchronous on a PIC18F4550.
The equation to calculate the SPBRG term for my specific config settings to set the baud rate is:
\(SPBRG = \frac{F_{osc}}{64*Baud} - 1 = \frac{8000000}{64*9600} - 1 = 12.02 \approx 12\)
\(Baud_{actual} = \frac{F_{osc}}{64*(SPBRG + 1)} = \frac{8000000}{64*(12 + 1)} = 9615.38 \approx 9615\)
\(Baud_{error} = \frac{Baud - Baud_{actual}}{Baud}*100% = \frac{9600 - 9615}{9600}*100% = 0.16%\)
My question is, what does this error actually refer to while my PIC is communicating with my laptop? The characters show up correctly every time with no error so is it only over a really long operation time that one character might show up incorrectly when the error% adds up?
On the other hand, if my actual baud rate is sending 15 more symbols every second, are those all lost on the host end?
Thanks