Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.
 
I just compiled your code with no problem or errors.which version of pbp are you using and which pic chip?
 
persianboy62 said:
Hello, I have a problem in PBP.

Your code works OK for me, too.
I have PBP 2.46.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top