Title: Microprocessors
1Microprocessors
2TMOD
- Set C/T 1 to configure the timer for
counting. - MOV TMOD, 00000110B makes timer0 an 8-bit
counter.
3External Connections for Counting
Connect to pin 14 to count with timer 0
Connect to pin 15 to count with timer 1
4(No Transcript)
5(No Transcript)
6(No Transcript)
7(No Transcript)
8(No Transcript)
9(No Transcript)
10(No Transcript)
11(No Transcript)
12(No Transcript)
13(No Transcript)
14(No Transcript)
15TL1 continues to advance with every pulse that
comes in on T1 until TL1 transitions from FFH to
00H. At that time TF1 1. We continue the
analysis with TF1 1.
16(No Transcript)
17(No Transcript)
18(No Transcript)
19(No Transcript)
20(No Transcript)
21(No Transcript)
22 23Timer Operation C/T 0, Gate 0
If Gate bit is zero, TRx is always anded with 1.
24Counter OperationGate 1 C/T 1
If Gate bit is 1, TRx is anded with INTx. The TR
switch is closed only if both TRx and INTx are
high.
25Counter OperationGate 1, C/T 1
1
IF TRx 1 the counter advances when and only
when INTx 1