em6521 EM Microelectronic, em6521 Datasheet - Page 29

no-image

em6521

Manufacturer Part Number
em6521
Description
Mfp Version Of Em6621 Ultra Low Power Microcontroller With 4x20 Lcd Driver
Manufacturer
EM Microelectronic
Datasheet
Figure 20. Single Run Mode
Figure 21. Continuos Run Mode
7.1.1 Single Run Mode
The timer duration is controlled by the RegMelPeri value and the selected timer frequency in RegMelTim. The
timer is counting down from its previously charged value until it reaches 0. On 0 the timer stops and generates
an interrupt request. The buzzer frequency output is enabled after the next positive timer clock edge and
remains enabled until the timer reaches 0.
7.1.2 Continuos Run Mode
This is almost the same as the single run mode only that in this case the timer after reaching 0 reloads itself
automatically with the register RegMelPeri value. Every time the timer reaches 0 an interrupt request is send.
There are 2 ways to stop the continuos mode.
Copyright © 2005, EM Microelectronic-Marin SA
First, changing the mode to single run mode. As the timer reaches 0 it stops. The last period after Auto =0
is of length RegMelPeri + 1 .
Second, loading 0 into the timer period register RegMelPeri stops the timer immediately, no interrupt is
generated and the Auto flag is reset. The buzzer frequency output is enabled directly by writing Auto =1.
Timer Clock
Timer Value
Buzzer
IRQBz
IRQBz
Tim er Clock
Tim er Value
Buzzer
R
RegMelPeri
µP writes 2
into
µP writes 2 into
RegMelPeri
µP writes
2
Auto = 1
2
1
1
0
n+1 periods
µP writes 1 into
RegMelPeri
0
29
2
n periods
1
1
0
0
2
µP writes
Auto = 0
www.emmicroelectronic.com
1
EM6521
0

Related parts for em6521