"

Part 1: Introduction to PIC16F18875 Instruction Set

Overview of PIC16F18875 Architecture

The PIC16F18875 is part of Microchip’s mid-range core devices, featuring a 14-bit wide instruction word. This architecture provides a balance between code density, performance, and flexibility, making it suitable for a wide range of embedded applications.Key features of the PIC16F18875 instruction set:

  • 14-bit instruction word
  • 49 instructions (in the enhanced mid-range core)
  • Harvard architecture (separate program and data memory)
  • 8-bit data path
  • 16-bit wide program memory

2. Instruction Formats

The PIC16F18875 uses several instruction formats:

  1. Byte-oriented operations
  2. Bit-oriented operations
  3. Literal operations
  4. Control operations

Each format is designed to efficiently handle different types of operations, from data manipulation to program flow control.

3. Special Function Registers (SFRs)

The PIC16F18875 uses Special Function Registers for controlling various peripheral functions and device operations. These registers can often be used as source or destination operands in instructions, allowing direct manipulation of device settings and status.

4. Basic Instruction Categories

  1. Arithmetic and Logic Instructions
    • ADD, SUB, AND, OR, XOR, etc.
  2. Data Movement Instructions
    • MOV, MOVF, MOVWF, etc.
  3. Bit Manipulation Instructions
    • BSF, BCF, BTFSS, BTFSC, etc.
  4. Program Control Instructions
    • GOTO, CALL, RETURN, etc.
  5. Special Instructions
    • SLEEP, CLRWDT, NOP, etc.

5. Addressing Modes

The PIC16F18875 supports several addressing modes:

  1. Direct Addressing: The operator’s address is part of the instruction
  2. Indirect Addressing: Address is specified by a pointer register
  3. Immediate Addressing: The operator value is part of the instruction

Below are the lecture videos to support the reading and lab assignments.

 

 

License

Icon for the Creative Commons Attribution 4.0 International License

Introduction to Microcontrollers Copyright © 2024 by Lake Washington Institute of Technology is licensed under a Creative Commons Attribution 4.0 International License, except where otherwise noted.