Divide-by-13 option – Maxim Integrated High-Speed Microcontroller Users Guide: Network Microcontroller Supplement User Manual
Page 122

High-Speed Microcontroller User’s
Guide: Network Microcontroller
Supplement
122
Figure 11-8. Timer/Counter 2 with Optional Capture
Divide-by-13 Option
Another change to the timers associated with the DS80C400 is the inclusion of a divide-by-13 option for timer 1 and timer 2. The option
is independently enabled for each timer by setting the D13T1 (for timer 1) or D13T2 (for timer 2) bits. When enabled by setting the
appropriate bits, the timer input from the T1 or T2 external pins is replaced by a time base equal to the system clock frequency divid-
ed by 13. Figure 11-9 illustrates the operation of these bits.
The setting of the divide-by-13 bits affects all operations of timer 1 and all operations of timer 2 except baud-rate generator mode. The
baud-rate generator mode of timer 2 is not affected by the setting of the D13T2 bit.
The divide-by-13 settings of Timer 1 and Timer 2 allow the microprocessor to simultaneously generate standard serial baud rates and
standard CAN baud rates within generally acceptable error tolerances. In an original divide-by-12 timer an 11.0592MHz crystal fre-
quency (or multiple thereof) was usually needed to generate standard serial baud rates. The divide-by-13 setting offers the additional
option of selecting the microprocessor clock frequency by 12/13. Thus, using a 12MHz crystal and the divide-by-13 setting, the effec-
tive baud rate becomes (12/13) x 12 = 11.0769MHz. This differs from the ideal baud rate frequency by only 0.16%, an insignificant dif-
EXEN2 = T2CON.3
EXF2 =
T2CON.6
CAPTURE
TIMER 2
INTERRUPT
TL2
0
7
TH2
8
15
TF2 =
T2CON.7
0
7 8
15
RCAP2L
RCAP2H
T2EX = P1.1
CLK
T2 = P1.0
TR2 = T2CON.2
1
0
CD1:0 4X/
2X
CLKOUT
00 1 /1
00 0 /2
10 X /4
11
X
/1024
0
OSC
1
CD1:0
CLKOUT
13 /1024
other /3072
T2M = CKCON.5
C/
T2
= T2CON.1
NOTE: CPRL2 (T2CON.0) = 1.
0
1
D13T1 = T2MOD.4
(D13T2 = T2MOD.3)
SYSCLK / 13
INPUT
T1 = P3.5
(T2 = P1.0)
T1 = P3.5
(T2 = P1.0)
To C/T selector
To C/T selector
As shown in High-Speed Microcontroller User's Guide
As implemented in DS80C400 with divide-by-13 option
Figure 11-9. Operation of Divide-by-13 Bits
Maxim Integrated