效果截图,详细代码:
#include sbit dula=P2^6; //段码选通位-控制74HC573段输出sbit wela=P2^7; //位码选通位-控制74HC573位输出//sbit OE1=P2^6; //OE u8-573#define uchar unsigned char sbit simuseri_CLK=P2^4; //用P2^4模拟串口时钟sbit simuseri_DATA=P2^5; //用P2^5模拟串口数据sbit a7=ACC^7;#define uint unsigned int //unsigned char code tab[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f}; unsigned char code tab[]={0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80};unsigned char code digittab[41][8]={ {0xFE,0x10,0x10,0xFE,0x10,0x10,0x10,0xFE}, //0 {0x10,0xFE,0x92,0x92,0xFE,0x92,0x10,0x10}, //1 {0xFE,0x10,0x10,0xFE,0x10,0x10,0x10,0xFE}, //2 {0x00,0x6C,0x92,0x82,0x44,0x28,0x10,0x00}, //红心字符 {0x00,0x00,0x22,0x49,0x49,0x49,0x36,0x00}, //3 {0x00,0x00,0x0c,0x14,0x24,0x7f,0