wannaBinventor
Member
I'm learning what I can to migrate from the 16F to the 18F.
What really has attracted me to the 18F is the bank switching headaches in the 16F on the bigger versions of that family.
However, I'm still not clear on how banking is handled on the 18F. I've done some datasheet reading, and reading of the tutorials, but I'm still coming up a little short.
Can I use a MOVFF to move any file to any other file, or is it only for movement between two RAM locations. For instance can I do this:
MOVFF ADRESH,RESULTHOLD1 ;RESULTHOLD1 is a user file
What about this:
MOVFF RESULTHOLD1,PORTB ;RESULTHOLD1 is a user file
Can some one break down how I need to use the "a" (access) in a MOVWF or ADDWF command? For instance, is the "a" required here. If so, why? What is it doing? Why 1 and why 0 in place of the "a"?
MOVLW 0xF0
ADDWF USERFILE1,f,a
I guess I'm just plain not understanding the difference in "banked" and "access" commands.
Please enlighten me.
What really has attracted me to the 18F is the bank switching headaches in the 16F on the bigger versions of that family.
However, I'm still not clear on how banking is handled on the 18F. I've done some datasheet reading, and reading of the tutorials, but I'm still coming up a little short.
Can I use a MOVFF to move any file to any other file, or is it only for movement between two RAM locations. For instance can I do this:
MOVFF ADRESH,RESULTHOLD1 ;RESULTHOLD1 is a user file
What about this:
MOVFF RESULTHOLD1,PORTB ;RESULTHOLD1 is a user file
Can some one break down how I need to use the "a" (access) in a MOVWF or ADDWF command? For instance, is the "a" required here. If so, why? What is it doing? Why 1 and why 0 in place of the "a"?
MOVLW 0xF0
ADDWF USERFILE1,f,a
I guess I'm just plain not understanding the difference in "banked" and "access" commands.
Please enlighten me.
Last edited: