Untitled
Guest 98 7th Nov, 2024
DDRA=&b11111111
DDRB=&b1011
PORTB=&b0011
PORTA=0
MCUCR.1=1
SREG.7=1
GIMSK.6=1
DIM tmp as Integer
ON INT0 bass
DO
IF tmp=0 THEN
PORTA=&b10101010
waitms 100
tmp=tmp+1
ELSE
IF tmp=1 THEN
PORTA=&b00001111
waitms 100
tmp=tmp+1
ELSE
IF tmp=2 THEN
PORTA=&b01100000
waitms 100
tmp=tmp+1
ELSE
PORTA=0
ENDIF
ENDIF
ENDIF
rem PORTB=&b0010
rem wait 1
rem PORTB=&b0001
rem wait 1
rem IF PINB.2 = 1 THEN
rem tmp=tmp
rem ENDIF
rem IF tmp = 1 THEN
rem PORTB.0=1
rem PORTB.1=0
rem ELSE
rem PORTB.1=1
rem PORTB.0=0
rem ENDIF
rem wait 1
LOOP
END
bass:
tmp=0
PORTA=&b10101000
waitms 10
return
rem koniec programu bassa komputera
To share this paste please copy this url and send to your friends
RAW Paste Data