Contact us

A new window will open A new window will open

Notes on the real-time clock application

Product Types
TOSHIBA Microcontrollers TLCS- 870 Family TLCS- 870/C Series
  • TMP86FM26UG
  • TMP86C926XB  (emulation chip)

  We have found following restriction of the real-time clock application on the TMP86FM26UG and its emulator chip TMP86C926XB, one of the TLCS-870/C series microcontroller. If you need further information, please contact your local TOSHIBA sales representative.

[Restriction]

  In “NORMAL2” mode and the RTC source clock is fs (Low frequency Clock), the “INTRTC” interrupt latch “IL20” may not set correctly.

[Condition]

  If the rising edge of fc (High Frequency Clock) and the rising edge of fs (Low frequency Clock) are coincident when a timing of “INTRTC” (interrupt request) generation, the “INTRTC” (interrupt request) is not generated, as a result “IL20” (Interrupt latch) is not set.

[Recommended Countermeasures]

Following are example of how to avoid above mentioned problem:

  • 1.  Do not use “CYCINT” (4th and 5th bit of the “RTCCR1” register and the RTC interrupts (“IL20” and “EF20”). Instead, use other peripheral functions such as the timer/counter or time-base timer to generate required periodic interrupts.

Example: Using the time-base timer to generate an interrupt every second

; ####  Generate a TBT interrupt every second  ####

  LD    (TBTCR),0x18      ; DV7CK=1, TBTCK=000 (fs/215), TBTEN=1
  DI                                    ; Set interrupt master flag to disable interrupts.
  LD    (ILL),0xBF             ; Clear IL6.
  SET  (EIRL).6                 ; Enable INTTBT interrupt.
  EI                                     ; Set interrupt master flag to enable interrupts.

:     :     :     :     :     :

; ####  INTTBT interrupt sub-routine  ####

INTTBT:  *** Save register contents ***

:     :     :     :     :     :

*** Restore register contents ***

RETI

  • Do not use “CYCINT” (4th and 5th bit of the “RTCCR1” register and the RTC interrupts (“IL20” and “EF20”). Instead, connect “RTCOUT” and one of the external interrupt pins (“INT0” to “INT5”) externally to generate 1 second periodic interrupts.

Pin Connection Example

Example: Using the INT1 interrupt to update the LCD panel display every second

; ####  Port setting  ####

SET    (P2OUTCR).4            ; Set P24 port as CMOS output.

; ####  RTC setting  ####

LD    (RTCCR2),0x38           ; Initialize RTC and output pulse from RTCOUT pin.
LD    (RTCCR1),0x02           ; Set SCLOCK as fs.
LD    (RTREG1L),0x00         ; Set compare register.
LD    (RTREG1M),0x80
LD    (RTREG1H),0x00
SET  (RTCCR1).7                 ; Start RTC.

; ####  Generate an INT1 interrupt every second  ####

SET  (EINTCR).1                 ; Generate interrupt at rising edge of INT1 input.
DI                                          ; Set interrupt master flag to disable interrupts.
LD    (ILL),0xDF                  ; Clear IL5.
SET  (EIRL).5                       ; Enable INT1 interrupt.
EI                                          ; Set interrupt master flag to enable interrupts.
:     :     :     :     :     :

; ####  INT1 interrupt sub-routine  ####
INT1   : *** Save register contents ***

SET    (RTCCR1).0             ; THOLD=1

LOOP : TEST (RTCSR).0      ; Wait until TLOCK=1.

J         T, LOOP
LD     A,(SECR)                  ; Read data from second register.
*** LCD panel display processing, etc. ***
:     :     :     :     :     :
CLR      (RTCCR1).0           ;  ; THOLD=0
*** Restore register contents **

RETI

Contacts

If you have any queries, click one of these links:

Technical queries
Queries about purchasing, sampling and IC reliability
To Top
·Before creating and producing designs and using, customers must also refer to and comply with the latest versions of all relevant TOSHIBA information and the instructions for the application that Product will be used with or for.