English
Language : 

MC68HC908LJ24 Datasheet, PDF (229/464 Pages) Motorola, Inc – Microcontrollers
Real Time Clock (RTC)
Low-Power Modes
RTCWE_R EQU $40
...
RTC_WRTIE_PROTECT
...
;RTCCOMR register
BSET RTCWE1,RTCWE_R ;write %10
BSET RTCWE1,RTCWE_R ;write %10 again
To disable write-protect after write-protect is enabled execute the
following code:
RTCWE1 EQU 1
;RTCWE1 bit
RTCWE0 EQU 0
;RTCWE0 bit
RTCWE_R EQU $40
;RTCCOMR register
...
RTC_WRITE_ENABLE
BSET RTCWE1,RTCWE_R ;write %10 twice to
BSET RTCWE1,RTCWE_R ;ensure protected
...
BCLR RTCWE1,RTCWE_R ;write %00
BSET RTCWE0,RTCWE_R ;write %01
LDA RTCWE_R
ORA #%00000011
STA RTCWE_R
;write %11
BSET RTCWE1,RTCWE_R ;write %10
...
; Write-protect is disabled, RTC registers/bits can be written.
...
; Protect register/bits again after write access.
RTC_WRTIE_PROTECT
BSET RTCWE1,RTCWE_R ;write %10
BSET RTCWE1,RTCWE_R ;write %10 again
...
12.9 Low-Power Modes
The STOP and WAIT instructions put the MCU in low power-
consumption standby modes.
12.9.1 Wait Mode
The RTC module continues normal operation in wait mode. Any enabled
CPU interrupt request from the RTC can bring the MCU out of wait
mode. If the RTC is not required to bring the MCU out of wait mode,
power down the RTC by clearing the RTCE bit before executing the
WAIT instruction.
MC68HC908LJ24/LK24 — Rev. 2.1
Freescale Semiconductor
Real Time Clock (RTC)
Data Sheet
229