- 7
- 0
- 约4千字
- 约 9页
- 2020-07-04 发布于四川
- 举报
51单片机定时器秒表设计程序
#includereg51.h
typedef unsigned char UINT8;
typedef unsigned int UINT16;
code UINT8
SEGMENT[10] {0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,
0x90};
code UINT8 SHU[10]
{0x40,0x79,0x24,0x30,0x19,0x12,0x02,0x78,0x00,0x10};
code UINT8 SELECT[8]
{0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe};
#define S1 0x0e
#define S2 0x0d
#define S3 0x0b
#define S4 0x07
sbit SPEAK P3^5;
sbit P3_3 P3^3;
UINT8 mSecond,Second;
void Delay(UINT16 t)
{
UINT16 i,j;
for(i 0;it;i++)
for(j 0;j114;j++);
}
UINT8 Scankey(void)
{
UINT8
原创力文档

文档评论(0)