English
Language : 

W921E840A Datasheet, PDF (28/58 Pages) Winbond – 4-BIT MICROCONTROLLER
W921E840A/W921C840
6.11 Timer/Counter
There are four timers (TM0, TM1, TM2 and TM3) in this chip, and all can be initialized at any time by
writing data into the TM0, TM1, TM2 and TM3 set register.
6.11.1 TM0
TM0 can perform the following functions:
1. 2 to19 order divider
2. Auto-reload timer
3. Watch-dog timer
High Speed
Clock
TM0 Control
Register
System
Clock
1/4
1/8
f SYS
f SUB
11-bit Prescaler
fSYS0
f TM0
f SYS1
5-bit Prescaler
Interrupt Control
Register
8 Order Divider
TM0 Set Register
(8 bits)
TM0 Control
Logic
TM0 Interrupt
Logic
Watch Dog
Timer
Low Speed
Clock
TM0 Low Speed
Register
The format of the TM0 control register (TM0CR) is described below:
TM0CR register: (address = 020H, default data = 0H)
b3
b2
b1
b0
Reserved
Reserved
b1 b0 Input frequency (fSYS0 )
00
fsys/2 Hz
01
fsys/256 Hz
1 0 fsys/1024 Hz
1 1 fsys/2048 Hz
The TM0 set register is divided into TM0 MSB data register (TM0MSB register, address = 021H,
default = 0FH) and TM0 LSB data register (TM0LSB register, address = 022H, default = 0FH).
- 28 -