Question: Be a code detective. The assembler has a directive called BANKSEL, bank select, that makes it easier to move from bank to bank without having
Be a code detective. The assembler has a directive called BANKSEL, bank select, that makes
it easier to move from bank to bank without having to look up the location of different SFRs
The following assembly code initializes PortB to be an output, and then writes a HIGH
to PORTB
ORG x
BANKSEL TRISB
CLRF TRISB
BANKSEL PORTB
BSF PORTB,
The opcodes produced by these statements are as follows all numbers are hex:
Location Opcode
A
B
C
D
The column on the left is the location in program memory. Use the table of opcodes and other
information in the PICF Datasheet on the course website to decode the above opcodes and determine which specific PIC instructions are created by the BANKSEL directive.
You will also need to consult the register file map to figure out which SFRs are affected.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
