8051 Architectural Specification and Functional Description
time is IllS and the access times required from stable address and from read (RD) or write (WR) command are approximately 600ns and 250ns respectively.
2.1.2.3 TIMER/EVENT COUNTERS
The 8051 contains two
Additionally, counter 0 can be programmed to a mode that divides it into one
When counter 0 is in Mode 3, counter I can be programmed to any of the three aforementioned modes, although it cannot set an interrupt request flag or generate an interrupt. This mode is useful because counter I's over- flow can be used to pulse the serial port's
The counters are started and stopped under software control. Each counter sets its interrupt request flag when it overflows from all ones to aU zeros (or
COUNTER/TIMER RUN
GATE
INTO --~=-~l:'~>-"t"--r-\--J====j~:J
CRYSTAL
OSCILLATOR
$ | OVERFLOW | |
SOURCE | REQUEST) | |
| FLAG 0 |
•8048 TIMER/COUNTER
•
•
CRYSTAL
°ii~O,.R__~~~~~__~
|
| OVERFLOW |
EXTSOEURRNCALE |
| |
|
| REQUEST) |
|
| FLAG 1 |
• | 8048 TIMER/COUNTER |
|
• | PULSE TO | |
• | ||
|
| SERIAL PORT |
Figure 2.4.A. Timer/Event Counter
|
| Modes 0, 1, and 2 |
|
| CRYSTAL | CRYSTAL |
|
| OSCilLATOR | OSCILLATOR |
|
EXTERNAL ___$ |
| OVERFLOW | |
| (INTERRUPT | ||
| REQUEST) | ||
| SOURCE |
| FLAG 1 |
|
| OVERFLOW | |
|
|
| |
|
| ||
|
|
| REQUEST) |
• | • | FLAG 0 | |
| CRYSTAL |
|
|
| OSCilLATOR |
|
|
| $ |
|
|
EX;5~:~~'" |
|
| |
• | 8048 TIMER/COUNTER |
| PULSE TO |
• |
| ||
• | SERIAL PORT |
Figure 2.4.8. Timer/Event Counter Mode 3
INTERRUPT
REQUEST
COUNTER 0
MODE 0:
WITH PRESCAlER
>
MODE 2:
MODE 3:
XTAl1
Figure 2.S.A. Timer/Counter 0 Control and Status Flag Circuitry
6