HT56R66 Holtek Semiconductor Inc., HT56R66 Datasheet - Page 66

no-image

HT56R66

Manufacturer Part Number
HT56R66
Description
Tinypower Tm A/d Type With Lcd 8-bit Otp Mcu
Manufacturer
Holtek Semiconductor Inc.
Datasheet
PA0/PA1 Pin Function Control
If configuration options have selected that only the PA0
pin is to function as a BZ buzzer pin, then the PA1 pin
can be used as a normal I/O pin. For the PA0 pin to func-
tion as a BZ buzzer pin, PA0 must be setup as an output
by setting bit PAC0 of the PAC port control register to
zero. The PA0 data bit in the PA data register must also
be set high to enable the buzzer output, if set low pin
PA0 will remain low. In this way the PA0 bit can be used
as an on/off control for the BZ buzzer pin PA0. If the
PAC0 bit of the PAC port control register is set high, then
pin PA0 can still be used as an input even though the
configuration option has configured it as a BZ buzzer
output.
Note:
Rev. 1.10
x stands for don t care
D stands for Data 0 or 1
PAC Register
The above drawing shows the situation where both pins PA0 and PA1 are selected by configuration option to
be BZ and BZ buzzer pin outputs. The Port Control Register of both pins must have already been setup as out-
put. The data setup on pin PA1 has no effect on the buzzer outputs.
PAC0
0
0
0
0
1
1
PAC Register
PAC1
0
0
1
1
0
1
Buzzer Output Pin Control
PA Data Register
PA0
66
1
0
1
0
x
x
Note that no matter what configuration option is chosen
for the buzzer, if the port control register has setup the
pin to function as an input, then this will override the con-
figuration option selection and force the pin to always
behave as an input pin. This arrangement enables the
pin to be used as both a buzzer pin and as an input pin,
so regardless of the configuration option chosen; the ac-
tual function of the pin can be changed dynamically by
the application program by programming the appropri-
ate port control register bit.
PA Data Register
PA1
D
x
x
x
x
x
HT56R66/HT56R666
PA1=input line
PA1=input line
PA0=input line
PA0=input line
PA0=input line
September 8, 2009
Function
PA0= 0
PA1= 0
PA0= 0
PA0=BZ
PA1=BZ
PA0=BZ
Output
PA1=D

Related parts for HT56R66