Shayven 發(fā)表于 2019-6-17 11:54
if(K1==0) KEY=1;
if(K1==0) KEY=2;
if(K1==0&&K2==0) KEY=3;
電子菜 發(fā)表于 2019-6-17 10:51
if(k1==0) //檢測(cè)按鍵K1是否按下
{
delay(1000); ...
18796492606 發(fā)表于 2019-6-17 14:56
void keypros()
{
if(k1==0) //檢測(cè)按鍵K1是否按下
quanquan12 發(fā)表于 2019-6-18 16:21
if(k1==0&&k2==0) led=~led; 主體內(nèi)容就就是這樣,加多一條就可以實(shí)現(xiàn)了
18796492606 發(fā)表于 2019-6-17 14:52
#include "reg52.h"
typedef unsigned int u16; //對(duì)數(shù)據(jù)類型進(jìn)行聲明定義
suncat0504 發(fā)表于 2019-6-18 21:14
我的記憶中,消抖處理一般是20ms。
18796492606 發(fā)表于 2019-6-17 14:52
#include "reg52.h"
typedef unsigned int u16; //對(duì)數(shù)據(jù)類型進(jìn)行聲明定義
歡迎光臨 (http://www.torrancerestoration.com/bbs/) | Powered by Discuz! X3.1 |