资源简介
用KEIL调试过的,非常准确,PROTEUS实现的硬件仿真
代码片段和文件信息
#include“reg52.h“
#include“intrins.h“
#define ad_con P2
#define addata P0
#define Disdata P1
#define uchar unsigned char
#define uint unsigned int
//sbit button_C=P2^7;
sbit ALE=P2^3;
sbit START=P2^4;
sbit OE=P2^5;
sbit EOC=P2^6;
sbit AddA=P2^0;
sbit AddB=P2^1;
sbit AddC=P2^2;
bit keynum;
bit keyon;
unsigned char add_howl;
uchar code dis_7[11]={0x3f0x060x5b0x4f0x660x6d0x7d0x070x7f0x6f};
/*共阳7段LED断码表 “0”,“1”,“2”,“3”,“4”,“5”,“6”,“7”,“8”,“9”,“不亮”*/
uchar code scan_con[4]={0xfe0xfd0xfb0xf7}; //4位列扫描控制字
uchar data ad_data; //定义数据内存单元
uint data dis[5]={0x000x000x000x000x00};
uchar ledcode[4];
uint nm; //定义4个显示数据单元和1个数据占存单元
/********************1ms延时子函数*************/
/*delay1ms(uint t)
{
uin
评论
共有 条评论