#include <STC12C5A60S2.H>
#include <intrins.h>
#define ulong unsigned long
#define uint unsigned int
#define uchar unsigned char
#define NOP4 _nop_();_nop_();_nop_();_nop_()
#define CHAR 0xab
#define ES_ON AUXR |= 0x10; ES=1
#define ES_OFF AUXR &= 0xEF; ES=0
#include "zimo2.h"
#include "DS3231 + AT24C32.h" // μ¼èëDS3231 + AT24C32Çy¶ˉ3ìDò
sbit KEYS=P2^0; //μ÷Õû¼ü£¬°′ò»′ÎéèÖÃ×′ì¬Î»¼ó1,ÂÖá÷ÇD»»μ½éèÖÃÄê,ÔÂ,èÕ,ê±,·Ö,Ãë,DÇÆú,Õy3£×′ì¬.
sbit KEYA=P2^1; //¼óò»¼ü£¬ÔúéèÖÃ×′ì¬ê±°′ò»′ÎÏàó|éèÖÃλ¼ó1
sbit KEYD=P2^2; //¼õò»¼ü£¬ÔúéèÖÃ×′ì¬ê±°′ò»′ÎÏàó|éèÖÃλ¼õ1
sbit KEYM=P2^3; //ÏÔê¾Ä£ê½¼ü£¬ÔúéèÖÃèyDD»ò¶tDDÏÔê¾
uchar MODE=0; //ÏÔê¾Ä£ê½Ö¸ê¾£¬0Îa¶tDDÏÔê¾£¬1ÎaèyDDÏÔê¾
#include <set.h> //¼ü¿Øéèê±¼äí·Îļt
//Ô-3ìDòÖDμÄáa½ó
sbit G1=P0^4;
sbit G2=P0^5;
sbit R1=P2^6;
sbit R2=P2^7;
sbit LS=P0^6;
sbit CK=P0^7;
sbit OE=P2^5;
sbit IA =P0^0; //DD¿ØÖÆÏßA
sbit IB =P0^1; //DD¿ØÖÆÏßB
sbit IC =P0^2; //DD¿ØÖÆÏßC
sbit ID =P0^3; //DD¿ØÖÆÏßD
#define ABCD P0 //ABCD½óμ½P2.0-P2.3
#define scan0 {IA=0;IB=0;IC=0;ID=0;}
#define scan1 {IA=1;IB=0;IC=0;ID=0;}
#define scan2 {IA=0;IB=1;IC=0;ID=0;}
#define scan3 {IA=1;IB=1;IC=0;ID=0;}
#define scan4 {IA=0;IB=0;IC=1;ID=0;}
#define scan5 {IA=1;IB=0;IC=1;ID=0;}
#define scan6 {IA=0;IB=1;IC=1;ID=0;}
#define scan7 {IA=1;IB=1;IC=1;ID=0;}
#define scan8 {IA=0;IB=0;IC=0;ID=1;}
#define scan9 {IA=1;IB=0;IC=0;ID=1;}
#define scan10 {IA=0;IB=1;IC=0;ID=1;}
#define scan11 {IA=1;IB=1;IC=0;ID=1;}
#define scan12 {IA=0;IB=0;IC=1;ID=1;}
#define scan13 {IA=1;IB=0;IC=1;ID=1;}
#define scan14 {IA=0;IB=1;IC=1;ID=1;}
#define scan15 {IA=1;IB=1;IC=1;ID=1;}
bit SHAN; //éá˸±ê־λ,
uchar TC=0,TC1=0; //Ñóê±¼ÆêyóÃ
uchar con=1; //Ãë¼ÆêyÆ÷,óÃóú1.5ÃëÂÖÏÔ1«Å©àúèÕÆú,·Öê±ÏÔê¾1«Å©àú
uchar CKTIME_1=0; //ê±¼ä¿ìÂyμ÷Õû±êÖ¾
sbit GPS_POW=P3^6; //gpsμçÔ′¿ØÖÆ
uchar data row; //DDé¨Ãè±äá¿
uchar data RD1[8]; //êy¾Y»o′æ
uchar data GD1[8];
|