TMP91C824
91C824-217
2008-02-20
(2) Alarm generator
The alarm function generates 8 kinds of alarm waveform having a modulation
frequency 4096 Hz determined by the low-speed clock (32.768 kHz). 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 (1 Hz, 2 Hz, 64 Hz, 512 Hz and 8192 Hz) 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 orders to select alarm
waveform as output waveform from MLDALM. Then 10 be set on
MELALMC<FC1:0> register, and clear internal counter. Finally alarm pattern has to
be set on 8-bit register of ALM. If it is inverted output-data, set <ALMINV> as invert.
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.25 ms/8 times/1 s)
LD
(MELALMC), C0H
; set output alarm waveform
;
free-run
counter
start
LD
(ALM), 02H
; set AL2 pattern, start