
Input/Output Ports
Holtek microcontrollers offer considerable flexibility on their I/O ports. With the input or output des-
ignation of every pin fully under user program control, pull-high option for all pins and wake-up op-
tions on certain pins, the user is provided with the I/O structures to meet the needs of a wide range
of application possibilities.
Depending upon which device is used, there are up to 19 bidirectional input/output lines in the
microcontroller labeled with port names PA, PB and PC. These I/O ports are mapped to the Data
Memory with specific addresses as shown in the Special Purpose Data Memory table. All of these
I/O ports can be used for input and output operations. For input operation, these ports are
non-latching, which means the inputs must be ready at the T2 rising edge of the instruction
²
MOV
A,[m]
²
where m denotes the port address. For output operation, 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 external resistor. To eliminate the need for these external resistors, all I/O pins, when con-
figured as an input, have the capability of being connected to an internal pull-high resistor. These
pull-high resistors are selectable via configuration options and are implemented using a weak
PMOS transistor. Note that on the HT48R05A-1/HT48C05 and HT48R06A-1/HT48C06 devices,
the single pull-high configuration option will connect all pins on all ports to pull high resistors, indi-
vidual ports or pins cannot be selected to have pull-high resistors. On the remaining devices each
individual port has a pull-high option which will connect all pins on the selected port to a pull-high
resistor.
Port A Wake-up
Each device has a HALT feature enabling the microcontroller to enter a Power Down Mode and
preserve power, a feature that is important for battery and other low power applications. 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 Halt condition, the processor will remain idle or in a low-power state until the logic condition of
the selected 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. Note that each pin on Port A can be se-
lected individually to have this wake-up feature.
I/O Port Control Registers
Each I/O port has its own control register PAC, PBC and PCC, to control the input/output configura-
tion. With this control register, each CMOS output or Schmitt Trigger input can be reconfigured dy-
namically under software control. Each pin of the I/O ports is directly mapped to a bit in its
associated port control register. For the I/O pin to function as an input, the corresponding bit of the
control register must be written as a
²
1
²
. This will then allow the logic state of the input pin to be di-
rectly read by instructions. When the corresponding bit of the control register is written as a
²
0
²
,
the I/O pin will be setup as a CMOS output. If the pin is currently setup as an output, instructions
can still be used to read the output register. However, it should be noted that the program will in
fact only read the status of the output data latch and not the actual logic status of the output pin.
Chapter 1 Hardware Structure
23
Содержание HT48R05A-1
Страница 7: ...vi Cost Effective I O Type MCU...
Страница 8: ...P a r t I Microcontroller Profile Part I Microcontroller Profile 1...
Страница 9: ...2 Cost Effective I O Type MCU...
Страница 52: ...P a r t I I Programming Language Part II Programming Language 45...
Страница 53: ...46 Cost Effective I O Type MCU...
Страница 59: ...52 Cost Effective I O Type MCU...
Страница 90: ...P a r t I I I Development Tools Part III Development Tools 83...
Страница 91: ...84 Cost Effective I O Type MCU...
Страница 101: ...94 Cost Effective I O Type MCU...
Страница 104: ...Appendix Appendix 97...
Страница 105: ...98 Cost Effective I O Type MCU...
Страница 115: ...108 Cost Effective I O Type MCU...
Страница 116: ...A p p e n d i x B Package Information Appendix B Package Information 109 B...
Страница 123: ...116 Cost Effective I O Type MCU...
Страница 125: ...Amendments...