The document outlines the instruction set for the PIC16CXX microcontroller, which consists of 35 instructions categorized into byte-oriented, bit-oriented, and literal operations. It explains the parameters needed for byte-oriented and bit-oriented instructions, as well as the role of literal instructions with operands. The presentation concludes by summarizing the fundamental concepts of these instruction types in the context of RISC architecture.
MICROCONTROLLER BASED SYSTEMDESIGN
“PIC 16CXX INSTRUCTION SET”
V.KALAIRAJAN M.E;
ASSISTANT PROFESSOR,
ELECTRICALAND ELECTRONICS ENGINEERING
KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY
KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRI11CHY PIC16CXX INSTRUCTION SET 1
2.
PIC 16CXX INSTRUCTIONSET
VIEWS:
INSTRUCTION SET
BYTE ORIENTED INSTRUCTIONS
BIT ORIENTED INSTRUCTIONS
LITERAL INSTRUCTIONS
KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRI11CHY PIC16CXX INSTRUCTION SET 2
3.
PIC 16CXX INSTRUCTIONSET
INSTRUCTION SET:
The instruction set for PIC microcontroller consists of only 35
instructions. Some of these is instructions are byte oriented and some
bit oriented instructions. The instruction set is listed in table.
Byte-oriented operations (Operation done in bytes of data)
Bit-oriented operations (Operation done in bit of data)
Literal and control operations (Data given in instruction itself)
BYTE ORIENTED INSTRUCTIONS:
The byte oriented instructions that require two parameters ( for example
mov f,F(W)) except the f to be replaced by the name of a special
purpose register ( e.g. PORT A) or the name of a RAM variable (e.g.
NUM1) which serves as the source of the operant “f” stands for file
register. The F(W) parameter is the F, if the destination is to be the
source register.
W, if the destination is to be working register (i.e. accumulator or W
register)
KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRI11CHY PIC16CXX INSTRUCTION SET 3
4.
PIC 16CXX INSTRUCTIONSET
KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRI11CHY PIC16CXX INSTRUCTION SET 4
5.
PIC 16CXX INSTRUCTIONSET
BIT ORIENTED INSTRUCTIONS :
The bit oriented instructions also expect parameters (e.g. btfsc, f,
b). here “f” is to be replaced by the name of a special purpose
register on the name of RAM variable. The “b” parameter is to be
replaced by a bit number ranging from 0 to 7.
For example
Zequ 2
Btfsc STATUS, z
Z has be equated to 2. Here the instructions will test the Z bit of
the status register and will skip the next instruction is Z bit is clear.
KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRI11CHY PIC16CXX INSTRUCTION SET 5
6.
PIC 16CXX INSTRUCTIONSET
KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRI11CHY PIC16CXX INSTRUCTION SET 6
7.
PIC 16CXX INSTRUCTIONSET
LITERAL INSTRUCTIONS:
The literal instructions require an operand having a known
value (e.g. OAH) or a label that represents known value.
For example
NUM equation OAH; assigns OAH to the label NUM (a
constant)
movl W NUM: will move OAH to the W register
Every instruction fits in a sing 14 bit word. In addition,
every instruction also executes in a single cycle, unless it
changes the content of the program counter. These
features are due to the fact that PIC microcontroller has
been designed on the principle of RISC architecture.
KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRI11CHY PIC16CXX INSTRUCTION SET 7
8.
PIC 16CXX INSTRUCTIONSET
KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRI11CHY PIC16CXX INSTRUCTION SET 8
9.
PIC 16CXX INSTRUCTIONSET
CONCLUSION:
In this above presentation we can learn about basic concept of
Instruction set, Byte Oriented Instructions, Bit Oriented
instructions, Literal Instructions clearly.
REFERENCES:
Mazidi, M.A.,“PIC Microcontroller” Rollin Mckinlay, Danny
causey Printice Hall of India, 2007.
Ravichandran,C., and Arulaalan,M., “Microcontroller Based
System Design”, Suchitra Publications, Ist edition,2016.
Dr.Balamurugan.C.R., Periyaazhagar., “Microcontroller Based
System Design”, Megnus Publications, Ist edition,2016.
Online wikipedia search.
9KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRI11CHY PIC16CXX INSTRUCTION SET