HT48CXX/HT48RXX
In the pulse width measurement mode with the
values of the TON and TE bits equal to one, if the
TMR0/ TMR1 has received a transient from low
to high (or high to low; if the TE bit is 0) it will
start counting until the TMR of the
HT48C10/HT48C30 or TMR0/TMR1 of the
HT48C50/ HT48C70 returns to the original level
and resets the TON. The measured result re-
mains in the timer/event counter even if the
activated transient happens again. In other
words, only one cycle measurement can be done.
Until setting the TON, the cycle measurement
will re-function as long as it receives further
transient pulse. In this operation mode, the
timer/event counter starts counting according
not to the logic level but to the transient edges.
In the case of counter overflows, the counter is
reloaded from the timer/event counter preload
register and issues an interrupt request just like
the other two modes.
To enable the counting operation, the timer ON
bit (TON; bit 4 of TMRC of the HT48C10/
HT48C30 or bit 4 of TMR0C/TMR1C of the
HT48C50/HT48C70) should be set to 1. In the
pulse width measurement mode, the TON will
be cleared automatically after the measure-
ment cycle is complete. But in the other two
modes the TON can only be reset by instruc-
tions. The overflow of the timer/event counter is
one of the wake-up sources. No matter what the
operation mode is, writing a 0 to ETI of the
HT48C10/HT48C30 or to ET0I/ET1I of the
HT48C50/HT48C70 can disable the correspond-
ing interrupt service.
In the case of timer/event counter OFF condi-
tion, writing data to the timer/event counter
preload register also reloads that data to the
timer/event counter. But if the timer/event
counter is turned on, data written to the
timer/event counter is reserved only in the
timer/event counter preload register. The
timer/event counter will go on operating un-
til an overflow occurs.
After the timer/event counter (reading TMR
of the HT48C10/HT48C30 or TMR0H/
TMR1H of the HT48C50/HT48C70) is read,
the clock is blocked to avoid errors. As this
may results in a counting error, blocking of
the clock should be taken into account by the
programmer.
Input/output ports
There are various numbers of bidirectional in-
put/output lines in the four microcontrollers.
The HT48C10 includes 18 bidirectional in-
put/output lines, labeled from PA to PC, which
are mapped to the [12H], [14H], or [16H] of the
RAM, respectively. The HT48C30 contains 22
bidirectional input/output lines, labeled from
PA to PC, which are mapped to [12H], [14H], or
[16H], respectively. The HT48C50 consists of 32
Input/output ports
26
25th May ’99