【文件属性】:
文件名称:8563参考程序时钟芯片
文件大小:5KB
文件格式:C
更新时间:2013-06-06 14:26:39
8563 8563参考程序 时钟芯片
include
#include
#define uchar unsigned char
#define uint unsigned int
#define shum P0
#define weix P2
uchar code tab[]={0xC0, //"0"
0xF9, //"1"
0xA4, //"2"
0xB0, //"3"
0x99, //"4"
0x92, //"5"
0x82, //"6"
0xF8, //"7"
0x80, //"8"
0x90, //"9"
0xff, //""
0x83, //"B"
0xC6, //"C"
0xA1, //"D"
0x86, //"E"
0x8E, //"F"
0x89, /*"H"*/};
uchar fan[6]={6,5,4,3,2,1};
uchar sj[3]={1,2,3};
uchar tiao=0;
uchar sans=0;
bit sso=1;
//*********i2c***********
sbit sda=P1^0;
sbit scl=P1^1;
sbit key1=P1^2;
sbit key2=P1^3;
sbit key3=P1^4;
//****************it0*****************
void it0() interrupt 1
{
TH0=0X3c;
TL0=0XB0;