Doc. # 1-0003211
Date Updated 07-27-2005 Date Created 07-27-2000
Document Type Knowledge Base Related OS
Related Product PCL-841
How to setup PCL-841 CAN bus interface baud rate?
Solution:
To calculate BT0 and BT1 from a fixed baud rate, user need to define the value of Tseg1 and Tseg2 by himself, or use the standard value. The formula is: Baud rate = 1/(1*TSCL+Tseg1+Tseg2) where TSCL = 2TCLK*(lower 6 bits of BT0 + 1) Tseg1 = TSCL*(lower 4 bits of BT1 +1) Tseg2 = TSCL*(bit 4 to bit 6 of BT1 +1) TCLK = 1/16000000 For example, to get 10Kbps baud rate, we have: 1/Baud rate = TSCL*(1+Tseg1/TSCL+Tseg2/TSCL) (1+Tseg1/TSCL+Tseg2/TSCL) = 16000000/10000/(2*(lower 6 bits of BT0 + 1)) (1+Tseg1/TSCL+Tseg2/TSCL) = 800/(lower 6 bits of BT0 + 1) The possible value of BT0 is from 0 to 63, but the value of (1+Tseg1/TSCL+Tseg2/TSCL) must be an integer. So Let BT0 = 1Fh = 31 (1+Tseg1/TSCL+Tseg2/TSCL) = 25 Possible value of Tseg1/TSCL is 1 to 16 and possible value of Tseg2/TSCL is 1 to 8. Let Tseg1/TSCL = 16 and Tseg2/TSCL = 8 to meet the value 25, then BT1 = 7Fh = 127