HTG2150
18
July 24, 2000
Preliminary
The functional unit chip reset status are shown
below.
PC
000H
Interrupt
Disable
Prescaler
Clear
WDT
Clear. After master
reset, WDT begins
counting
Timer (0/2/3)
Off
LCD Display
Enable
Pull-high of RESB
with
Input/output Ports
Input mode
SP
Points to the top of
the stack
Timer 0
The timer 0 contains 16-bit programmable
count-up counters and the clock source come
from the system clock divided by 4.
There are three registers related to timer coun-
ter 0; TMR0H (0CH), TMR0L (0DH), TMR0C
(0EH). Writing TMR0L only writes the data
into a low byte buffer, and writing TMR0H will
write the data and the contents of the low byte
buffer into the timer 0 preload register (16-bit)
simultaneously. The timer 0 preload register is
changed by writing TMR0H operations and
writing TMR0L will keep the timer 0 preload
register unchanged.
Reading TMR0H will also latch the TMR0L
into the low byte buffer to avoid the false timing
problem. Reading TMR0L returns the contents
of the low byte buffer. In other words, the low
byte of timer counter 0 cannot be read directly.
It must read the TMR0H first to make the low
byte contents of timer 0 be latched into the
buffer.
The TMR0C is the timer 0 control register,
which defines the timer 0 options.
The timer counter control registers define the
operating mode, counting enable or disable and
active edge.
If the timer counter starts counting, it will
count from the current contents in the timer
counter to FFFFH. Once an overflow occurs,
the counter is reloaded from the timer counter
preload register and generates the correspond-
ing interrupt request flag (T0F; bit of INTC) at
the same time.
To enable the counting operation, the Timer ON
bit(TON;bit4ofTMR0C)shouldbesetto1.The
overflow of the timer counter is one of the
wake-up sources. No matter what the operation
mode is, writing a 0 to ET0I can disable the cor-
responding interrupt service.
InthecaseoftimercounterOFFcondition,writ-
ing data to the timer counter preload register
will also reload that data to the timer counter.
But if the timer counter is turned on, data
written to the timer counter will only be kept
in the timer counter preload register. The
timer counter will still operate until overflow
occurs.
*:
& * *
Reset timing chart
Reset circuit
3
5 # %
3
:
7
3
*
F:
" ! :
7 *
"
Reset configuration