MSM80C154S/83C154S/85C154HVS

XTAL 1

 

 

12

 

S3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

C/ T2

RCLK=0

 

 

 

TCLK=0

 

 

 

CP/ RL2=0

 

 

 

Q0------Q7

Q0------Q7

TL2

C

TH2

C

8 BIT

 

8 BIT

 

T2

[PORT 1.0]

T2EX

[PORT 1.1]

TR2

DETECTOR

DETECTOR

EXEN2

 

 

RCAP2L

 

 

 

 

 

RCAP2H

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

DETECTOR

 

 

 

 

 

TF2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TIMER 2

 

 

 

 

 

 

 

 

 

DETECTOR

 

EXF2

 

 

 

 

INTERRUPT

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Figure 4-20 Timer/counter 2 16-bit auto reload mode circuit

4.5.3.3.2 16-bit capture mode

The 16-bit capture mode is set by making the connections shown in Figure 4-21 with the following timer 2 control register (T2CON) bit conditions, viz. RCLK=0, TCLK=0, and CP/ RL2=1.

Timer/counter 2 operates in the following way when 16-bit capture mode is set. When the signal applied to the T2EX pin (bit 1 of port 1) is changed from level “1” to “0”, the TL2 and TH2 count contents of timer/counter 2 are stored into capture registers RCAP2L and RCAP2H. The T2EX signal change is set in external timer flag 2 (EXF2) at this time, and a carry signal from timer/counter 2 is set in internal timer flag 2 (TF2). The EXF2 and TF2 serve as the timer interrupt 2 request signals with an interrupt call being made to address 43 (2BH) if timer interrupt 2 has been enabled. If an interrupt routine is commenced, the EXF2 and TF2 flags must be reset to “0” by software.

94

Page 101
Image 101
Sonic Alert msm85c154hvs, msm83c154s, msm80154s user manual 3.3.2 16-bit capture mode, RCLK=0 TCLK=0, TL2 TH2 BIT