Thank You !
Unfortunately, my code it's a little ... special and this procedure dont work ...
My code :
Code:
Main:
;reading buttons on line 2
Portb.0 = 0
TrisA.1 = 1
pause 10
status_3 = PortA & 011100
Portb.0 = 1
TrisA.1 = 0
select case status_3
case 12
Gosub Starting ; this is "header"
Gosub Sursa ; ths is "body"
case 20
Gosub Starting ; this is "header"
Gosub VolUp ; this is "body", composed by Adresa + VolUp
case 24
Gosub Starting
Gosub VolDn
end select
Goto main
STARTING:
PORTB.4 = 0
pauseus 8400
PORTB.4 = 1
pauseus 4200
Return
ADRESA:
For i = 0 to 7
lookup2 i, [a,a,a,a,b,b,b,a], j
PORTB.4 = 0
PauseUs 526
PORTB.4 = 1
PauseUs j
next i
Return
VolUp:
GOSUB ADRESA
for i = 0 to 7
lookup2 i, [b,b,a,b,b,b,b,a], j
PORTB.4 = 0
PauseUs 526
PORTB.4 = 1
PauseUs j
next i
Pause 12
Return
Bookmarks