![Dallas DS87C550 User Manual Supplement Download Page 79](http://html1.mh-extra.com/html/dallas/ds87c550/ds87c550_user-manual-supplement_3298646079.webp)
DS87C550 High-Speed Microcontroller User’s Guide Supplement
79 of 93
TIMER/COUNTER 2, CLOCK OUTPUT MODE:
Figure 11-6.
OSC
T2 = P1.4
TL2
RLOADL
TR2 =
T2CON.2
TH2
RLOADH
DIVIDE
BY 2
T2OE =
T2MOD.1
C/T2 =
T2CON.1
= 0
F_OUT =
(Ocsillator Frequency) /
(4 * (65536 - RLOADH, RLOADL))
0
7
8
15
0
7
8
15
DIVIDE
BY 2
EXF2 =
T2CON.6
T2EX = P1.5
EXEN2 = T2CON.3
TIMER 2
INTERRUPT
T2P1 T2P0 Divisor
0 0 /1
0 1 /2
1 0 /4
1 1 /8
TIMER 2 CAPTURE MODE
The capture mode of Timer 2 in the DS87C550 is slightly different from that function implemented on
other High-Speed Microcontrollers. In the DS87C550, there are four 16-bit registers (eight 8-bit registers
concatenated) that can capture values. Timer 2’s output is the value that is captured when appropriate. It
should be noted that Timer 2 can be configured in a number of different ways (i.e., counter, timer, auto-
reload, etc.) and still be used for the capture mode. Regardless of the meaning of Timer 2’s value, it is this
timer’s output that is captured under the pre-established conditions.
The secondary function of four I/O pins (P1.0 – P1.3) is used to trigger one of the individual capture
functions. If an appropriate edge occurs on the particular pin (as determined by of bits CTCON.7), then
Timer 2’s output at that time (all 16-bits) will be written into the associated capture register
(CPTH0:CPTL0, CPTH1:CPTL1, CPTH2:CPTH2, CPTH3; CPTL3). By setting or clearing the bits on
the CTCON register appropriately, the user can determine whether the rising or falling edge of the pin
causes a capture.
It should be noted that the pins used to cause a Timer 2 capture are shared with the external interrupt pins.
When used as an external interrupt, each pin can be programmed to be active high or low using the same
bits (CTCON7:0). This functionality is illustrated in Figure 11-7 below.