English
Language : 

HT66F03 Datasheet, PDF (49/139 Pages) Holtek Semiconductor Inc – Small Package Enhanced Flash Type 8-Bit MCU with EEPROM
HT66F03/HT66F04/HT68F03/HT68F04
I/O Port Control Register
The I/O port has its own control register known as PAC, to control the input/output configuration. With this control regis-
ter, each CMOS output or input can be reconfigured dynamically under software control. Each pin of the I/O port is di-
rectly 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 directly read by in-
structions. When the corresponding bit of the control register is written as a ²0², the I/O pin will be setup as a CMOS out-
put. 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.
· PAC Register
Bit
7
6
5
4
3
2
1
0
Name
D7
D6
D5
D4
D3
D2
D1
D0
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
POR
1
1
1
1
1
1
1
1
Bit 7~0
I/O Port bit 7 ~ bit 0 Input/Output Control
0: Output
1: Input
Pin-remapping Functions
The flexibility of the microcontroller range is greatly enhanced by the use of pins that have more than one function.
Limited numbers of pins can force serious design constraints on designers but by supplying pins with multi-functions,
many of these difficulties can be overcome. The way in which the pin function of each pin is selected is different for each
function and a priority order is established where more than one pin function is selected simultaneously. Additionally
there is a PRM register to establish certain pin functions. Generally speaking, the analog function has higher priority
than the digital function. However, if more than two analog functions are enabled and the analog signal input comes
from the same external pin, the analog input will be internally connected to all of these active analog functional mod-
ules.
Pin-remapping Registers
The limited number of supplied pins in a package can impose restrictions on the amount of functions a certain device
can contain. However by allowing the same pins to share several different functions and providing a means of function
selection, a wide range of different functions can be incorporated into even relatively small package sizes.
· Pin-remapping Register List
Register
Bit
Name
7
6
5
4
3
2
1
0
PRM
PRML3 PRML2 PRML1 PRML0
¾
PRMS2 PRMS1 PRMS0
Rev. 1.00
49
April 16, 2010