Osccal help - PIC

Hi,

I'm getting a compile message [302] saying that:

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

BSF STATUS, RP0 ; Bank 1 CALL 3FFh ; Get Calibration Value MOVWF OSCCAL ; Store Value BCF STATUS, RP0 ; Bank 0

I'm using a 12F629 PIC, and these lines of code are straight out of the data sheet page 54

Could someone please point out where I'm going wrong

Thanks

--
             --dave

                 news001@nospam.org.uk
Reply to
Dave
Loading thread data ...

It's a warning message. Very annoying. If you're sure you have the bank setup right, ignore it.

Reply to
Gary Kato

Yes very annoying, it's about time microchip let you disable that warning.

Reply to
CBarn24050

I'll bet you are using MPLAB IDE for an assembler. It's set up to give you a 302 error if there is a _potential_ for pointing to a register in the wrong bank. To make it go away, put this just after the include file statement:

errorlevel -302

Now you won't see it anymore. It'll be up to YOU to make sure you are in the correct bank. Also see "bankselect" in the help file.

Regards, Charlie If God hadn't intended us to eat animals, He wouldn't have made them out of MEAT! - John Cleese

Reply to
Charles Jean

I know nothing much about this system, but I assume the BSF sets the bank. After the CALL 3ffh who knows what bank is set, assuming whatever is at 3ffh is a subroutine.

--
Chuck F (cbfalconer@yahoo.com) (cbfalconer@worldnet.att.net)
   Available for consulting/temporary embedded and systems.
     USE worldnet address!
Reply to
CBFalconer

In that processor it's just supposed to be a return-literal-in-w retlw xxx, where xxx is is a constant returned in the w register (accumulator).

The message is just a stupid warning.

Note that if the retlw instruction is accidentally erased, it will generally cause unpleasant results.

Best regards, Spehro Pefhany

--
"it's the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Reply to
Spehro Pefhany

In message , Dave expounds

Thanks for the replies gentlemen I thought I was doing something silly:)

--
              --dave

                  news001@nospam.org.uk
Reply to
Dave

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.