Red de conocimiento informático - Material del sitio web - Pantalla de reloj en tiempo real RTC basada en AT59S52 y PCF8563.

Pantalla de reloj en tiempo real RTC basada en AT59S52 y PCF8563.

#include

#include

//include "iic.c"

#define uint unsigned int

#define uCHAR unsigned CHAR

sbit SDA=P3^1;

sbit SCL=P3^0;

código uCHAR shu1[] ={0xfd,0x61,0xbb,0xeb,0x67,0xcf,0xdf,0xe1,0xff,0xef ,0xa7,0xf5,0x97,0x03};

datos uCHAR dingshi[]={0x00,0x03,0x00 ,0x02};

uCHAR datos xian[]={0x00,0x00,0x00,0x00};

uCHAR k[] ={0x00};

uCHAR a1=0x00,a3=0;

bit a2;

uCHAR idata rd[3]={0x01,0xa0,0xa1}; wr[3]={0x01,0xa0,0xa1};

uCHAR TEMP[5]={0x00,0x00,0x00,0x00,0x00}

uCHAR n=0;

retraso nulo(uint x);

void sta();

parada nula()

void mack();

void mnack();

void cack();

void wrbyt(uCHAR shu

void wrbyt0();

void wrbyt1();

uCHAR rdbyt();