Holtek HT67F86A Application Manuallines

HT67F86A Internal RTC Application Guidelines
HT67F86A Internal RTC Application Guidelines
D/N: AN0448E
Introduction
One special feature of the Holtek 8-bit Flash MCU, the HT67F86A, is that it includes an
low power consumption applications, the device’s internal RTC has a standby power
consumption of lower than 1µA at an operating voltage of 3V. The integrated LCD driver
can drive dot matrix LCD display applications of up to 1024 pixels, which can be used with
various display configurations and font settings. With the increasing trends of mobile
device applications such as cellphones and tablets, in addition to being utilised in
industrial control and consumer products, the ultra-low standby power consumption
performance is also an especially important consideration in battery-powered applications.
The MCU’s internal RTC oscillator forms an excellent solution for applications which
require a real time clock function as it reduces the need for an external timing IC with the
resulting reductions in cost and design simplification. This application note will introduce
the Holtek MCU internal RTC oscillator characteristics and application guidelines.
Functional Description
Oscillators
The HT67F86A provides 3 frequency oscillation sources, namely the HXT, HITC and LXT
oscillators. Users can select their desired system frequency, f
program. The LXT provides an f
commonly for applications requiring an RTC real-time clock. Additionally, the MCU can
enter the IDLE2 or SLEEP power saving modes also using the application program to
implement different standby power consumption power down modes. The related
registers are listed in the following table, refer to the Oscillators section in the datasheet
for more detailed information.
Register
Name
SCC CKS2 CKS1 CKS0 — FHS — FHIDEN FSIDEN
HIRCC — — — — HIRC1 HIRC0 HIRCF HIRCEN
HXTC — — — — — HXTM HXTF HXTEN
LXTC — — — — — — LXTF LXTEN
7 6 5 4 3 2 1 0
System Operating Mode Control Registers List
using their application
SYS,
frequency of 32768Hz for various MCU clocks, but more
L
Bit
AN0448E V1.00 1/7 January 16, 2017
HT67F86A Internal RTC Application Guidelines
The clock frequency block diagram is shown as below.
f
H
fH/2
/4
f
H
/8
f
H
f
H
f
H
f
H
/16
/32
/64
CKS2~CKS 0
f
SYS
f
SUB
resistor together with the C1
P
HIRCEN
HXTEN
High Speed
Oscillat or
HIRC
HXT
Low Speed
Oscillat or
LXT
f
LXT
FHS
IDLE2
SLEEP
f
H
Prescaler
f
SUB
LXT Oscillator
The LXT oscillation circuit consists of an external 32768Hz crystal and resistor as well as
capacitor components. The crystal is connected between pins XT1 and XT2. The
frequency accuracy adjustment is implemented by the R
and C2 capacitors. Users should refer to the oscillator specification for the resistance and
capacitance configurations. After power on the LXTEN bit will be in a high state which
enable the LXT oscillator. By examining if the LXTF bit has been set high, it can be
determined if the LXT oscillator is powered up and ready for use. The LXT oscillator
circuit is shown as below.
C1
32. 768kHz
C2
Note : 1. RP, C1 and C 2 ar e required .
2. Al though not shown pi ns have a paras iti c capaci tance of ar ound 7pF .
XT1
R
P
XT2
Internal Oscillator Circuit
Internal RC Oscillator
To internal circuits
External LXT Oscillator
Time Base Control Register
The HT67F86A provides a Real Time Clock function. A time counting function can be
implemented by configuring the Time Base 0 or Time Base 1 interrupt control bits, TB0E
or TB1E, together with the data memory. The time base function clock source, f
from the f
registers to choose a value within the range of f
. The Time Base frequency division ratio is selected by configuring the
LXT
PSC
/28 ~ f
/215. Refer to the datasheet for
PSC
the related registers and the TB0E and TB1E interrupt addresses.
PSC,
comes
AN0448E V1.00 2/7 January 16, 2017
HT67F86A Internal RTC Application Guidelines
f
LXT
LXT
Low Speed
Oscillat or
IDLE2
SLEEP
f
SUB
f
/4
LXT
1/4 Time Base 0
Prescaler
1/8
f
SUB
f
LXT
TB0 [2:0]
f
LCD
Time Base 1
LCD
LVR
WDT
f
SUB
TB1[2:0]
Device Clock Configuration
TB0ON
f
f
/4
LXT
PSC
Prescaler 0
Prescaler 1
f
PSC
f
PSC
/28~ f
/28~ f
PSC
PSC
TB1ON
15
/2
15
/2
Time Base Interrupt
TB0C Register
Bit 7 6 5 4 3 2 1 0
Name TB0ON — — — — TB02 TB01 TB00 R/W R/W — — — — R/W R/W R/W POR 0 — — — — 0 0 0
Bit 7 TB0ON: Time Base 0 Enable Control
0: Disable
1: Enable
Bit 6~3 Unimplemented, read as “0”
Bit 2~0 TB02~TB00: Time Base 0 time-out period selection
8
000: 2
/f
PSC
9
001: 2
/f
PSC
10
010: 2
011: 2
100: 2
101: 2
110: 2
111: 2
The f
/f
PSC
11
/f
PSC
12
/f
PSC
13
/f
PSC
14
/f
PSC
15
/f
PSC
is derived from the internal clock source f
PSC
M
U X
TB0 [2:0]
M U X
TB1 [2:0]
Time Base 0 Interrupt
Time Base 1 Interrupt
/4.
LXT
AN0448E V1.00 3/7 January 16, 2017
Loading...
+ 4 hidden pages