' PİC16F84A İÇİN
' BUTONLAR PORTA 0 VE 1 DE BAĞLI
' LED PORTB 0 DA BAĞLI
b1 var byte
b2 var byte
trisa = 255
trisb = 0
b1 = 0
b2 = 0
portb = 0
basla:
if b1 = 0 then
if porta.0 = 1 then
b1 = 1
toggle portb.0
endif
endif
if porta.0 = 0 then
b1 = 0
endif
if b2 = 0 then
if porta.1 = 1 then
b2 = 1
toggle portb.0
endif
endif
if porta.1 = 0 then
b2 = 0
endif
goto basla
END
bu kodları dene