Table 3.12 on page 50 is Incorrect

Problem:
Table 3.12 is incorrect as it refers to a 20MHz oscillator and the actual baud rate does not match the COM port baud rate dspite having a 0% error.
In addition the paragraph below the table needs clarification.

Solution:
The table and following paragraph should read:

COM portActual PICRegister 
Baud RateBaud RateErrorOscillator0x19High/Low
120012000.00%14.7456MHz0xBFLow (0)
240024000.00%14.7456MHz0x5FLow (0)
480048000.00%14.7456MHz0x2FLow (0)
960096000.00%14.7456MHz0x17Low (0)
19200192000.00%14.7456MHz0x0BLow (0)
38400384000.00%14.7456MHz0x05Low (0)
57600576000.00%14.7456MHz0x03Low (0)
1152001152000.00%14.7456MHz0x01Low (0)


All of these figures for the 14.7456MHz crystal assume that bit 2 of register 0x18 (in register bank 1) is set to a logic zero. If bit 2 of register 0x18 (in register bank 1) is set to a logic one then the baud rate will be four times higher. For example, if bit 2 of register 0x18 is set to a logic one and a value of 0xBF is placed into register 0x19 (both in register bank 1) then the baud rate will be 4800 and not 1200. To get the same speed take the contents of register 0x19 in the low speed position, add one to it, then multply it by four and finally subtract one. This gives the same speed but in the high baud rate (with bit 2 of register 0x18 set to a one). For example, to get 38400bps you can either set bit 2 of register 0x18 to a zero and register 0x19 to 0x05. Alternatively you can set set bit 2 of register 0x18 to a one and register 0x19 to (5+1=6, 6X4=24, 24-1=23 23 decimal is) 0x17.

Further information:
I hope that this page helps you with your projects but if you have found any other problems or if you have any further questions please contact me though the email address of gares-AT-g4aym-DOT-org-DOT-uk.

Sorry about the email address but it seems to be the only way to avoid the spammers



Click here to return to the PIC Basics Main Page

Click here for the Index of Errors and Ommissions

Click here for the Index of Errors and Ommissions