当前位置:网站首页>LCD1602显示按键位置
LCD1602显示按键位置
2022-07-15 23:15:00 【(王子变青蛙)】
单片机课程设计题二:LCD1602显示按键位置
(1)采用4*4矩阵键盘进行按键输入;
(2)使用LCD1602液晶显示屏显示按键位置
1、LCD1602显示屏可以进行两行显示,第一行可自行添加自己的名字学号等信息,第二行显示按键的位置。
2、部分程序:
#include<reg51.h>
#include"lcd.h"
#define GPIO_KEY P1
typedef unsigned int u16; //对数据类型进行声明定义
typedef unsigned char u8;
unsigned char KeyValue;
//用来存放读取到的键值
unsigned char KeyState;
//用来存放按键状态
unsigned char PuZh[]=" ming zi ";
unsigned char dat[]="123456789ABCDEF0";
void Delay10ms(); //延时50us
void KeyDown(); //检测按键函数
3、仿真效果展示:
lcd1602显示按键值
4、完成题目
按下第一个按键LCD1602显示屏显示1,按下第十个时采用十六进制显示A按下最后一个显示0,也可以根据情况自己调整按键位置。
5、QQ(1074237849)
边栏推荐
猜你喜欢

Information system project manager will recite the core examination site (43) expected monetary value (EMV)

Record the troubleshooting experience of a pit father memory leak

STL next_permutation() 函数的返回值探析

IDEA - Could not autowire. No beans of ‘XXXMapper‘ type found.

解决Google colab上安装GPU版本mxnet报错:libnvrtc.so.11.2: cannot open shared object file: No such file...
Zabbix+mysql fpmmm (MPM) monitoring

注册表实用技能【持续更新】

力扣练习——22 买卖股票的最佳时机

Ten minute quick learning flash framework

Original error was: DLL load failed while importing _ multiarray_ Umath: the specified module cannot be found
随机推荐
[MySQL must know and know] conditional statement
Question v: hannnnah_ j’s Biological Test
解决Google colab上安装GPU版本mxnet报错:libnvrtc.so.11.2: cannot open shared object file: No such file...
编程语言学习和使用的观点
[unity3d] slider of ugui
C语言 sizeof 和strlen 的用法和区别
Redis宕机日志分析
Ethernet development and testing, have you done this step right (3)
skywalking测试环境部署实战
CENTOS 安装MySQL
class path resource [xxx.properties] cannot be opened because it does not exist
Algorithm In Interview
STL next_ Analysis of the return value of permutation() function
Sélection de nouvelles fonctionnalités pour la version PHP - PHP 8.0x
【vulnhub】DC9
金融行业开放平台
Excerpt of new features in PHP version - php7.1x
IP静态路由综合实验
从红魔7S系列看游戏手机的自驱进化
力扣练习——15 接雨水