Jump to content
ELFORUM - Forumul electronistilor

Verificare cate apasari de buton sunt in 4 secunde


critix

Recommended Posts

  • Replies 2
  • Created
  • Last Reply

Salut!

 

Se poate face in multe moduri, depinde de situatie.

Incearca asa:

(buton pe RB0, iesire pe RB1)

dim i as byteconst interv=4 as byte ; interval [secunde]...if Button(PORTB,0,100,0) then         ; daca a fost apasat butonul   for i=0 to interv*10               ; asteapta max 4 sec       Delay_ms(100)                  ; pentru       if (RB0_Bit=0) then            ; a doua apasare, si          RB1_Bit=1                   ; activeaza iesirea          break      end if  next i                                ; expirare perioadaend if
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.




×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.Terms of Use si Guidelines