HT48CU80 Holtek Semiconductor, HT48CU80 Datasheet - Page 13

no-image

HT48CU80

Manufacturer Part Number
HT48CU80
Description
(HT48RU80 / HT48CU80) I/O Type 8-Bit MCU
Manufacturer
Holtek Semiconductor
Datasheet
www.DataSheet4U.com
The External Interrupt 1 request flag (EIF1), UART inter-
rupt request flag (URF), Timer/Event Counter 2 interrupt
request flag (T2F), External Interrupt 1 bit (EEI1), and
enable UART interrupt bit (EURI), enable Timer/Event
Counter 2 interrupt bit (ET2I), constitute the Interrupt
Control register 1 (INTC1) which is located at 1EH in the
data memory. EEI1, EURI and ET2I are used to control
the enabling or disabling of interrupts. These bits pre-
vent the requested interrupt from being serviced. Once
the interrupt request flags (EIF1, URF, T2F) are set, they
will remain in the INTC1 register until the interrupts are
serviced or cleared by a software instruction.
It is recommended that a program does not use the
rupts often occur in an unpredictable manner or need to
be serviced immediately in some applications. If only
one stack is left and enabling the interrupt is not well
controlled, the original control sequence will be dam-
aged once the CALL operates in the interrupt subrou-
tine.
Oscillator Configuration
There are three oscillator circuits in the microcontroller.
All of them are designed for system clocks, namely, the
external RC oscillator, the external Crystal oscillator and
the internal RC oscillator, which are determined by op-
tions. No matter what oscillator type is selected, the sig-
nal provides the system clock. The HALT mode stops
the system oscillator and ignores an external signal to
conserve power.
If an RC oscillator is used, an external resistor between
OSC1 and VDD is required and the resistance must
range from 24k to 1M . The system clock, divided by
4, is available on OSC2, which can be used to synchro-
nize external logic. The RC oscillator provides the most
Rev. 1.00
CALL subroutine within the interrupt subroutine. Inter-
System Oscillator
Watchdog Timer
13
cost effective solution. However, the frequency of os-
cillation may vary with VDD, temperatures and the chip
itself due to process variations. It is, therefore, not suit-
able for timing sensitive operations where an accurate
oscillator frequency is desired.
If the Crystal oscillator is used, a crystal across OSC1
and OSC2 is needed to provide the feedback and phase
shift required for the oscillator. No other external compo-
nents are required. In stead of a crystal, a resonator can
also be connected between OSC1 and OSC2 to get a
frequency reference, but two external capacitors in
OSC1 and OSC2 are required. If the internal RC oscilla-
tor is used, the OSC1 and OSC2 can be selected as
32768Hz crystal oscillator (RTC OSC). Also, the fre-
quencies of the internal RC oscillator can be 3.2MHz,
1.6MHz, 800kHz and 400kHz, depending on the op-
tions.
The WDT oscillator is a free running on-chip RC oscilla-
tor, and no external components are required. Even if
the system enters the power down mode, the system
clock is stopped, but the WDT oscillator still works within
a period of approximately 65 s at 5V. The WDT oscilla-
tor can be disabled by options to conserve power.
Watchdog Timer - WDT
The WDT clock source is implemented by a dedicated
RC oscillator (WDT oscillator), RTC clock or instruction
clock (system clock divided by 4), determines the op-
tions. This timer is designed to prevent a software mal-
function or sequence from jumping to an unknown
location with unpredictable results. The Watchdog
Timer can be disabled by options. If the Watchdog Timer
is disabled, all the executions related to the WDT result
in no operation. The RTC clock is enabled only in the in-
ternal RC+RTC mode.
Once the internal WDT oscillator (RC oscillator with a
period of 65 s at 5V normally) is selected, it is first di-
vided by 256 (8-stage) to get the nominal time-out pe-
riod of 17ms at 5V. This time-out period may vary with
temperatures, VDD and process variations. By invoking
the WDT prescaler, longer time-out periods can be real-
ized. Writing data to WS2, WS1, WS0 (bits 2, 1, 0 of the
WDTS) can give different time-out periods. If WS2,
WS1, and WS0 are all equal to 1, the division ratio is up
to 1:128, and the maximum time-out period is 2.1 sec-
onds at 5V. If the WDT oscillator is disabled, the WDT
HT48RU80/HT48CU80
April 12, 2006

Related parts for HT48CU80