Exact match. Not showing close matches.
PICList
Thread
'[PIC]:What is a bank?'
2001\05\25@214213
by
fischers
When I compile this program (I cut it from someone elses larger program
to get me going):
LIST P=16F84, R=DEC
Start BSF STATUS,RP0 ;Select bank 1
CLRF TRISB ;Select Output on all PORTB bits
BCF STATUS,RP0 ;Select bank 0
CLRF PORTB ;Turn off all LEDs
BSF PORTB,0 ;Turn on LED0
END
I get this message:
Message[302] C:\SETH\~PICPR~1\LEDRUN~1\LED.ASM 29 : Register in operand
not in bank 0. Ensure that bank bits are correct.
What does it mean? And, what is a bank? (anything to do with pages?)
Thanks for the help,
Seth
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spam_OUTlistservTakeThisOuT
mitvma.mit.edu with SET PICList DIGEST in the body
2001\05\25@222306
by
David VanHorn
|
At 01:29 PM 5/26/01 +1200, Seth Fischer wrote:
>When I compile this program (I cut it from someone elses larger program
>to get me going):
>
>LIST P=16F84, R=DEC
>Start BSF STATUS,RP0 ;Select bank 1
> CLRF TRISB ;Select Output on all PORTB bits
> BCF STATUS,RP0 ;Select bank 0
> CLRF PORTB ;Turn off all LEDs
> BSF PORTB,0 ;Turn on LED0
>
> END
>
>I get this message:
>
>Message[302] C:\SETH\~PICPR~1\LEDRUN~1\LED.ASM 29 : Register in operand
>not in bank 0. Ensure that bank bits are correct.
>
>What does it mean? And, what is a bank? (anything to do with pages?)
Banks and pages are that which you do not have in the atmel AVR.
In the pic, the registers and memory are carved into two or four banks.
While you are pointing at one bank, you cannot access anything in the other
bank.
Pages are basically the same thing, but in EPROM. (program memory)
They are, IMHO, a giant pain in the ass.
Pic:
bsf status,rp0
bsf trisb,1
bcf status,rp0
btfss portb,0
Total, 16 xtal cycles
(And beware, there are problems with BCF and BSF when used with port
registers.)
The same thing is four cycles on the AVR.
Later, we'll talk about why on the pic, everything has to funnel through
the W register, and in the AVR, you can use almost every register, for
everything.
--
Dave's Engineering Page: http://www.dvanhorn.org
I would have a link to FINDU here in my signature line, but due to the
inability of sysadmins at TELOCITY to differentiate a signature line from
the text of an email, I am forbidden to have it.
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservKILLspam
@spam@mitvma.mit.edu with SET PICList DIGEST in the body
More... (looser matching)
- Last day of these posts
- In 2001
, 2002 only
- Today
- New search...