em6522 EM Microelectronic, em6522 Datasheet - Page 28

no-image

em6522

Manufacturer Part Number
em6522
Description
Mfp Version Of Em6622 Ultra Low Power Microcontroller With 4x32 Lcd Driver
Manufacturer
EM Microelectronic
Datasheet
Figure 19. Melody Generator Block Diagram
7
A normal application is to drive a buzzer connected onto the terminal Buzzer.
This peripheral cell is a combination of a 7 frequency tone generator and a 4-bit timer, used to provide a 50%
duty cycle signal on the Buzzer terminal of a pre-selected length and frequency. The Buzzer terminal is active
as long as the timer is not 0 or the SwBuzzer is set to ‘1’. The 4-bit timer can be used for another application
independent of the Buzzer terminal by selecting "silence" instead of another frequency on the Buzzer output.
"Silence" can also be used as part of a melody, or to switch off the buzzer.
To use the buzzer independent of the 4-bit timer one has to set the switch SwBuzzer. This bit is in register
RegMelTim and selects the signal duration on the buzzer output. If SwBuzzer =1 then the signal is output until
the bit is set back to 0 . With SwBuzzer =0 the output signal duration is controlled by the 4bit timer. If neither
the SwBuzzer or the timer are active, the Buzzer terminal is on 0.
The high impedance state setting with BzOutEn is independent of the SwBuzzer and Timer settings. As soon
as the bit is set to 1 the Buzzer terminal is set tristate. See also
7.1 4-Bit Timer
The timer has 2 modes:
Mode selection and timer count down frequency is done in register RegMelTim. All timer frequencies are
coming from the prescaler. The 4-bit timer can be used independent of the melody buzzer application.
Whenever the timer reaches 0 it generates an interrupt request IRQBz in the register RegIRQ2 . This interrupt
can be masked with the bit MaskIRQBz in register RegIRQMask2. By writing 0 into the timer period register
the timer stops immediately and does not generate an interrupt.
Copyright © 2005, EM Microelectronic-Marin SA
(from Prescaler)
Melody, Buzzer
Ck[16]
- Single run mode ( Auto =0)
- Continuous run mode ( Auto =1)
R
Control & Status
Frequency Select
Frequency
G enerator
Control
Registers
Logic
8
SwBuzzer
Internal Data Bus DB[3:0]
Auto
V
(from Prescaler)
T im er C lock
SS
BzO utEn
28
Zero
F igure 19.
1 2 1 H
Period Register
4 - Bit T im er
1
0
M UX
Close
www.emmicroelectronic.com
EM6522
FlBuzzer
IR Q Bz
Term inal
BZ

Related parts for em6522