内容简介:使用外部中断,如果是51单片机,使用外部中断,这三个键都接到中断上,外部中断引脚是P3.2,按键按下时低电平传入外部中断,这三个按键再分别接三个引脚,比方说P2.0,P2.1,P2.2,按键消抖会吧。在中断内部判断P2. // 51单片机控制八个发光二极管 左右循环。include define uchar unsigned char define uint unsigned int...
用户评论
havenhome