基于51单片机的PS2键盘1602显示24c02存储的密码锁设计(附程序)(10)

2020-12-16 13:08

/*********************************************************************************************/

#include<reg52.h>

#include<stdio.h> //标准输入输出 #include<intrins.h> #define uchar unsigned char #define uint unsigned int sbit scl=P3^6; sbit sda=P3^7; sbit fmq=P1^7; sbit RS=P1^0; //Pin4 sbit E =P1^1; //Pin6

#define Data P0//数据端口

sbit Key_Data=P3^3; //定义Keyboard引脚 sbit Key_CLK =P3^2; //使用中断 bit BF;

bit Shift; //定义上档键标志 bit Key_UP; //定义通码断码标志 unsigned char KeyV; unsigned char IntNum; unsigned char DisNum; char code cs[]="new mima"; char code sr[]="enter mima"; char code f[]="Data Error"; static uchar data csmm[20];

static uchar data srmm[20];

static int t1=1,t2=1,t3=1,t4=1,t5=1,t6=1,num=0; void DelayUs(unsigned char us) { unsigned char uscnt;

//微秒延时函数

//24c02时钟线接口 //24c02数据线接口

uscnt=us>>1; /*12MHz频率*/ while(--uscnt);

// 毫秒函数声明

}

void DelayMs(unsigned char ms) {

while(--ms)

{

DelayUs(250); DelayUs(250); DelayUs(250); DelayUs(250);

} }

void delay()


基于51单片机的PS2键盘1602显示24c02存储的密码锁设计(附程序)(10).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:短信群发有什么技巧?

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: