English
Language : 

W921E400A Datasheet, PDF (24/53 Pages) Winbond – 4-BIT MICROCONTROLLER
W921E400A/W921C400
COMPTR register: (address = 01AH, default data = DH)
b3
b2
b1
b0
(Read Only)
0: Compare stop
1: Compare start
0: Vneg = Vref; Vpos = Vani
1: Vneg = Vani; Vpos = Vref
0: Vpos voltage < Vneg voltage
1: Vpos voltage >= Vneg volatge
Must be set value "1"
When the COMPTR register bit0 is set by software, the comparator starts and the bit2 of the
COMPTR register will be set to "1" initially. The comparing result will be stored in the bit2 of the
COMPTR register and will keep this value until the bit0 of the COMPTR register is set again. The only
way to disable the comparator is to reset the bit0 of the COMPTR register using the software control.
The initial value of the COMPTR bit2 is "1", the falling edge of COMPTR bit2 will cause the
comparator interrupt to become active if the enable flag of the comparator interrupt is set.
6.10 Timer/Counter
There are three timers (TM0, TM2 and TM3) in this chip, and all can be initialized at any time by
writing data into the TM0, TM2 and TM3 set register.
6.10.1 TM0
TM0 can perform the following functions:
1. 2 to19 order divider
2. Auto-reload timer
3. Watch-dog timer
System
Clock
1/4
f SYS
11-bit Prescaler
f TM0
Interrupt Control
Register
8 Order Divider
TM0 Interrupt
Logic
Watch Dog
Timer
High Speed
Clock
TM0 Control
Register
TM0 Set Register
(8 bits)
TM0 Control
Logic
- 24 -