a problem in PBP

Status
Not open for further replies.

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.
 
at first glance i dont see anything wrong with that code

I use Proton, not pbp, but it's close enough

what device are you using?
 
I just compiled your code with no problem or errors.which version of pbp are you using and which pic chip?
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…