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.

Bank Bit Error

Status
Not open for further replies.

Kane2oo2

New Member
ive just created a program

but when i try to assemble i get this error message

: Register in operand not in bank 0. Ensure that bank bits are correct.

however i have read the other posts where it says to put

errorlevel -302

and that seems to solve the problem and the pic works fine

why are these error messages created if the program still works with them?

Kane
 
The message you're referring to is just a warning message and not quite an error message. It basically tells you to be sure you've selected the right bank before accessing the register. For example before accessing TRIS registers (in bank 1) you have to set RP0 in STATUS register. Of course you have to reset it afterwards (and for this you don't get a warning).

The assembler will put up this warning for each access to a register that's not in bank 0, unless you tell it to shut up (by setting the errorlevel).

BR
 
thanks

i just have one other question

when you set RP0 it seems to have the same value as PORTA?
how can this be

RP0 equ 05h
PORTA equ 05h

Kane
 
RP0 is bit 5 in the File STATUS
PORTA is mapped on adress 5 in the data memory

So yes, the number is the same. The context in wich it is used isn't
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top