当前位置: 首页 > article >正文

STM32 4X4 键盘

/*****STM32 PCB小板测试中景园库函数改寄存器程序 PAST2022 4 30****/ 
/***2019 11 30 PCB板测试  4X4  键盘PAST   ***/   
/***Program Size: Code=4280 RO-data=5000 RW-data=804 ZI-data=516   */           
                    #include "stm32f10x.h"   //计数 按键号 画矩形 圆圈 中文字体
              #include "sys.h"
              #include "usart.h"        
              #include "delay.h"    
              #include "led.h" 
              #include "key.h"     
                    const u8 image[]={ /* 0X00,0X10,0X28,0X00,0X28,0X00,0X01,0X1B,*/
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XBE,0XF7,0X7D,0XEF,
0XBA,0XD6,0XB6,0XB5,0XF3,0X9C,0XB2,0X94,0XB3,0X9C,0XB2,0X94,0X34,0XA5,0XF7,0XBD,
0XFB,0XDE,0X7D,0XEF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XBE,0XF7,0XFB,0XDE,0XF3,0X9C,0XCB,0X5A,
0XC7,0X39,0X04,0X21,0X82,0X10,0X42,0X10,0X42,0X10,0X41,0X08,0X83,0X18,0X45,0X29,
0XC7,0X39,0X0C,0X63,0X75,0XAD,0X3C,0XE7,0XBE,0XF7,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0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FA,0X82,0XE8,0X82,0XB0,0X45,0X69,0XC7,0X51,0X08,0X42,0X08,0X3A,
0X86,0X5A,0X83,0X9B,0XA2,0XBC,0X22,0XCD,0X21,0XCD,0XA1,0XC4,0X22,0XB4,0XC4,0X7A,
0X06,0X3A,0X86,0X29,0X45,0X29,0X05,0X31,0XC4,0X50,0X41,0X90,0X00,0XC0,0X00,0XA8,
0X00,0XA0,0X00,0XA8,0X00,0X30,0X4A,0X4A,0XBA,0XD6,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0X7D,0XEF,0X8E,0X73,0XC3,0X18,0X05,0X39,0X82,0XA8,0X00,0XF8,
0XC3,0XF8,0X4D,0XFB,0X4D,0XFB,0XC7,0XF9,0XC3,0XF0,0X82,0XD8,0XC3,0XB0,0X04,0X81,
0X45,0X61,0X46,0X51,0X86,0X49,0X86,0X49,0X46,0X41,0X45,0X41,0X45,0X41,0X45,0X41,
0X05,0X49,0X04,0X61,0X82,0X90,0X41,0XB0,0X00,0XD0,0X00,0XC8,0X00,0XA8,0X00,0XA8,
0X00,0XB8,0X41,0X58,0X82,0X10,0X82,0X10,0XB2,0X94,0XBE,0XF7,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XBE,0XF7,0XCF,0X7B,0X82,0X10,0X04,0X21,0X86,0X29,0X86,0X41,0X04,0X99,
0X40,0XE8,0X41,0XF8,0X86,0XF9,0XCB,0XFA,0X49,0XFA,0X82,0XF8,0X00,0XF8,0X00,0XF0,
0X00,0XE8,0X41,0XD8,0X41,0XD0,0X41,0XC0,0X41,0XC0,0X41,0XC0,0X41,0XC0,0X41,0XC8,
0X00,0XD0,0X00,0XE0,0X00,0XE0,0X00,0XD8,0X00,0XD0,0X00,0XB8,0X00,0XA8,0X41,0X88,
0X82,0X48,0X82,0X10,0X82,0X10,0X00,0X00,0X45,0X29,0X79,0XCE,0XFF,0XFF,0XFF,0XFF,
0XBE,0XF7,0XF3,0X9C,0X82,0X10,0XC3,0X18,0X45,0X29,0X86,0X31,0XC7,0X31,0X30,0X7C,
0XF3,0XDC,0X86,0XE1,0X00,0XF0,0X00,0XF8,0X41,0XF8,0X41,0XF8,0X00,0XF8,0X00,0XF8,
0X00,0XF8,0X00,0XF8,0X00,0XF8,0X00,0XF8,0X00,0XF8,0X00,0XF8,0X00,0XF8,0X00,0XF8,
0X00,0XE8,0X00,0XE0,0X00,0XE0,0X00,0XD8,0X00,0XC8,0X41,0XA0,0X8A,0X9A,0X0C,0X63,
0X04,0X11,0X82,0X10,0X82,0X10,0X41,0X08,0X00,0X00,0X4D,0X6B,0X7D,0XEF,0XFF,0XFF,
0XFB,0XDE,0X08,0X42,0X42,0X10,0X45,0X29,0X86,0X31,0X86,0X31,0X49,0X4A,0X38,0XBE,
0XFF,0XFF,0X38,0XD6,0X86,0XA9,0X00,0XC8,0X00,0XE0,0X00,0XF0,0X00,0XF8,0X00,0XF8,
0X00,0XF8,0X00,0XF8,0X00,0XF8,0X00,0XF8,0X00,0XF8,0X00,0XF8,0X00,0XF0,0X00,0XF0,
0X00,0XE8,0X00,0XE0,0X00,0XD0,0XC3,0X98,0X8A,0X8A,0XB2,0XA4,0XBA,0XC6,0XF7,0XB5,
0X08,0X42,0X41,0X08,0X82,0X10,0X41,0X08,0X00,0X00,0X45,0X29,0XF7,0XBD,0XFF,0XFF,
0X71,0X8C,0X41,0X08,0X04,0X21,0X45,0X29,0X86,0X31,0X86,0X31,0X0C,0X63,0X3C,0XE7,
0XFF,0XFF,0X79,0XD6,0X46,0XB9,0X00,0XE0,0X42,0XC8,0X82,0XA8,0X82,0XB0,0X41,0XD8,
0X82,0XE8,0X82,0XF0,0X41,0XE8,0X41,0XE8,0X41,0XE8,0X41,0XF0,0X41,0XE8,0X41,0XD8,
0X04,0XC1,0X08,0X92,0X4D,0X8B,0X34,0XA5,0XFB,0XC6,0XFB,0XD6,0XBA,0XCE,0X3C,0XE7,
0X30,0X84,0XC3,0X18,0X41,0X08,0X41,0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F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
};
              const u8 disdt[]={48,49,50,51,52,53,54,55,56,57};
                    u8 l,m,n;
                    u8 i;
                    u8 ref=0;//刷新显示
              u16 vx=15542,vy=11165;  //比例因子,此值除以1000之后表示多少个AD值代表一个像素点
              u16 chx=140,chy=146;//默认像素点坐标为0时的AD起始值
              void xianshi()//显示信息
               {   
                 BACK_COLOR=WHITE;
                 POINT_COLOR=RED;    
                 showhanzi(10,0,0);        //汉
                 showhanzi(45,0,1);        //字
                  showhanzi(80,0,2);        //显
                 showhanzi(115,0,3);       //示
                 showhanzi(150,0,4);       //测
                       showhanzi(185,0,5);       //试
               LCD_ShowString(10,35,"2.4 TFT SPI 240*320");
               LCD_ShowString(10,55,"LCD_W:");LCD_ShowNum(70,55,LCD_W,3);
                 LCD_ShowString(110,55,"LCD_H:");LCD_ShowNum(160,55,LCD_H,3);
                       LCD_ShowString(10,75,"2022 4 30");
                 }
              void showimage() //显示40*40图片
               {
                  int i,j,k; 
                for(k=3;k<8;k++)
                  {
                      for(j=0;j<6;j++)
                      {    
                       Address_set(40*j,40*k,40*j+39,40*k+39);        //坐标设置
                      for(i=0;i<1600;i++)
                        {     
                          LCD_WR_DATA8(image[i*2+1]);     
                          LCD_WR_DATA8(image[i*2]);                
                        }    
                     }
                  }
                 ref=0;                
               }
/*********************************************/                             
              int main(void)
              {                                  
                u8 t;      
                Stm32_Clock_Init(9);               //系统时钟设置
                delay_init(72);                       //延时初始化 
                LED_Init();                               //初始化与LED连接的硬件接口
                    Lcd_Init();                               //初始化与LCD连接的硬件接口
                KEY_Init();                        //初始化与按键连接的硬件接口
                    LCD_Clear(WHITE);                  //清屏
                 BACK_COLOR=BLACK;;POINT_COLOR=WHITE; 
              xianshi();                         //显示信息
              showimage();                       //显示40*40图片
                    KeyOut0=1;
                    KeyOut1=1;
                    KeyOut2=1;
                    KeyOut3=1;
                for(t=0;t<3;t++)                       //上电闪烁3次
               {
               LED2=0;
                 LED3=0;
                 LED4=0;
                     LED5=0;
               delay_ms(800);
                 LED2=1;
                 LED3=1;
                 LED4=1;
                     LED5=1;
                 delay_ms(800);
                }
              //showhanzi(unsigned int x,unsigned int y,unsigned char index)    
                    showhanzi(80,90,1);
                    delay_ms(800);    
              while(1)                   //循环检测按键
                {    
//           #define      KeyInt0 PAout(1)//  PA1     小按键复用
//           #define      KeyInt1 PAout(5)//  PA5     小按键复用
//           #define      KeyInt2 PAout(6)//  PA6     小按键复用
//           #define      KeyInt3 PAout(7)//  PA7     小按键复用
//           #define      KeyOut0 PBout(0)//  PB0     输出阵列
//           #define      KeyOut1 PBout(1)//  PB1     输出阵列
//           #define      KeyOut2 PBout(10)// PB10 输出阵列
//           #define      KeyOut3 PBout(11)// PB11 输出阵列 
/*****第一行*****/                                
                     KeyOut0=0;
                     if(KEY0==0)
                     {
                     i=1;
                     LCD_Show2Num(60,100,i,2);
                     }
                     if(KEY1==0)
                     {
                     i=5;
                     LCD_Show2Num(60,100,i,2);
                     }
                     if(KEY2==0)
                     {
                     i=9;
                     LCD_Show2Num(60,100,i,2);
                     }
                     if(KEY3==0)
                     {
                     i=13;
                     LCD_Show2Num(60,100,i,2);
                     }
/*****第二行*****/                             
                     KeyOut0=1;
                     KeyOut1=0;
                     if(KEY0==0)
                     {
                     i=2;
                     LCD_Show2Num(60,100,i,2);
                     }
                     if(KEY1==0)
                     {
                     i=6;
                     LCD_Show2Num(60,100,i,2);
                     }
                     if(KEY2==0)
                     {
                     i=10;
                     LCD_Show2Num(60,100,i,2);
                     }
                     if(KEY3==0)
                     {
                     i=14;
                     LCD_Show2Num(60,100,i,2);
                     }
/*****第三行*****/                             
                     KeyOut1=1;
                     KeyOut2=0;
                     if(KEY0==0)
                     {
                     i=3;
                     LCD_Show2Num(60,100,i,2);
                     }
                     if(KEY1==0)
                     {
                     i=7;
                     LCD_Show2Num(60,100,i,2);
                     }
                     if(KEY2==0)
                     {
                     i=11;
                     LCD_Show2Num(60,100,i,2);
                     }
                     if(KEY3==0)
                     {
                     i=15;
                     LCD_Show2Num(60,100,i,2);
                     }
/*****第四行*****/                             
                     KeyOut2=1;
                     KeyOut3=0;
                     if(KEY0==0)
                     {
                     i=4;
                     LCD_Show2Num(60,100,i,2);
                     }
                     if(KEY1==0)
                     {
                     i=8;
                     LCD_Show2Num(60,100,i,2);
                     }
                     if(KEY2==0)
                     {
                     i=12;
                     LCD_Show2Num(60,100,i,2);
                     }
                     if(KEY3==0)
                     {
                     i=16;
                     LCD_Show2Num(60,100,i,2);
                     }
                     KeyOut3=1;
                }     
             }


http://www.kler.cn/a/392436.html

相关文章:

  • 标准C++ 字符串
  • MySQL系列之如何在Linux只安装客户端
  • quartz
  • 豆瓣均分9:不容错过的9本大模型入门宝藏书籍,非常详细收藏我这一篇就够了
  • Blender进阶:图像纹理节点和映射节点
  • Springboot集成syslog+logstash收集日志到ES
  • Elasticsearch常用接口_添加数据
  • 会议直击|美格智能受邀出席第三届无锡智能网联汽车生态大会,共筑汽车产业新质生产力
  • 一生一芯 预学习阶段 NEMU代码学习(2)
  • C++总结
  • 【AI大模型】ELMo模型介绍:深度理解语言模型的嵌入艺术
  • Git - 命令杂谈 - reset、revert和clean
  • 容器docker的ulimit
  • 设备接入到NVR管理平台EasyNVR多品牌NVR管理工具/设备的音视频配置参考
  • Redis相关技术内容
  • 一条SQL查询语句的执行流程(MySQL)
  • 微信小程序进行md5加密 ,base64 转码
  • nuxt3添加wowjs动效
  • mysql 实现分库分表之 --- 基于 MyCAT 的分片策略详解
  • windows中docker安装redis和redisinsight记录
  • 什么时候用 Tailwind 什么时候用 CSS
  • 第 8 章 - Go语言 数组与切片
  • 大语言模型安全威胁
  • [Docker#3] LXC | 详解安装docker | docker的架构与生态
  • Three.js 纹理与网格的优化
  • Linux将二进制软件包编译成rpm软件包教程详解