100% found this document useful (1 vote)
94 views2 pages

PIC18F Microcontroller Instruction Set

The document outlines the instruction set for the PIC18F microcontroller, detailing byte-oriented and bit-oriented file register instructions. It includes opcodes for various operations such as addition, logical operations, and bit manipulation. Each instruction specifies parameters for file register addresses, destination bits, and access bits.

Uploaded by

RANA.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
94 views2 pages

PIC18F Microcontroller Instruction Set

The document outlines the instruction set for the PIC18F microcontroller, detailing byte-oriented and bit-oriented file register instructions. It includes opcodes for various operations such as addition, logical operations, and bit manipulation. Each instruction specifies parameters for file register addresses, destination bits, and access bits.

Uploaded by

RANA.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

PIC18F Instruction Set

1. Byte-Oriented File Register Instructions


------------------------------------------
Opcode f, d, a
f - File register address
d - Destination bit (0 = store in WREG, 1 = store in f)
a - Access bit (0 = use Bank Select Register, 1 = use Access Bank)

ADDWF f, d, a Add WREG to f


ANDWF f, d, a Logical AND WREG with f
CLRF f, a Clear register f
CLRW Clear WREG
COMF f, d, a Complement f
DECF f, d, a Decrement f by 1
DECFSZ f, d, a Decrement f and skip if 0
INCF f, d, a Increment f by 1
INCFSZ f, d, a Increment f and skip if 0
IORWF f, d, a Logical OR WREG with f
MOVF f, d, a Move f to WREG or f
MOVWF f, a Move WREG to f
RLF f, d, a Rotate left through Carry
RRF f, d, a Rotate right through Carry
SUBWF f, d, a Subtract WREG from f
SWAPF f, d, a Swap nibbles in f
XORWF f, d, a XOR WREG with f

2. Bit-Oriented File Register Instructions


------------------------------------------
Opcode f, b, a
f - File register address
b - Bit position (0-7)
a - Access bit

BCF f, b, a Clear bit b in register f


BSF f, b, a Set bit b in register f
BTFSC f, b, a Test bit b in f, skip if clear
BTFSS f, b, a Test bit b in f, skip if set

(Full instruction set and examples continued...)

You might also like