persianboy62
New Member
Hello, I have a problem in PBP. I wants to assign a specific value of an array to a variable but this error is occured: "unable to fit variable c."
I just write the instruction bellow:
Trisa=%1111
Trisb=%00000000
c var byte
arr var byte[10]
arr[0]=$3f :arr[1]=$06 :arr[2]=$5b :arr[3]=$4f :arr[4]=$66
arr[5]=$6d :arr[6]=$7d :arr[7]=$07 :arr[8]=$ff :arr[9]=$6f
c=0
portb=$0
first:
if porta.0 then
portb=arr[c]
c=c+1
if c>9 then
c=0
endif
endif
goto first
end
please tell me how can I solve the problem.
I just write the instruction bellow:
Trisa=%1111
Trisb=%00000000
c var byte
arr var byte[10]
arr[0]=$3f :arr[1]=$06 :arr[2]=$5b :arr[3]=$4f :arr[4]=$66
arr[5]=$6d :arr[6]=$7d :arr[7]=$07 :arr[8]=$ff :arr[9]=$6f
c=0
portb=$0
first:
if porta.0 then
portb=arr[c]
c=c+1
if c>9 then
c=0
endif
endif
goto first
end
please tell me how can I solve the problem.