HTG2150
15
July 24, 2000
Preliminary
Register
Bit No.
Label
Function
INTCH
0
ET2I
Controls the Timer 2 interrupt
(1=enable; 0=disable)
1
ET3I
Controls the Timer 3 interrupt
(1=enable; 0=disable)
2
PWMI
PWM D/A interrupt (1=enable; 0=disable)
3
Should be set as 0 always
4
T2F
Internal Timer 2 request flag
(1=active; 0=inactive)
5
T3F
Internal Timer 3 request flag
(1=active; 0=inactive)
6
PWMF
PWM D/A flag (1=active; 0=inactive)
7
Should be set as 0 always
INTCH register
No.
Interrupt Source Priority Vector
a
External interrupt
1
04H
b
Timer counter 0
overflow
2
08H
d
Timer 2 overflow
4
10H
e
Timer 3 overflow
5
14H
f
PWM D/A interrupt
6
18H
The timer counter 0 and Timer 2/3 interrupt re-
quest flag (T0F/T2F/T3F), External interrupt re-
quest flag (EIF), PWM D/A interrupt request flag
(PWMF),EnableTimer0/2/3bit(ET0I/ET2I/ET3I)
, Enable PWM D/A interrupt (PWMI), Enable ex-
ternal interrupt bit (EEI) and Enable master in-
terrupt bit (EMI) constitute an interrupt control
register (INTC/INTCH) which is located at
0BH/1EH in the data memory. EMI, EEI, ET0I,
ET2I, ET3I, PWMI are used to control the en-
abling/disabling of interrupts. These bits prevent
the requested interrupt from being serviced. Once
the interrupt request flags (T0F, T2F, T3F, EIF,
PWMF) are set, they will remain in the
INTC/INTCHregisteruntiltheinterruptsareser-
viced or cleared by a software instruction.
It is recommended that a program does not use
the
CALL subroutine
subroutine. Interrupts often occur in an unpre-
dictable manner or need to be serviced immedi-
atelyinsomeapplications.Ifonlyonestackisleft
within the interrupt
and enabling the interrupt is not well controlled,
the CALLsubroutine shouldnotoperateinthein-
terrupt subroutine as it will damage the original
control sequence.
Oscillator configuration
There are two oscillator circuits in the HTG2150.
The RC oscillator signal provides the internal
system clock. The HALT mode stops the system
oscillator and ignores any external signal to
conserve power. Only the RC oscillator is de-
signed to drive the internal system clock. The
RTC oscillator provides the Timer 3 and LCD
driver clock source.
The RC oscillator needs an external resistor
connected between OSCI and VSS. The resis-
tance value must range from 50k
However, the frequency of the oscillation may
vary with V
DD
, temperature and the chip itself
duetoprocessvariations.Itis,therefore,notsuit-
able for timing sensitive operations where accu-
rate oscillator frequency is desired.
to 400k .
*
7 7
. , 4 5 6
*7 7
System and RTC oscillator