Rainbow Electronics T89C51CC01 User Manual
Page 77
![background image](/manuals/280558/77/background.png)
77
T89C51CC01
Rev. D – 17-Dec-01
Figure 35. General structure of a bit period
example of bit timing determination for CAN baudrate of 500kbit/s:
Fosc = 12 MHz in X1 mode => FCAN = 6MHz
Verify that the CANbaud rate you want is an integer division of FCAN clock.
FCAN/CANbaudrate = 6MHz/500kHz = 12
The time quanta TQ must be comprised between 8 and 25: TQ = 12 and BRP = 0
Define the various timing parameters: Tbit = Tsyns + Tprs + Tphs1 + Tphs2 =
12TQ
Tsyns = 1TQ and Tsjw =1TQ => SJW = 0
If we chose a sample point at 66.6% => Tphs2 = 4TQ => PHS2 = 3
Tbit = 12 = 4 + 1 + Tphs1 + Tprs, let us choose Tprs = 3 Tphs1 = 4
PHS1 = 3
and PRS = 2
BRP = 0 so CANBT1 = 00h
SJW = 0 and PRS = 2 so CANBT2 = 04h
PHS2 = 3 and PHS1 = 3 so CANBT3 = 36h
Bit Rate Prescaler
oscillator
1/ Fcan
Tscl
system clock
one nominal bit
Tsyns (*)
Tprs
Sample Point
(*) Synchronization Segment: SYNS
Tbit
Tsyns = 1xTscl (fixed)
data
Tbit
Tsyn s
Tprs
Tphs1
Tphs2
+
+
+
=
Tbit calculation:
Transmission Point
Tphs1 + Tsjw (3)
Tphs2 - Tsjw (4)
(1) Phase error £ 0
(2) Phase error Š 0
(3) Phase error > 0
(4) Phase error < 0
Tphs2 (2)
Tphs1 (1)