HT48CU80 Holtek Semiconductor, HT48CU80 Datasheet - Page 32

no-image

HT48CU80

Manufacturer Part Number
HT48CU80
Description
(HT48RU80 / HT48CU80) I/O Type 8-Bit MCU
Manufacturer
Holtek Semiconductor
Datasheet
www.DataSheet4U.com
Buzzer
The Buzzer function provides a means of producing a
variable frequency output, suitable for applications such
as Piezo-buzzer driving or other external circuits that re-
quire a precise frequency generator. The BZ and BZ
pins form a complimentary pair, and are pin-shared with
I/O pins, PB0 and PB1. A configuration option is used to
select from one of three buzzer options. The first option
is for both pins PB0 and PB1 to be used as normal I/Os,
the second option is for both pins to be configured as BZ
and BZ buzzer pins, the third option selects only the
PB0 pin to be used as a BZ buzzer pin with the PB1 pin
retaining its normal I/O pin function. Note that the BZ pin
is the inverse of the BZ pin which together generate a
differential output which can supply more power to con-
nected interfaces such as buzzers.
Note:
Rev. 1.00
then a falling edge on the RX pin will wake-up the
MCU from the Power Down Mode. Note that as it
takes 1024 system clock cycles after a wake-up, be-
fore normal microcontroller operation resumes, any
data received during this time on the RX pin will be ig-
nored.
For a UART wake-up interrupt to occur, in addition to
the bits for the wake-up being set, the global interrupt
enable bit, EMI, and the UART interrupt enable bit,
EURI must also be set. If these two bits are not set
then only a wake up event will occur and no interrupt
will be generated. Note also that as it takes 1024 sys-
tem clock cycles after a wake-up before normal
microcontroller resumes, the UART interrupt will not
be generated until after this time has elapsed.
PBC Register
X stand for don t care
PBC0
0
0
0
0
1
1
1
PBC Register
PBC1
0
0
1
1
0
0
1
PB0/PB1 Pin Function Control
PB Data Register
PB0
32
X
0
1
0
1
1
0
The clock source of the BZ/BZ, can originate from the
timer/event counter 0/1 overflow signal selected by con-
figuration options. For using the BZ/BZ functions, the
timer/event counter 0/1 should be set properly to gener-
ate the buzzer signal.
If the configuration options have selected both pins PB0
and PB1 to function as a BZ and BZ complementary pair
of buzzer outputs, then for correct buzzer operation it is
essential that both pins must be setup as outputs by set-
ting bits PBC0 and PBC1 of the PBC port control regis-
ter to zero. The PB0 data bit in the PB data register must
also be set high to enable the buzzer outputs, if set low,
both pins PB0 and PB1 will remain low. In this way the
single bit PB0 of the PB register can be used as an
on/off control for both the BZ and BZ buzzer pin outputs.
Note that the PB1 data bit in the PB register has no con-
trol over the BZ buzzer pin PB1.
If configuration options have selected that only the PB0
pin is to function as a BZ buzzer pin, then the PB1 pin
can be used as a normal I/O pin. For the PB0 pin to func-
tion as a BZ buzzer pin, PB0 must be setup as an output
by setting bit PBC0 of the PBC port control register to
zero. The PB0 data bit in the PB data register must also
be set high to enable the buzzer output, if set low pin
PB0 will remain low. In this way the PB0 bit can be used
as an on/off control for the BZ buzzer pin PB0. If the
PBC0 bit of the PBC port control register is set high,
then pin PB0 can still be used as an input even though
the configuration option has configured it as a BZ buzzer
output.
PB Data Register
PB1
X
X
X
X
X
X
X
HT48RU80/HT48CU80
PB0= 0
PB1= 0
PB0=BZ
PB1=BZ
PB0= 0
PB1=input line
PB0=BZ
PB1=input line
PB0=input line
PB1=BZ
PB0=input line
PB1=0
PB0=input line
PB1=input line
Output Function
April 12, 2006

Related parts for HT48CU80