HT56R66 Holtek Semiconductor Inc., HT56R66 Datasheet - Page 25

no-image

HT56R66

Manufacturer Part Number
HT56R66
Description
Tinypower Tm A/d Type With Lcd 8-bit Otp Mcu
Manufacturer
Holtek Semiconductor Inc.
Datasheet
A/D Converter Registers -
ADRL, ADRH, ADCR, ACSR
The device contains a multiple channel 12-bit A/D con-
verter. The correct operation of the A/D requires the use
of two data registers and two control registers. The two
data registers, a high byte data register known as
ADRH, and a low byte data register known as ADRL, are
the register locations where the digital value is placed
after the completion of an analog to digital conversion
cycle. Functions such as the A/D enable/disable, A/D
channel selection and A/D clock frequency are deter-
mined using the two control registers, ADCR and ACSR.
Serial Interface Registers
The device contains two serial interfaces, an SPI and an
I
SIMAR are the control registers for the Serial Interface
function while the SIMDR is the data register for the Se-
rial Interface Data.
Port A Wake-up Register - PAWU
All pins on Port A have a wake-up function enable a low
going edge on these pins to wake-up the device when it
is in a power down mode. The pins on Port A that are
used to have a wake-up function are selected using this
resister.
Pull-High Resistors - PAPU, PBPU, PCPU, PDPU
All I/O pins on Ports PA, PB, PC and PD, if setup as in-
puts, can be connected to an internal pull-high resistor.
The pins which require a pull-high resistor to be con-
nected are selected using these registers.
Register - CLKMOD
The device operates using a dual clock system whose
mode is controlled using this register. The register con-
trols functions such as the clock source, the idle mode
enable and the division ratio for the slow clock.
LCD/LED Registers -
LCDCTRL, LEDCTRL, LCDOUT1, LCDOUT2
The device contains a fully integrated LCD/LED Driver
function which can be setup in various configurations al-
lowing it to control a wide range of external LCD and
LED panels. Most of these options are controlled using
the LCDCTRL and LECTRL registers. As some of the
LCD segment driving pins can also be setup to be used
as CMOS outputs, two registers, LCDOUT1 and
LCDOUT2, are used to select the required function.
Miscellaneous Register - MISC
The miscellaneous register is used to control two func-
tions. The four lower bits are used for the Watchdog
Timer control, while the highest four bits are used to se-
lect open drain outputs for pins PA0~PA3.
Rev. 1.10
2
C interface. The SIMCTL0, SIMCTL1, SIMCTL2 and
25
Input/Output Ports
Holtek microcontrollers offer considerable flexibility on
their I/O ports. With the input or output designation of ev-
ery pin fully under user program control, pull-high selec-
tions for all ports and wake-up selections on certain
pins, the user is provided with an I/O structure to meet
the needs of a wide range of application possibilities.
The device provides 32 bidirectional input/output lines
labeled with port names PA, PB, PC and PD. These I/O
ports are mapped to the RAM Data Memory with spe-
cific addresses as shown in the Special Purpose Data
Memory table. All of these I/O ports can be used for in-
put and output operations. For input operation, these
ports are non-latching, which means the inputs must be
ready at the T2 rising edge of instruction MOV A,[m] ,
where m denotes the port address. For output opera-
tion, all the data is latched and remains unchanged until
the output latch is rewritten.
Pull-high Resistors
Many product applications require pull-high resistors for
their switch inputs usually requiring the use of an exter-
nal resistor. To eliminate the need for these external re-
sistors, all I/O pins, when configured as an input have
the capability of being connected to an internal pull-high
resistor. These pull-high resistors are selected using
registers PAPU, PBPU, PCPU and PDPU and are im-
plemented using weak PMOS transistors.
Port A Wake-up
The HALT instruction forces the microcontroller into a
Power Down condition which preserves power, a fea-
ture that is important for battery and other low-power ap-
plications. Various methods exist to wake-up the
microcontroller, one of which is to change the logic
condition on one of the Port A pins from high to low. After
a HALT instruction forces the microcontroller into enter-
ing a Power Down condition, the processor will remain
in a low-power state until the logic condition of the se-
lected wake-up pin on Port A changes from high to low.
This function is especially suitable for applications that
can be woken up via external switches. Each pin on Port
A can be selected individually to have this wake-up fea-
ture using the PAWU register.
Port A Open Drain Function
All I/O pins in the device have CMOS structures, how-
ever Port A pins PA0~PA3 can also be setup as open
drain structures. This is implemented using the ODE0~
ODE3 bits in the MISC register.
HT56R66/HT56R666
September 8, 2009

Related parts for HT56R66