51单片机计数器控制LED亮灭,但是接P3.4的按键必须拔下来一次,再按才有...答:计数器是对脉冲进行计数,在脉冲的下降沿进行计数,脉冲,楼主应该明白吧,就是高低电平不断变化的,在由高电平变成低电平的时候,则计数一次,直到再次检测到下降沿.而你按键按下之后,P3.4就一直是低电平了,没有下降沿出现,所以就不计数.你得反复按.按下,松开,再按下,再松开,这样才能让计数器计数,才能...
51单片机,要求是让流水灯正常运行,要求是数码管显示学号流水灯运行,然 ...答:include "AT89X52.h"#include "intrins.h"define LEG_LINE P2#define LEG_DUAN P0 sbit Button = P3^7;unsigned long dispalyCount;unsigned int mCount;unsigned char table[] = {0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e};void ...