I also agree with the multiple equal stuff. I see some others too
it's probably an copy/paste error but
Code:
trisb = %00000000 ‘ Set portB to outputs for 7 seg display trisa = %1111‘ ‘ Set Port A2 -7 to digital inputs to read
cmcon = 7 ‘ switches and A0 –A1 to outputs to
‘ multiplex 7 seg display
should be
Code:
TRISB=0 ' set PORTB as output
TRISA=%11111100 ' Set Port A2 -7 to digital inputs to read
' switches and A0 –A1 to outputs to multiplex 7 seg display
CMCON=7 ' disable analog pins on PORTA
this
Code:
poke porta,%11111101 ' Turn on tens digit
pause 1 ' Leave it on for 1 ms
poke porta,%11111111 ' Turn off digit to prevent ghosting
can be replace to
Code:
PORTA.1=0 ' Turn on tens digit
pause 1 ' Leave it on for 1 ms
PORTA.1=1 ' Turn off digit to prevent ghosting
And maybe.. maybe, some variable name u r using are already use in PBP assembler rouines... i'm not sure of inc,w1,b0,A
about this one
Code:
if nomsel > maxno then nomsel = nomsel -inc * 5
depending of you math priority.. safer if you use some ()
Code:
if nomsel > maxno then nomsel = nomsel - ( inc * 5 )
about this one
Code:
Lookup b0,[$40,$79,$24,$30,$19,$12,$02,$78,$00,$18],b0
not sure if it's working to look into b0 and return into b0.. maybe yes, maybe no. try
Code:
Lookup b0,[$40,$79,$24,$30,$19,$12,$02,$78,$00,$18],b1
b0=b1
one last, your appostroph is not the good character must be ' instead of ‘
that's a big big big difference or you can use ; instead
Bookmarks