Rtc .C - Fujitsu MB2146-450-E Setup Manual

F2mc-8fx mb95f310 series 8-bit microcontroller
Hide thumbs Also See for MB2146-450-E:
Table of Contents

Advertisement

4.2.7 RTC .c

In this function, we should initialize clock register, start time base timer, set display value for
LCD and set condition to enter standby mode
Following table describes the LCD library:
Function Name
void TBT_Init(void)
__interrupt void TBT_Inter (void)
void STB_Mode_Set(void)
Following table describes how to use these functions.
Type
Enable RTC
TBT_Init();
TBT_Init();
PraBli.Bli_6 = 0x01;
PraBli.Bli_7 = 0x00;
Set standby time
PraBli.Bli_8 = 0x00;
PraBli.Bli_9 = 0x02;
PraBli.Bli_a = 0x06;
STB_Mode_Set();
EXT_Init();
TBT_Init();
PraBli.Bli_6 = 0x01;
PraBli.Bli_7 = 0x00;
Standby and
Wake up
PraBli.Bli_8 = 0x00;
PraBli.Bli_9 = 0x02;
PraBli.Bli_a = 0x06;
STB_Mode_Set();
MB2146-450-E Setup Guide
Chapter 4 Sample Code Manual
Initializes time base timer
Time base timer interrupt for 0.35ms arrived
Set standby time
Example
Operation
MCU-AN-500072-E-10 – Page 34
Description
Return
Sets interval time
PraBli.Bli_6 is hour,
PraBli.Bli_7 and PraBli.Bli_8 are
minute,
PraBli.Bli_9 and PraBli.Bli_a are
second.
In this example setting after 1hour
26seconds the system will standby
Press "wakeup" key system wake
up

Advertisement

Table of Contents
loading

Table of Contents