HT37Q70 Holtek Semiconductor Inc., HT37Q70 Datasheet - Page 56

no-image

HT37Q70

Manufacturer Part Number
HT37Q70
Description
4-channel Music Synthesizer Mcu
Manufacturer
Holtek Semiconductor Inc.
Datasheet
External RC Oscillation Converter
An external RC oscillation converter is implemented in
certain devices and is a function which allows touch
switch functions to be implemented. When used in con-
junction with the Analog Switch function up to eight
touch switches can be implemented.
External RC Oscillation Converter Operation
The RC oscillation converter is composed of two 16-bit
count-up programmable timers. One is Timer A and the
other is counter known as Timer B. The RC oscillation
converter is enabled when the RCO bit, which is bit 1 of
the RCOCR register, is set high. The RC oscillation con-
verter will then be composed of four registers, TMRAL,
TMRAH, TMRBL and TMRBH. The Timer A clock
source comes from the f
which is determined by bits in the RCOCCR register.
The RC oscillation converter Timer B clock source co-
mes from an external RC oscillator. As the oscillation
frequency is dependent upon external capacitance and
resistance values, it can therefore be used to detect the
increased capacitance of a touch switch pad.
There are six registers related to the RC oscillation con-
verter. These are, TMR2H, TMR2L, RCOCCR, TMR4H,
TMR4L and RCOCR. The internal timer clock is the in-
put clock source for TMRAH and TMRAL, while the ex-
Rev. 1.00
SYS
or f
SYS
/4, the choice of
ADPS (33H) - ADPCM Status Register
RCOCCR Register
56
ternal RC oscillator is the clock source input to TMRBH
and TMRBL. The OVB bit, which is bit 0 of the RCOCR
register, decides whether the timer interrupt is sourced
from either the Timer A overflows or Timer B overflow.
When a timer overflow occurs, the RCOCF bit is set and
an external RC oscillation converter interrupt occurs.
When the RC oscillation converter Timer A or Timer B
overflows, the RCOCON bit is automatically reset to
zero and stops counting.
The resistor and capacitor form an oscillation circuit and
input to TMRBH and TMRBL. The RCOM0, RCOM1
and RCOM2 bits of RCOCCR define the clock source of
Timer A.
When the RCOCON bit, which is bit 4 of the RCOCCR
register, is set high, Timer A and Timer B will start count-
ing until Timer A or Timer B overflows. Now the timer
counter will generate an interrupt request flag which is
bit RCOCF, bit 5 of the INTCH register. Both Timer A and
Timer B will then stop counting and the RCOCON bit will
automatically be reset to 0 at the same time. Note that
if the RCOCON bit is high, the TMRAH, TMRAL,
TMRBH and TMRBL registers cannot be read or written
to.
HT37Q70/60/50/40/30/20
February 17, 2009

Related parts for HT37Q70