摘要
提出了一种利用单片机GPIO口结构、二极管单向导电性以及电容充放电原理进行按键扩展的方案,详细叙述了其原理及整体设计,并给出主要软件程序.这种方案扩展了8个按键,但仅占用了MCU的2个GPIO口,大大节省了硬件资源.经实际验证,此按键扩展方案简单实用,特别适用于引脚较少功能且比较强大的MCU开发系统.
In this paper,a new interface extending scheme is proposed based on one-way electric conductivity of diode,capacitance charge-discharge principle and the structure of GPIO interface of MCU.Its principles and applications are described and the program is given.In this scheme extending 8 buttons only take 2 GPIO interface of MCU.Thus the hardware resources are saved greatly.Practice shows that this scheme is simple,practical and especially suitable for the MCU system which is powerful but has fewer pins.
出处
《宁波大学学报(理工版)》
CAS
2013年第2期59-63,共5页
Journal of Ningbo University:Natural Science and Engineering Edition
关键词
IO口
按键
单片机
电容
I/O interface
button
MCU
capacitance