TMP91C824
91C824-213
3.14.3.2 Alarm
generator
The Alarm function generates 8 kinds of alarm waveform having a modulation frequency 4096Hz
determined by the low-speed clock (32.768KHz). And this waveform is reversible by setting a value to a
register.
By connecting a loud speaker outside, Alarm tone can sound easily.
5 kinds of fixed cycle (1Hz, 2Hz, 64Hz, 512Hz, 8KHz) interrupts are generated by the free-run counter,
which is used for alarm generator.
(Operation)
At first, MELALMC<MELALM> have to be set as 0 in order to select alarm waveform as output
waveform from MLDALM. Then alarm pattern have to be set on 8 bit register of ALM. Finally “10”
be set on MLDALMC<AC1:0> register, and <ALMINV> be set as invert. By it is setting these values,
counter start to generate alarm waveform.
Followings are example program, setting value of alarm pattern and waveform of each setting
value.
(Setting value of alarm pattern)
Setting value for
ALM register
Alarm waveform
00H “0”
fixed
01H AL1
pattern
02H AL2
pattern
04H AL3
pattern
08H AL4
pattern
10H AL5
pattern
20H AL6pattern
40H AL7
pattern
80H AL8
pattern
Other Undefined
(do not set)
(Example program)
In case of outputting AL2 pattern (31.25ms/8 times/1sec)
LD
(MELALMC),C0H
; set output alarm waveform
; free-run counter start
LD
(ALM),02H
; set AL2 pattern , start