[Menu]>[Guide to use the PIC]>[873 Hardware]>[SFR]


SFR explanation for PIC16F873(17)
( Signaling speed by SPBRG register )
On this page, the setting of signaling speed of the USART is described. At the manual of PIC16F873, Baud is used as the signaling speed. It should make a bps. Strictly, "baud" and "bps" are different. In the following table, "bps" is used.
In case of PIC, the signaling speed changes with the clock frequency of PIC. The setting of a signaling speed is done with the SPBRG register. In case of the asynchronous mode, the speed error with the communication device outside occurs. The selection of the clock where few errors occur is needed.
The calculation formula with SPBRG register value and signaling speed refer to "The signaling speed designating".



Asynchronous communication speed in low-speed ( BRGH = 0 )
Signaling
speed
outside
K-bps
Fosc=4MHzFosc=10MHzFosc=20MHz
Signaling
speed
(K-bps)
Error
(%)
SPBRG
(Decimal)
Signaling
speed
(K-bps)
Error
(%)
SPBRG
(Decimal)
Signaling
speed
(K-bps)
Error
(%)
SPBRG
(Decimal)
0.30.3000207------
1.21.2020.17511.2020.171291.2211.75255
2.42.4040.17252.4040.17642.4040.17129
9.68.9296.9969.7661.73159.7661.7331
19.220.8338.51219.5311.72719.5311.7215
28.831.2508.51131.2508.51431.2508.519
33.6---31.2506.99434.7223.348
57.662.5008.51052.0839.58262.5008.514
HIGH0.244-2550.610-2551.221-255
LOW62.500-0158.250-0312.500-0




Asynchronous communication speed in high-speed ( BRGH = 1 )
Signaling
speed
outside
K-bps
Fosc=4MHzFosc=10MHzFosc=20MHz
Signaling
speed
(K-bps)
Error
(%)
SPBRG
(Decimal)
Signaling
speed
(K-bps)
Error
(%)
SPBRG
(Decimal)
Signaling
speed
(K-bps)
Error
(%)
SPBRG
(Decimal)
0.3---------
1.21.2020.17207------
2.42.4040.171032.4411.71255---
9.69.6150.16259.6150.16649.6150.16129
19.219.2310.161219.5311.723119.2310.1664
28.827.7983.55828.4091.362129.0700.9442
33.635.7146.29632.8952.101833.7840.5536
57.662.5008.51356.8181.361059.5243.3420
HIGH0.977-2552.441-2554.883-255
LOW250.000-0625.000-01250.000-0




Synchronous communication speed
    In case of synchronous mode, the error with signaling speed doesn't occur. To decide the value of SPBRG register, I calculated the value same as asynchronous mode.
Signaling
speed
outside
K-bps
Fosc=4MHzFosc=10MHzFosc=20MHz
Signaling
speed
(K-bps)
Error
(%)
SPBRG
(Decimal)
Signaling
speed
(K-bps)
Error
(%)
SPBRG
(Decimal)
Signaling
speed
(K-bps)
Error
(%)
SPBRG
(Decimal)
0.3---------
1.2---------
2.4---------
9.69.6150.16103------
19.219.2310.165119.2310.16129---
28.828.5710.793429.0700.948528.9020.35172
33.633.3330.792933.7840.557333.5570.13148
57.658.8242.121658.1400.944257.4710.2286




Difference of "Baud" and "bps"
    "Baud" is the unit which shows the signal which changes into 1 second.
    "bps" is the unit which shows the number of the bits to transfer into 1 second.
    When send the data which make the positive voltage of the circuit as "1", make the negative voltage as "0", "baud" and "bps" become the same value.

    It often uses a telephone line to connect the Internet. A telephone line is made to conduct voice and is designed to let through the frequency from 300 Hz to 3400 Hz. 3400Hz is the signal which changes into 1 second 3400 times. So, it is possible to let through maximum of 3400-bps data. Actually, it isn't possible to let through 3400 bps.
    The recent modem can do high-speed communication like 28.8Kbps, 33.6Kbps, 56Kbps and so on. These modems are using a phase modulation and more than one bit can be transferred in the signal change in the once. In case of the modem of 28.8Kbps, the 9-bit signal can be transferred in the signal change in the once. So, it becomes 28800/9 = 3200 baud when showing in baud. The signal to have let out from the personal computer at 28800 bps becomes a 3200-baud signal with the modem and it reaches the other party modem which connects through the telephone line. The other party modem extracts a 28800-bps signal from the 3200-baud signal and transfers it to the personal computer.