FRMD KL25Z <=i2c=> NXP PCF8563 (RTC) FRMD KL25Z SPI=> MCP23S17 => (GLCD) T6963C FRMD KL25Z Tsi => 3 button : <--> <enter> <++> FRMD KL25Z => Bip()

Dependencies:   TSI mbed

Fork of RTC8564NB_Clock by masa miya

main.cpp

Committer:
szjenter
Date:
2014-05-14
Revision:
2:c271f83a69e4
Parent:
1:7c1d3790f08d

File content as of revision 2:c271f83a69e4:

#include "mbed.h"
#include "GLCD_spi.h"
#include "TouchMenu.h"
#include "RTC.h"




//char buffer[12];
int m_value,b;
//-------------------------------------------------
void Start(){
    SPI_init();
    lcd_init();
    
    K_LED=1;
    Z_LED=1;
    P_LED=1;
    lcd_cls();
    lcd_string(2,6,"RTC Start");
    Bip(2,3);       // 1 kHz * freki, 0.1 s * time
    //rtc_reset();
    rtc_data_set();
    lcd_cls();
    //a=0;
    b=0;
}
//-------------------------------------------------
    
int main() {
    Start();
    //rtc_reset();
    while(1){
        rtc_data_read();
        if(sec != b){
            //Bip(1,1);
            b=sec;
            Z_LED =0;
            wait(.1);
            Z_LED=1;
        }
    }
    //for(;;){}

}