Toshiba TLCS-900/H1 Series Data Book page 313

32bit micro controller
Hide thumbs Also See for TLCS-900/H1 Series:
Table of Contents

Advertisement

3.13.6  Explanation of the alarm function
Can use alarm function by setting of register of PAGE1 and output either of three signal to
/ALARM pin as follows.
(1) In accordance of alarm register and the timer, output '0'.
(2) Output clock of 1Hz.
(3) Output clock of 16Hz.
Resetting does not initialize RTC. So the case of using INTRTC, clear interrupt request flag
INTERCKEY <IRC> after reset.
(1) In accordance of alarm register and a timer, output '0'.
When value of a timer of PAGE0 accorded with alarm register of PAGE1 with a state of
PAGER<ENAALM>='1', output '0' to /ALARM pin and occur INTRTC.
Follows are ways using alarm.
Initialization of alarm is done by writing in '1' at RESTR<RSTALM>, setting value of all alarm
becomes don't care. In this case, always accorded with value of a timer and occur INTRTC
interrupt if PAGER<ENAALM> is '1'.
Setting alarm min., alarm hour, alarm day and alarm the day week is done by writing in data at
each register of PAGE1.
When all setting contents accorded, RTC generates INTRTC interrupt, if PAGER<ENAALM>
is '1'. However, contents (don't care state) which does not set it up is considered to always
accord.
The contents, which set it up once, cannot be returned to don't care state in independence.
Initialization of alarm and resetting of alarm register are necessary.
The following is an example program for outputting alarm from /ALARM-pin at noon
(PM12: 00) every day.
(
When CPU is operated by high frequency oscillation, it may take a maximum of one clock
at 32 kHz (about 30us) for the time register setting to become valid. In the above example,
it is necessary to set 31us of set up time between setting the time register and enabling the
alarm register.
Note)
This set up time is unnecessary under SLOW mode or when you use only internal interruption.
(2) When output clock of 1Hz
RTC outputs clock of 1Hz to /ALARM pin by setting up PAGER<ENAALM>='0',
RESTR<DIS1HZ>='0', <DIS16HZ>='1'. And RTC generates INTRC interrupt by falling edge of
the clock.
(3) When output clock of 16Hz
RTC outputs clock of 16Hz to /ALARM pin by setting up PAGER<ENAALM>='0',
RESTR<DIS1HZ>='1', <DIS16HZ>='0'. And RTC generates INTRC interrupt by falling edge of
the clock.
LD
(PAGER), 09H
LD
(RESTR), D0H
LD
(MONTHR), 01H
LD
(HOURR), 12H
LD
(MINR), 00H
LD
(PAGER), 0CH
LD
(PAGER), 8CH
92CH21- 309
; Alarm disable, setting PAGE1
; Alarm initialize
; 24-hour clock mode
; setting 12 o'clock
; setting 00 min.
; Set up time 31us (Note)
; Alarm enable
; Interrupt enable )
TMP92CH21

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tmp92ch21fg

Table of Contents