基于I2C总线的单片机键盘控制电路设计与实现  被引量:5

Design on the Keyboard Controlling Circuits by Using the MCU Based on the I2C Bus

在线阅读下载全文

作  者:刘东[1] 许自富[1] 

机构地区:[1]解放军炮兵学院,安徽,合肥,230031 解放军炮兵学院,安徽,合肥,230031

出  处:《电脑知识与技术(过刊)》2007年第20期425-426,共2页Computer Knowledge and Technology

摘  要:为减少单片机键盘控制占用口线过多的问题,本文介绍了基于12C总线结构的键盘控制方法,给出了硬件电路和软件代码.该方法只要占用单片机的三个口线即可实现对多达64个按键的控制,不但解决了当前单片机开发中遇到的口线不够用的问题,而且电路实现简单,同时采用中断的方式实现按键扫描码的读入,能直接读出按键扫描码,程序简单、易行.To reduce the number of the MCU's ports which are used to control the keyboard, this paper introduces a way to control the keyboard based on the I2C bus, submits the circuit design and the program codes. In this way, we can control the 64 keystrokes only by using 3 ports, the problem that the ports are not enough in the circuit design is resolved, and the circuit is easy to design, at the same time, we adopt the interrupt way to read the key-press codes straightly, the program codes are easy and feasible.

关 键 词:单片机 12C总线 键盘控制 电路设计 

分 类 号:TP368[自动化与计算机技术—计算机系统结构]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象