#include <reg52.h>
typedef unsigned char uchar;
sfr P4=0xC0;
sfr P4SW=0xBB;
sbit inCLK = P4^4;
sbit inData = P4^5;
//FAN8200
sbit in1 = P3^2;
sbit in2 = P1^0;
sbit ce1=P1^1;
sbit ce2=P1^4;
sbit s1 = P3^6;
sbit s2 = P3^7;
int to0=0;
uchar count = 0;
uchar t0_cnt = 0;
int flag = 0;
int b=0;
int c=0;
uchar code tab[] = {0xC0,0xF9,0xA4,0xB0,0x99,0x92,0x82,0xF8,0x80,0x90};
init()
{
P4=0xFF;
P4SW=0x70;
TMOD = 0x11;
TH0 = 0x3C;
TL0 = 0xB0;
EA = 1;
TR0 = 1;
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余4页未读,立即下载
- 1
- 2
前往页