首页 | 本学科首页   官方微博 | 高级检索  
     

基于I2C总线的单片机键盘控制电路设计与实现
引用本文:刘东,许自富.基于I2C总线的单片机键盘控制电路设计与实现[J].数字社区&智能家居,2007(20).
作者姓名:刘东  许自富
作者单位:解放军炮兵学院,安徽,合肥,230031 解放军炮兵学院,安徽,合肥,230031
摘    要:为减少单片机键盘控制占用口线过多的问题,本文介绍了基于12C总线结构的键盘控制方法,给出了硬件电路和软件代码.该方法只要占用单片机的三个口线即可实现对多达64个按键的控制,不但解决了当前单片机开发中遇到的口线不够用的问题,而且电路实现简单,同时采用中断的方式实现按键扫描码的读入,能直接读出按键扫描码,程序简单、易行.

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

Design on the Keyboard Controlling Circuits by Using the MCU Based on the I2C Bus
LIU Dong,XU Zi-fu.Design on the Keyboard Controlling Circuits by Using the MCU Based on the I2C Bus[J].Digital Community & Smart Home,2007(20).
Authors:LIU Dong  XU Zi-fu
Abstract: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.
Keywords:MCU  I2C bus  keyboard controlling  circuit design  
本文献已被 CNKI 维普 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号