pic controller n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
PIC Controller PowerPoint Presentation
Download Presentation
PIC Controller

Loading in 2 Seconds...

play fullscreen
1 / 20

PIC Controller - PowerPoint PPT Presentation


  • 126 Views
  • Uploaded on

PIC Controller. Instruction format. RISC (Reduced Instruction Set Computing) or ‘Risk’. Is a CPU design method that gives an instruction set reduced both in size and complexity of addressing modes . Every small operation needs an instruction.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'PIC Controller' - joella


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
pic controller

PIC Controller

Instruction format

risc reduced instruction set computing or risk
RISC (Reduced Instruction Set Computing) or ‘Risk’
  • Is a CPU design method that gives an instruction set reduced both in size and complexity of addressing modes.
  • Every small operation needs an instruction.
  • Load data from memory to working register, Add some data, Store the data in to memory – needs 3 instructions.
  • Ex. ARM, PIC, AVR, SPARC, etc.
cisc complex instruction set computing or sisk
CISC (Complex Instruction Set Computing) or ‘Sisk’
  • Is a microprocessor architecture that gives an instruction set which can execute many low level operations.
  • Load data from memory to working register, Arithmetic/Logical operation, Store data into memory – can be done in 1 instruction.
  • Ex. Intel, AMD, Motorola, etc.
introduction
Introduction
  • Instructions do data transfer between the data memory [SFR (control/configuration registers), GPR, repetitive registers] and working register (W).
  • Instructions do Arithmetic, logical operations on the data.
  • Instruction can check the status of each operation and decide the next operation using the status register.
working register accumulator
Working Register (Accumulator)
  • Whenever a double operand instruction is executed, one operand comes from the instruction or from a register. The other operand comes from a register called working register.
  • This is a special register in CPU (not a part of data memory)
  • This is the default destination for any instruction.
introduction1
Introduction
  • Each instruction is 14 bit wide
    • Opcode
      • Specifies instruction type
    • One or two operands
      • Specifies operation of instruction
  • Three basic categories
    • Byte oriented
    • Bit oriented
    • Literal and control operations
assembly language
Assembly Language
  • Each instruction typically consists of an operation or opcode plus zero or more operands.
  • A label can be specified before each instruction.
  • Labels are case sensitive and start with an alphabetic or underscore character only.
assembly language1
Assembly Language
  • The instructions must be written in proper case. The MPASM is case sensitive.
  • All function registers and their bits are specified in upper case, because upper case is used in the included PIC file.
  • Use comment for every instruction.
assembly language2
Assembly Language
  • Sample Instruction:

NEXTMOVFFSR,W;move the contents of FSR to W.

  • ‘NEXT’ is called the Label.
  • ‘MOVF’ is called the Mnemonic.
  • ‘FSR,W’ are called the Operands.
  • ‘;move thecontents….’ is the Comment.
assembly language3
Assembly Language
  • Sample Instruction:

_OP1IORLW0xFF;Inclusive OR the contents of W with 1111 1111.

  • ‘_OP1’ is called the Label.
  • ‘IORLW’ is called the Mnemonic.
  • ‘0xFF’ are called the Operands.
  • ‘;InclusiveOR the….’ is the Comment.
a ssemble r directives
Assembler Directives
  • An assembler directive is a command given to an assembler.
  • Looks like assembly instructions
  • These directives may do anything from telling the assembler to include other source files, to allocate memory for constant data, etc.
  • Specific for each assembler software
  • Ex: RIGHTEQU1;equ is an assembler directive.
program structure
Program Structure:
  • All programs must have the following structure.

List p=16f877A ; List directive mentioning the PIC

; Microcontroller part number

#include‘C:\my_name\pic_lab\P16f877A.inc’

; file having standard definitions of SFR’s of this PIC

ORG 0x20 ; The address 0x20 at which the

; next instruction 'goto' will be stored

GOTO start ; Go to the beginning of main program

start

--------------------------- ;Program Logic

--------------------------- ;Program Logic

END