HT46RU67 Holtek Semiconductor Inc., HT46RU67 Datasheet - Page 23

no-image

HT46RU67

Manufacturer Part Number
HT46RU67
Description
Ht46ru67/ht46cu67 -- A/d Type 8-bit Mcu With Lcd
Manufacturer
Holtek Semiconductor Inc.
Datasheet
Input/Output Ports
There are 32 bidirectional input/output lines in the device,
labeled as PA, PB, PC and PD, which are mapped to the
data memory of [12H], [14H], [16H] and [18H] respec-
tively. All of these I/O ports can be used for input and out-
put operations. For input operation, these ports are
non-latching, that is, the inputs must be ready at the T2
rising edge of instruction MOV A,[m] (m=12H, 14H,
16H or 18H). For output operation, all the data is latched
and remains unchanged until the output latch is rewritten.
Each I/O line has its own control register (PAC, PBC,
PCC, PDC) to control the input/output configuration.
With this control register, a CMOS output or a Schmitt
Trigger input with or without pull-high resistor structures
can be reconfigured dynamically under software control.
To function as an input, the corresponding latch of the
control register must be setup as a 1 . The input source
also depends on the control register. If the control regis-
ter bit is 1 , the input will read the pad state. If the con-
trol register bit is 0 , the contents of the latches will
move to the internal bus. The latter is possible in the
For an output function, CMOS is the only configuration.
These control registers are mapped to locations 13H,
15H, 17H and 19H.
After a device reset, these I/O lines will default to an input
state and will be either high or floating, depending upon
Note:
PA3 is pin-shared with the signal. If the PFD option is selected and if PA3 is setup as an output, then the output signal
on the PA3 pin will be the PFD signal, generated by the timer/event counter overflow signal. If setup as an input it will
function as a normal input pin. Once the PFD option is selected, the PFD output signal is controlled by the PA3 data reg-
ister only. Writing a 1 to the PA3 data register will enable the PFD output function while writing a 0 will force the PA3
pin to remain at 0 . The I/O functions of PA3 are shown below.
Note:
Rev. 1.00
read-modify-write instruction.
PAC Register
PAC0
I/O Mode
ThePFDfrequency isthetimer/event counter overflow frequency divided by2.
x stands for don t care
D stands for Data 0 or 1
PA3
0
0
0
0
1
1
1
PAC Register
PAC1
Logical Input
I/P (Normal)
0
0
1
1
0
0
1
PA Data Register
PA0
Logical Output
O/P (Normal)
1
0
1
0
1
0
x
23
the pull-high configuration options. Each bit of these in-
put/output latches can be set or cleared by the SET
[m].i and CLR [m].i bit manipulation instructions.
Some instructions first input data and then follow the out-
put operations. For example, SET [m].i , CLR [m].i ,
CPU, execute the defined bit operations, and then write
the results back to the latches or the accumulator.
Each line of port A has the capability of waking-up the
device.
Each I/O port has a pull-high option. Once the pull-high
option is selected, the I/O port has a pull-high resistor,
otherwise, there s none. Take note that a non-pull-high
I/O port operating in input mode will cause a floating
state.
PA0, PA1, PA3, PD4, PD5, PD6 and PD7 are pin-shared
with BZ, BZ, PFD, INT0, INT1, TMR0 and TMR1 pins re-
spectively. The PC0, PC6 and PC7 pins are pin-shared
with TMR2, TX and RX.
PA0 and PA1 are pin-shared with the BZ and BZ signals,
respectively. If the BZ/BZ option is selected, the output
signal in output mode of PA0/PA1 will be the buzzer sig-
nal generated by the Multi-function timer. The input
mode always remain in its original functions. Once the
BZ/BZ option is selected, the buzzer output signals are
controlled by the PA0 data register only. The I/O func-
tions of PA0/PA1 are shown below.
CPL [m] , CPLA [m] read the entire port states into the
PA Data Register
PA1
x
x
x
x
x
x
x
Logical Input
I/P (PFD)
HT46RU67/HT46CU67
PA0=BZ, PA1=BZ
PA0=0, PA1=0
PA0=BZ, PA1=input
PA0=0, PA1=input
PA0=input, PA1=BZ
PA0=input, PA1=0
PA0=input, PA1=input
Output Function
PFD (Timer on)
February 27, 2008
O/P (PFD)

Related parts for HT46RU67