HT45R37V Holtek Semiconductor Inc., HT45R37V Datasheet - Page 32

no-image

HT45R37V

Manufacturer Part Number
HT45R37V
Description
C/r-f Type 8-bit Otp Mcu
Manufacturer
Holtek Semiconductor Inc.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
HT45R37V
Manufacturer:
HOLTEK
Quantity:
3 200
The values in Timer A and Timer B is changed by writing
to the high byte registers, TMRAH and TMRBH, but writ-
ing to the low byte registers TMRAL and TMRBL will
keep the values in Timer A and Timer B unchanged.
Reading registers TMRAH and TMRBH will also latch
the TMRAL TMRBL values into the low byte buffer to
avoid false timing problems. Reading from registers
TMRAL and TMRBL returns the contents of the low byte
buffer only. Therefore, the low byte of Timer A and Timer
B cannot be read directly. TMRAH and TMRBH must be
read first to ensure that the low byte contents of Timer A
and Timer B are latched into the buffer.
The external resistor and capacitor, together with inter-
nal inverters, form an oscillation circuit which is the clock
source for Timer B and therefore the input to registers
TMRBL and TMRBH. The RCOM0, RCOM1 and
RCOM2 bits of RCOCCR define the clock source of
Timer A.
If the RCOCON bit in the RCOCCR register is set high,
Timer A and Timer B will start counting until either Timer
A or Timer B overflows. The relevant Timer will then gen-
erate an interrupt request flag which is the RCOCF bit in
the INTC1 register. Timer A and Timer B will stop count-
ing and will also reset the RCOCON bit to zero at the
same time. If the RCOCON bit is set high, then the
TMRAL/TMRAH and TMRBL/TMRBH register cannot
be read or written to.
C/R to F Converter Analog Switches
The device contains only one internal C/R to F converter
function, however it can be connected to any of the 9 ex-
Rev. 1.00
Analog Switches and C/R to F Oscillator
32
ternal channels using its internal analog switch function.
This enables applications such as multi-channel or ma-
trix touch switch applications to be implemented. The
bits in the ASCR0~ASCR1 registers select which of the
9-channels is to be connected to the internal C/R to F
converter. The bits in the ASCR2 register selects what
happens to the channel when the channel is inactive.
When a channel is inactive it can be selected to be
pulled low to ground or not using bits in the ASCR2 reg-
ister. As there are only 8-bits to control 9-channels the
function is selected in channel pairs. There are configu-
ration options which must first be selected to choose
which pins are to be used as inputs to the C/R to F con-
verter.
If the configuration options have selected PA0~PA7 to
be normal I/O pins, then the corresponding bit 0~bit7
bits in the ASCR0 register will have no function and will
be read as zero. Similarly if the configuration options
have selected PD0 to be normal I/O pins, then the corre-
sponding bit 0 bit in the ASCR1 register will have no
function and will be read as zero.
If the configuration options have selected PA0~PA7 to
be normal I/O pins, then the corresponding bits in the
ASCR2 register, bit 0 ~ bit3, must be cleared to zero to
disable the RC0/RC1, RC2/RC3, RC4/RC5 and RC6/RC7
pull-low resistors. Similarly if the configuration options
have selected PD0 to be normal I/O pin, then the corre-
sponding bits in the ASCR2 register, bit 4, must be cleared
to zero to disable the RC8 pull-low resistor. the ASCR2
register bit7~bit5 must to be cleared to zero by applica-
tion program.
October 20, 2009
HT45R37V

Related parts for HT45R37V