Microchip PIC16 datasheet: 15.0 Instruction set summary

Published by Microchip · pages 159–196 of 234 · Original PDF

31 discussions about the Microchip PIC16

All 9 parts of the datasheet

15.0 INSTRUCTION SET SUMMARY

The PIC16 instruction set is highly orthogonal and is comprised of three basic categories:

  • Byte-oriented operations
  • Bit-oriented operations
  • Literal and control operations

Each PIC16 instruction is a 14-bit word divided into an opcode which specifies the instruction type and one or more operands which further specify the operation of the instruction. The formats for each of the categories is presented in Figure 15-1, while the various opcode fields are summarized in Table 15-1.

Table 15-2 lists the instructions recognized by the MPASM™ Assembler. A complete description of each instruction is also available in the PIC® Mid-Range MCU Family Reference Manual (DS33023).

For byte-oriented instructions, ‘f’ represents a file register designator and ‘d’ represents a destination designator. The file register designator specifies which file register is to be used by the instruction.

The destination designator specifies where the result of the operation is to be placed. If ‘d’ is zero, the result is placed in the W register. If ‘d’ is one, the result is placed in the file register specified in the instruction.

For bit-oriented instructions, ‘b’ represents a bit field designator which selects the bit affected by the operation, while ‘f’ represents the address of the file in which the bit is located.

For literal and control operations, ‘k’ represents an eight or eleven-bit constant or literal value

One instruction cycle consists of four oscillator periods; for an oscillator frequency of 4 MHz, this gives a normal instruction execution time of 1 µs. All instructions are executed within a single instruction cycle, unless a conditional test is true, or the program counter is changed as a result of an instruction. When this occurs, the execution takes two instruction cycles with the second cycle executed as a NOP.

Note: To maintain upward compatibility with future PIC16F87XA products, do not use the OPTION and TRIS instructions.

All instruction examples use the format ‘0xhh’ to represent a hexadecimal number, where ‘h’ signifies a hexadecimal digit.

15.1 READ-MODIFY-WRITE OPERATIONS

Any instruction that specifies a file register as part of the instruction performs a Read-Modify-Write (R-M-W) operation. The register is read, the data is modified, and the result is stored according to either the instruction or the destination designator ‘d’. A read operation is performed on a register even if the instruction writes to that register.

For example, a “CLRF PORTB” instruction will read PORTB, clear all the data bits, then write the result back to PORTB. This example would have the unintended result that the condition that sets the RBIF flag would be cleared.

TABLE 15-1: OPCODE FIELD DESCRIPTIONS

Field Description
f Register file address (0x00 to 0x7F)
W Working register (accumulator)
b Bit address within an 8-bit file register
k Literal field, constant data or label
x Don't care location (= 0 or 1).The assembler will generate code with x = 0.It is the recommended form of use for compatibility with all Microchip software tools.
d Destination select; d = 0: store result in W,d = 1: store result in file register f.Default is d = 1.
PC Program Counter
TO Time-out bit
PD Power-down bit

FIGURE 15-1: GENERAL FORMAT FOR INSTRUCTIONS

Byte-oriented file register operations

13 8 7 6 0 +------------------+---+-----------------+ | OPCODE | d | f (FILE #) | +------------------+---+-----------------+

d = 0 for destination W
d = 1 for destination f
f = 7-bit file register address

Bit-oriented file register operations

13 10 9 7 6 0 +------------------+---+-----------------+ | OPCODE |b(BIT#)| f (FILE #) | +------------------+---+-----------------+

b = 3-bit bit address
f = 7-bit file register address

Literal and control operations

General

13 8 7 0 +------------------+-------------------+ | OPCODE | k (literal) | +------------------+-------------------+

k = 8-bit immediate value

CALL and GOTO instructions only

13 11 10 0 +------------------+-------------------+ | OPCODE | k (literal) | +------------------+-------------------+

k = 11-bit immediate value

Figure from the manual

TABLE 15-2: PIC16F87XA INSTRUCTION SET

Mnemonic, Operands Description Cycles 14-Bit Opcode Status Affected Notes
MSb LSb
BYTE-ORIENTED FILE REGISTER OPERATIONS
ADDWF f, d Add W and f 1 00 0111 dfff ffff C,DC,Z 1,2
ANDWF f, d AND W with f 1 00 0101 dfff ffff Z 1,2
CLRF f Clear f 1 00 0001 1fff ffff Z 2
CLRW - Clear W 1 00 0001 0xxx xxxx Z
COMF f, d Complement f 1 00 1001 dfff ffff Z 1,2
DECF f, d Decrement f 1 00 0011 dfff ffff Z 1,2
DECFSZ f, d Decrement f, Skip if 0 1(2) 00 1011 dfff ffff 1,2,3
INCF f, d Increment f 1 00 1010 dfff ffff Z 1,2
INCFSZ f, d Increment f, Skip if 0 1(2) 00 1111 dfff ffff 1,2,3
IORWF f, d Inclusive OR W with f 1 00 0100 dfff ffff Z 1,2
MOVF f, d Move f 1 00 1000 dfff ffff Z 1,2
MOVWF f Move W to f 1 00 0000 1fff ffff
NOP - No Operation 1 00 0000 0xx0 0000
RLF f, d Rotate Left f through Carry 1 00 1101 dfff ffff C 1,2
RRF f, d Rotate Right f through Carry 1 00 1100 dfff ffff C 1,2
SUBWF f, d Subtract W from f 1 00 0010 dfff ffff C,DC,Z 1,2
SWAPF f, d Swap nibbles in f 1 00 1110 dfff ffff 1,2
XORWF f, d Exclusive OR W with f 1 00 0110 dfff ffff Z 1,2
BIT-ORIENTED FILE REGISTER OPERATIONS
BCF f, b Bit Clear f 1 01 00bb bfff ffff 1,2
BSF f, b Bit Set f 1 01 01bb bfff ffff 1,2
BTFSC f, b Bit Test f, Skip if Clear 1 (2) 01 10bb bfff ffff 3
BTFSS f, b Bit Test f, Skip if Set 1 (2) 01 11bb bfff ffff 3
LITERAL AND CONTROL OPERATIONS
ADDLW k Add Literal and W 1 11 111x kkkk kkkk C,DC,Z
ANDLW k AND Literal with W 1 11 1001 kkkk kkkk Z
CALL k Call Subroutine 2 10 0kkk kkkk kkkk
CLRWDT - Clear Watchdog Timer 1 00 0000 0110 0100 \overlineTO,\overlinePD
GOTO k Go to Address 2 10 1kkk kkkk kkkk
IORLW k Inclusive OR Literal with W 1 11 1000 kkkk kkkk Z
MOVLW k Move Literal to W 1 11 00xx kkkk kkkk
RETFIE - Return from Interrupt 2 00 0000 0000 1001
RETLW k Return with Literal in W 2 11 01xx kkkk kkkk
RETURN - Return from Subroutine 2 00 0000 0000 1000
SLEEP - Go into Standby mode 1 00 0000 0110 0011 \overlineTO,\overlinePD
SUBLW k Subtract W from Literal 1 11 110x kkkk kkkk C,DC,Z
XORLW k Exclusive OR Literal with W 1 11 1010 kkkk kkkk Z

Note 1: When an I/O register is modified as a function of itself (e.g., MOVF PORTB, 1), the value used will be that value present on the pins themselves. For example, if the data latch is ‘1’ for a pin configured as input and is driven low by an external device, the data will be written back with a ‘0’.

2: If this instruction is executed on the TMR0 register (and where applicable, d = 1), the prescaler will be cleared if assigned to the Timer0 module.

3: If Program Counter (PC) is modified, or a conditional test is true, the instruction requires two cycles. The second cycle is executed as a NOP.

Note: Additional information on the mid-range instruction set is available in the PIC® Mid-Range MCU Family Reference Manual (DS33023).

15.2 Instruction Descriptions

ADDLW Add Literal and W

Syntax: [ label ] ADDLW k Operands: 0 ≤ k ≤ 255 Operation: (W) + k → (W) Status Affected: C, DC, Z Description: The contents of the W register are added to the eight-bit literal ‘k’ and the result is placed in the W register.

BCF Bit Clear f

Syntax: [ label ] BCF f,b Operands: 0 ≤ f ≤ 127 0 ≤ b ≤ 7 Operation: 0 → (f) Status Affected: None Description: Bit ‘b’ in register ‘f’ is cleared.

ADDWF Add W and f

Syntax: [ label ] ADDWF f,d Operands: 0 ≤ f ≤ 127 d ∈ [0,1] Operation: (W) + (f) → (destination) Status Affected: C, DC, Z Description: Add the contents of the W register with register ‘f’. If ‘d’ is ‘0’, the result is stored in the W register. If ‘d’ is ‘1’, the result is stored back in register ‘f’.

BSF Bit Set f

Syntax: [ label ] BSF f,b Operands: 0 ≤ f ≤ 127 0 ≤ b ≤ 7 Operation: 1 → (f) Status Affected: None Description: Bit ‘b’ in register ‘f’ is set.

ANDLW AND Literal with W

Syntax: [ label ] ANDLW k Operands: 0 ≤ k ≤ 255 Operation: (W) .AND. (k) → (W) Status Affected: Z Description: The contents of W register are AND’ed with the eight-bit literal ‘k’. The result is placed in the W register.

BTFSS Bit Test f, Skip if Set

Syntax: [ label ] BTFSS f,b Operands: 0 ≤ f ≤ 127 0 ≤ b < 7 Operation: skip if (f) = 1 Status Affected: None Description: If bit ‘b’ in register ‘f’ is ‘0’, the next instruction is executed. If bit ‘b’ is ‘1’, then the next instruction is discarded and a NOP is executed instead, making this a 2 Tcy instruction.

ANDWF AND W with f

Syntax: [ label ] ANDWF f,d Operands: 0 ≤ f ≤ 127 d ∈ [0,1] Operation: (W) .AND. (f) → (destination) Status Affected: Z Description: AND the W register with register ‘f’. If ‘d’ is ‘0’, the result is stored in the W register. If ‘d’ is ‘1’, the result is stored back in register ‘f’.

BTFSC Bit Test, Skip if Clear

Syntax: [ label ] BTFSC f,b Operands: 0 ≤ f ≤ 127 0 ≤ b ≤ 7 Operation: skip if (f) = 0 Status Affected: None Description: If bit ‘b’ in register ‘f’ is ‘1’, the next instruction is executed. If bit ‘b’ in register ‘f’ is ‘0’, the next instruction is discarded and a NOP is executed instead, making this a 2 Tcy instruction.

CALL Call Subroutine

Syntax: [ label ] CALL k Operands: 0 ≤ k ≤ 2047 Operation: (PC)+ 1→ TOS, k → PC<10:0>, (PCLATH<4:3>) → PC<12:11> Status Affected: None Description: Call Subroutine. First, return address (PC+1) is pushed onto the stack. The eleven-bit immediate address is loaded into PC bits <10:0>. The upper bits of the PC are loaded from PCLATH. CALL is a two-cycle instruction.

CLRF Clear f

Syntax: [ label ] CLRF f Operands: 0 ≤ f ≤ 127 Operation: 00h → (f) 1 → Z Status Affected: Z Description: The contents of register ‘f’ are cleared and the Z bit is set.

CLRW Clear W

Syntax: [ label ] CLRW Operands: None Operation: 00h → (W) 1 → Z Status Affected: Z Description: W register is cleared. Zero bit (Z) is set.

CLRWDT Clear Watchdog Timer

Syntax: [ label ] CLRWDT Operands: None Operation: 00h → WDT 0 → WDT prescaler, 1 → \overlineTO 1 → \overlinePD Status Affected: \overlineTO, \overlinePD Description: CLRWDT instruction resets the Watchdog Timer. It also resets the prescaler of the WDT. Status bits, \overlineTO and \overlinePD, are set.

COMF Complement f

Syntax: [ label ] COMF f,d Operands: 0 ≤ f ≤ 127 d ∈ [0,1] Operation: (\barf) → (destination) Status Affected: Z Description: The contents of register ‘f’ are complemented. If ‘d’ is ‘0’, the result is stored in W. If ‘d’ is ‘1’, the result is stored back in register ‘f’.

DECF Decrement f

Syntax: [ label ] DECF f,d Operands: 0 ≤ f ≤ 127 d ∈ [0,1] Operation: (f) - 1 → (destination) Status Affected: Z Description: Decrement register ‘f’. If ‘d’ is ‘0’, the result is stored in the W register. If ‘d’ is ‘1’, the result is stored back in register ‘f’.

DS39582C-page 162 © 2001-2013 Microchip Technology Inc.

DECFSZ Decrement f, Skip if 0

Syntax: [label] DECFSZ f,d Operands: 0 ≤ f ≤ 127 d ∈ [0,1] Operation: (f) - 1 → (destination); skip if result = 0 Status Affected: None Description: The contents of register ‘f’ are decremented. If ‘d’ is ‘0’, the result is placed in the W register. If ‘d’ is ‘1’, the result is placed back in register ‘f’. If the result is ‘1’, the next instruction is executed. If the result is ‘0’, then a NOP is executed instead, making it a 2 TCY instruction.

INCFSZ Increment f, Skip if 0

Syntax: [label] INCFSZ f,d Operands: 0 ≤ f ≤ 127 d ∈ [0,1] Operation: (f) + 1 → (destination), skip if result = 0 Status Affected: None Description: The contents of register ‘f’ are incremented. If ‘d’ is ‘0’, the result is placed in the W register. If ‘d’ is ‘1’, the result is placed back in register ‘f’. If the result is ‘1’, the next instruction is executed. If the result is ‘0’, a NOP is executed instead, making it a 2 TCY instruction.

GOTO Unconditional Branch

Syntax: [label] GOTO k Operands: 0 ≤ k ≤ 2047 Operation: k → PC<10:0> PCLATH<4:3> → PC<12:11> Status Affected: None Description: GOTO is an unconditional branch. The eleven-bit immediate value is loaded into PC bits <10:0>. The upper bits of PC are loaded from PCLATH<4:3>. GOTO is a two-cycle instruction.

IORLW Inclusive OR Literal with W

Syntax: [label] IORLW k Operands: 0 ≤ k ≤ 255 Operation: (W) .OR. k → (W) Status Affected: Z Description: The contents of the W register are OR’ed with the eight-bit literal ‘k’. The result is placed in the W register.

INCF Increment f

Syntax: [label] INCF f,d Operands: 0 ≤ f ≤ 127 d ∈ [0,1] Operation: (f) + 1 → (destination) Status Affected: Z Description: The contents of register ‘f’ are incremented. If ‘d’ is ‘0’, the result is placed in the W register. If ‘d’ is ‘1’, the result is placed back in register ‘f’.

IORWF Inclusive OR W with f

Syntax: [label] IORWF f,d Operands: 0 ≤ f ≤ 127 d ∈ [0,1] Operation: (W) .OR. (f) → (destination) Status Affected: Z Description: Inclusive OR the W register with register ‘f’. If ‘d’ is ‘0’, the result is placed in the W register. If ‘d’ is ‘1’, the result is placed back in register ‘f’.

RLF Rotate Left f through Carry

Syntax: [ label ] RLF f,d Operands: 0 ≤ f ≤ 127 d ∈ [0,1] Operation: See description below Status Affected: C Description: The contents of register ‘f’ are rotated one bit to the left through the Carry flag. If ‘d’ is ‘0’, the result is placed in the W register. If ‘d’ is ‘1’, the result is stored back in register ‘f’.

Figure from the manual

RETURN Return from Subroutine

Syntax: [ label ] RETURN Operands: None Operation: TOS → PC Status Affected: None Description: Return from subroutine. The stack is POPed and the top of the stack (TOS) is loaded into the program counter. This is a two-cycle instruction.

RRF Rotate Right f through Carry

Syntax: [ label ] RRF f,d Operands: 0 ≤ f ≤ 127 d ∈ [0,1] Operation: See description below Status Affected: C Description: The contents of register ‘f’ are rotated one bit to the right through the Carry flag. If ‘d’ is ‘0’, the result is placed in the W register. If ‘d’ is ‘1’, the result is placed back in register ‘f’.

Figure from the manual

SLEEP

Syntax: [ label ] SLEEP Operands: None Operation: 00h → WDT, 0 → WDT prescaler, 1 → \overlineTO, 0 → \overlinePD Status Affected: \overlineTO, \overlinePD Description: The power-down status bit, \overlinePD, is cleared. Time-out status bit, \overlineTO, is set. Watchdog Timer and its prescaler are cleared. The processor is put into Sleep mode with the oscillator stopped.

SUBLW Subtract W from Literal

Syntax: [ label ] SUBLW k Operands: 0 ≤ k ≤ 255 Operation: k - (W) → (W) Status Affected: C, DC, Z Description: The W register is subtracted (2’s complement method) from the eight-bit literal ‘k’. The result is placed in the W register.

SUBWF Subtract W from f

Syntax: [ label ] SUBWF f,d Operands: 0 ≤ f ≤ 127 d ∈ [0,1] Operation: (f) - (W) → (destination) Status Affected: C, DC, Z Description: Subtract (2’s complement method) W register from register ‘f’. If ‘d’ is ‘0’, the result is stored in the W register. If ‘d’ is ‘1’, the result is stored back in register ‘f’.

DS39582C-page 164 © 2001-2013 Microchip Technology Inc.

SWAPF Swap Nibbles in f Syntax: [ label ] SWAPF f,d Operands: 0 ≤ f ≤ 127 d ∈ [0,1] Operation: (f<3:0>) → (destination<7:4>), (f<7:4>) → (destination<3:0>) Status Affected: None Description: The upper and lower nibbles of register ‘f’ are exchanged. If ‘d’ is ‘0’, the result is placed in the W register. If ‘d’ is ‘1’, the result is placed in register ‘f’.

XORWF Exclusive OR W with f Syntax: [ label ] XORWF f,d Operands: 0 ≤ f ≤ 127 d ∈ [0,1] Operation: (W) .XOR. (f) → (destination) Status Affected: Z Description: Exclusive OR the contents of the W register with register ‘f’. If ‘d’ is ‘0’, the result is stored in the W register. If ‘d’ is ‘1’, the result is stored back in register ‘f’.

XORLW Exclusive OR Literal with W Syntax: [ label ] XORLW k Operands: 0 ≤ k ≤ 255 Operation: (W) .XOR. k → (W) Status Affected: Z Description: The contents of the W register are XOR’ed with the eight-bit literal ‘k’. The result is placed in the W register.

NOTES:

DS39582C-page 166 © 2001-2013 Microchip Technology Inc.

16.0 DEVELOPMENT SUPPORT

The PIC® microcontrollers are supported with a full range of hardware and software development tools:

  • Integrated Development Environment
    • MPLAB® IDE Software
  • Assemblers/Compilers/Linkers
    • MPASM™ Assembler
    • MPLAB C17 and MPLAB C18 C Compilers
    • MPLINK™ Object Linker/ MPLIB™ Object Librarian
    • MPLAB C30 C Compiler
    • MPLAB ASM30 Assembler/Linker/Library
  • Simulators
    • MPLAB SIM Software Simulator
    • MPLAB dsPIC30 Software Simulator
  • Emulators
    • MPLAB ICE 2000 In-Circuit Emulator
    • MPLAB ICE 4000 In-Circuit Emulator
  • In-Circuit Debugger
    • MPLAB ICD 2
  • Device Programmers
    • PRO MATE® II Universal Device Programmer
    • PICSTART® Plus Development Programmer
  • Low Cost Demonstration Boards
    • PICDEM™ 1 Demonstration Board
    • PICDEM.net™ Demonstration Board
    • PICDEM 2 Plus Demonstration Board
    • PICDEM 3 Demonstration Board
    • PICDEM 4 Demonstration Board
    • PICDEM 17 Demonstration Board
    • PICDEM 18R Demonstration Board
    • PICDEM LIN Demonstration Board
    • PICDEM USB Demonstration Board
  • Evaluation Kits
    • KEELOQ®
    • PICDEM MSC
    • microID®
    • CAN
    • PowerSmart®
    • Analog

16.1 MPLAB Integrated Development Environment Software

The MPLAB IDE software brings an ease of software development previously unseen in the 8/16-bit microcontroller market. The MPLAB IDE is a Windows® based application that contains:

  • An interface to debugging tools
    • simulator
    • programmer (sold separately)
    • emulator (sold separately)
    • in-circuit debugger (sold separately)
  • A full-featured editor with color coded context
  • A multiple project manager
  • Customizable data windows with direct edit of contents
  • High level source code debugging
  • Mouse over variable inspection
  • Extensive on-line help

The MPLAB IDE allows you to:

  • Edit your source files (either assembly or C)
  • One touch assemble (or compile) and download to PIC MCU emulator and simulator tools (automatically updates all project information)
  • Debug using:
    • source files (assembly or C)
    • absolute listing file (mixed assembly and C)
    • machine code

MPLAB IDE supports multiple debugging tools in a single development paradigm, from the cost effective simulators, through low cost in-circuit debuggers, to full-featured emulators. This eliminates the learning curve when upgrading to tools with increasing flexibility and power.

16.2 MPASM Assembler

The MPASM assembler is a full-featured, universal macro assembler for all PIC MCUs.

The MPASM assembler generates relocatable object files for the MPLINK object linker, Intel® standard HEX files, MAP files to detail memory usage and symbol reference, absolute LST files that contain source lines and generated machine code and COFF files for debugging.

The MPASM assembler features include:

  • Integration into MPLAB IDE projects
  • User defined macros to streamline assembly code
  • Conditional assembly for multi-purpose source files
  • Directives that allow complete control over the assembly process

16.3 MPLAB C17 and MPLAB C18 C Compilers

The MPLAB C17 and MPLAB C18 Code Development Systems are complete ANSI C compilers for Microchip’s PIC17CXXX and PIC18CXXX family of microcontrollers. These compilers provide powerful integration capabilities, superior code optimization and ease of use not found with other compilers.

For easy source level debugging, the compilers provide symbol information that is optimized to the MPLAB IDE debugger.

16.4 MPLINK Object Linker/ MPLIB Object Librarian

The MPLINK object linker combines relocatable objects created by the MPASM assembler and the MPLAB C17 and MPLAB C18 C compilers. It can link relocatable objects from precompiled libraries, using directives from a linker script.

The MPLIB object librarian manages the creation and modification of library files of pre-compiled code. When a routine from a library is called from a source file, only the modules that contain that routine will be linked in with the application. This allows large libraries to be used efficiently in many different applications.

The object linker/library features include:

  • Efficient linking of single libraries instead of many smaller files
  • Enhanced code maintainability by grouping related modules together
  • Flexible creation of libraries with easy module listing, replacement, deletion and extraction

16.5 MPLAB C30 C Compiler

The MPLAB C30 C compiler is a full-featured, ANSI compliant, optimizing compiler that translates standard ANSI C programs into dsPIC30F assembly language source. The compiler also supports many command-line options and language extensions to take full advantage of the dsPIC30F device hardware capabilities, and afford fine control of the compiler code generator.

MPLAB C30 is distributed with a complete ANSI C standard library. All library functions have been validated and conform to the ANSI C library standard. The library includes functions for string manipulation, dynamic memory allocation, data conversion, time-keeping, and math functions (trigonometric, exponential and hyperbolic). The compiler provides symbolic information for high level source debugging with the MPLAB IDE.

16.6 MPLAB ASM30 Assembler, Linker, and Librarian

MPLAB ASM30 assembler produces relocatable machine code from symbolic assembly language for dsPIC30F devices. MPLAB C30 compiler uses the assembler to produce it’s object file. The assembler generates relocatable object files that can then be archived or linked with other relocatable object files and archives to create an executable file. Notable features of the assembler include:

  • Support for the entire dsPIC30F instruction set
  • Support for fixed-point and floating-point data
  • Command line interface
  • Rich directive set
  • Flexible macro language
  • MPLAB IDE compatibility

16.7 MPLAB SIM Software Simulator

The MPLAB SIM software simulator allows code development in a PC hosted environment by simulating the PIC series microcontrollers on an instruction level. On any given instruction, the data areas can be examined or modified and stimuli can be applied from a file, or user defined key press, to any pin. The execution can be performed in Single-Step, Execute Until Break, or Trace mode.

The MPLAB SIM simulator fully supports symbolic debugging using the MPLAB C17 and MPLAB C18 C Compilers, as well as the MPASM assembler. The software simulator offers the flexibility to develop and debug code outside of the laboratory environment, making it an excellent, economical software development tool.

16.8 MPLAB SIM30 Software Simulator

The MPLAB SIM30 software simulator allows code development in a PC hosted environment by simulating the dsPIC30F series microcontrollers on an instruction level. On any given instruction, the data areas can be examined or modified and stimuli can be applied from a file, or user defined key press, to any of the pins.

The MPLAB SIM30 simulator fully supports symbolic debugging using the MPLAB C30 C Compiler and MPLAB ASM30 assembler. The simulator runs in either a Command Line mode for automated tasks, or from MPLAB IDE. This high speed simulator is designed to debug, analyze and optimize time intensive DSP routines.

16.9 MPLAB ICE 2000 High Performance Universal In-Circuit Emulator

The MPLAB ICE 2000 universal in-circuit emulator is intended to provide the product development engineer with a complete microcontroller design tool set for PIC microcontrollers. Software control of the MPLAB ICE 2000 in-circuit emulator is advanced by the MPLAB Integrated Development Environment, which allows editing, building, downloading and source debugging from a single environment.

The MPLAB ICE 2000 is a full-featured emulator system with enhanced trace, trigger and data monitoring features. Interchangeable processor modules allow the system to be easily reconfigured for emulation of different processors. The universal architecture of the MPLAB ICE in-circuit emulator allows expansion to support new PIC microcontrollers.

The MPLAB ICE 2000 in-circuit emulator system has been designed as a real-time emulation system with advanced features that are typically found on more expensive development tools. The PC platform and Microsoft® Windows 32-bit operating system were chosen to best make these features available in a simple, unified application.

16.10 MPLAB ICE 4000 High Performance Universal In-Circuit Emulator

The MPLAB ICE 4000 universal in-circuit emulator is intended to provide the product development engineer with a complete microcontroller design tool set for high-end PIC microcontrollers. Software control of the MPLAB ICE in-circuit emulator is provided by the MPLAB Integrated Development Environment, which allows editing, building, downloading and source debugging from a single environment.

The MPLAB ICD 4000 is a premium emulator system, providing the features of MPLAB ICE 2000, but with increased emulation memory and high speed performance for dsPIC30F and PIC18XXXX devices. Its advanced emulator features include complex triggering and timing, up to 2 Mb of emulation memory, and the ability to view variables in real-time.

The MPLAB ICE 4000 in-circuit emulator system has been designed as a real-time emulation system with advanced features that are typically found on more expensive development tools. The PC platform and Microsoft Windows 32-bit operating system were chosen to best make these features available in a simple, unified application.

16.11 MPLAB ICD 2 In-Circuit Debugger

Microchip’s In-Circuit Debugger, MPLAB ICD 2, is a powerful, low-cost, run-time development tool, connecting to the host PC via an RS-232 or high-speed USB interface. This tool is based on the Flash PIC MCUs and can be used to develop for these and other PIC microcontrollers. The MPLAB ICD 2 utilizes the in-circuit debugging capability built into the Flash devices. This feature, along with Microchip’s In-Circuit Serial Programming™ (ICSP™) protocol, offers cost effective in-circuit Flash debugging from the graphical user interface of the MPLAB Integrated Development Environment. This enables a designer to develop and debug source code by setting breakpoints, single-stepping and watching variables, CPU status and peripheral registers. Running at full speed enables testing hardware and applications in real-time. MPLAB ICD 2 also serves as a development programmer for selected PIC devices.

16.12 PRO MATE II Universal Device Programmer

The PRO MATE II is a universal, CE compliant device programmer with programmable voltage verification at VDDMIN and VDDMAX for maximum reliability. It features an LCD display for instructions and error messages and a modular detachable socket assembly to support various package types. In Stand-Alone mode, the PRO MATE II device programmer can read, verify, and program PIC devices without a PC connection. It can also set code protection in this mode.

16.13 PICSTART Plus Development Programmer

The PICSTART Plus development programmer is an easy-to-use, low-cost, prototype programmer. It connects to the PC via a COM (RS-232) port. MPLAB Integrated Development Environment software makes using the programmer simple and efficient. The PICSTART Plus development programmer supports most PIC devices up to 40 pins. Larger pin count devices, such as the PIC16C92X and PIC17C76X, may be supported with an adapter socket. The PICSTART Plus development programmer is CE compliant.

16.14 PICDEM 1 PIC MCU Demonstration Board

The PICDEM 1 demonstration board demonstrates the capabilities of the PIC16C5X (PIC16C54 to PIC16C58A), PIC16C61, PIC16C62X, PIC16C71, PIC16C8X, PIC17C42, PIC17C43 and PIC17C44. All necessary hardware and software is included to run basic demo programs. The sample microcontrollers provided with the PICDEM 1 demonstration board can be programmed with a PRO MATE II device programmer, or a PICSTART Plus development programmer. The PICDEM 1 demonstration board can be connected to the MPLAB ICE in-circuit emulator for testing. A prototype area extends the circuitry for additional application components. Features include an RS-232 interface, a potentiometer for simulated analog input, push button switches and eight LEDs.

16.15 PICDEM.net Internet/Ethernet Demonstration Board

The PICDEM.net demonstration board is an Internet/Ethernet demonstration board using the PIC18F452 microcontroller and TCP/IP firmware. The board supports any 40-pin DIP device that conforms to the standard pinout used by the PIC16F877 or PIC18C452. This kit features a user friendly TCP/IP stack, web server with HTML, a 24L256 Serial EEPROM for Xmodem download to web pages into Serial EEPROM, ICSP/MPLAB ICD 2 interface connector, an Ethernet interface, RS-232 interface, and a 16 x 2 LCD display. Also included is the book and CD-ROM “TCP/IP Lean, Web Servers for Embedded Systems,” by Jeremy Bentham.

16.16 PICDEM 2 Plus Demonstration Board

The PICDEM 2 Plus demonstration board supports many 18-, 28-, and 40-pin microcontrollers, including PIC16F87X and PIC18FXX2 devices. All the necessary hardware and software is included to run the demonstration programs. The sample microcontrollers provided with the PICDEM 2 demonstration board can be programmed with a PRO MATE II device programmer, PICSTART Plus development programmer, or MPLAB ICD 2 with a Universal Programmer Adapter. The MPLAB ICD 2 and MPLAB ICE in-circuit emulators may also be used with the PICDEM 2 demonstration board to test firmware. A prototype area extends the circuitry for additional application components. Some of the features include an RS-232 interface, a 2 x 16 LCD display, a piezo speaker, an on-board temperature sensor, four LEDs, and sample PIC18F452 and PIC16F877 Flash microcontrollers.

16.17 PICDEM 3 PIC16C92X Demonstration Board

The PICDEM 3 demonstration board supports the PIC16C923 and PIC16C924 in the PLCC package. All the necessary hardware and software is included to run the demonstration programs.

16.18 PICDEM 4 8/14/18-Pin Demonstration Board

The PICDEM 4 can be used to demonstrate the capabilities of the 8, 14, and 18-pin PIC16XXXX and PIC18XXXX MCUs, including the PIC16F818/819, PIC16F87/88, PIC16F62XA and the PIC18F1320 family of microcontrollers. PICDEM 4 is intended to showcase the many features of these low pin count parts, including LIN and Motor Control using ECCP. Special provisions are made for low power operation with the supercapacitor circuit, and jumpers allow on-board hardware to be disabled to eliminate current draw in this mode. Included on the demo board are provisions for Crystal, RC or Canned Oscillator modes, a five volt regulator for use with a nine volt wall adapter or battery, DB-9 RS-232 interface, ICD connector for programming via ICSP and development with MPLAB ICD 2, 2x16 liquid crystal display, PCB footprints for H-Bridge motor driver, LIN transceiver and EEPROM. Also included are: header for expansion, eight LEDs, four potentiometers, three push buttons and a prototyping area. Included with the kit is a PIC16F627A and a PIC18F1320. Tutorial firmware is included along with the User’s Guide.

16.19 PICDEM 17 Demonstration Board

The PICDEM 17 demonstration board is an evaluation board that demonstrates the capabilities of several Microchip microcontrollers, including PIC17C752, PIC17C756A, PIC17C762 and PIC17C766. A programmed sample is included. The PRO MATE II device programmer, or the PICSTART Plus development programmer, can be used to reprogram the device for user tailored application development. The PICDEM 17 demonstration board supports program download and execution from external on-board Flash memory. A generous prototype area is available for user hardware expansion.

16.20 PICDEM 18R PIC18C601/801 Demonstration Board

The PICDEM 18R demonstration board serves to assist development of the PIC18C601/801 family of Microchip microcontrollers. It provides hardware implementation of both 8-bit Multiplexed/Demultiplexed and 16-bit Memory modes. The board includes 2 Mb external Flash memory and 128 Kb SRAM memory, as well as serial EEPROM, allowing access to the wide range of memory types supported by the PIC18C601/801.

16.21 PICDEM LIN PIC16C43X Demonstration Board

The powerful LIN hardware and software kit includes a series of boards and three PIC microcontrollers. The small footprint PIC16C432 and PIC16C433 are used as slaves in the LIN communication and feature on-board LIN transceivers. A PIC16F874 Flash microcontroller serves as the master. All three microcontrollers are programmed with firmware to provide LIN bus communication.

16.22 PICkit™ 1 Flash Starter Kit

A complete “development system in a box”, the PICkit Flash Starter Kit includes a convenient multi-section board for programming, evaluation and development of 8/14-pin Flash PIC® microcontrollers. Powered via USB, the board operates under a simple Windows GUI. The PICkit 1 Starter Kit includes the user’s guide (on CD ROM), PICkit 1 tutorial software and code for various applications. Also included are MPLAB® IDE (Integrated Development Environment) software, software and hardware “Tips 'n Tricks for 8-pin Flash PIC® Microcontrollers” Handbook and a USB Interface Cable. Supports all current 8/14-pin Flash PIC microcontrollers, as well as many future planned devices.

16.23 PICDEM USB PIC16C7X5 Demonstration Board

The PICDEM USB Demonstration Board shows off the capabilities of the PIC16C745 and PIC16C765 USB microcontrollers. This board provides the basis for future USB products.

16.24 Evaluation and Programming Tools

In addition to the PICDEM series of circuits, Microchip has a line of evaluation kits and demonstration software for these products.

  • KEELOQ evaluation and programming tools for Microchip’s HCS Secure Data Products
  • CAN developers kit for automotive network applications
  • Analog design boards and filter design software
  • PowerSmart battery charging evaluation/ calibration kits
  • IrDA® development kit
  • microID development and rfLab™ development software
  • SEEVAL® designer kit for memory evaluation and endurance calculations
  • PICDEM MSC demo boards for Switching mode power supply, high power IR driver, delta sigma ADC, and flow rate sensor

Check the Microchip web page and the latest Product Line Card for the complete list of demonstration and evaluation kits.

NOTES:

17.0 ELECTRICAL CHARACTERISTICS

Absolute Maximum Ratings †

  • Ambient temperature under bias ........ -55 to +125°C
  • Storage temperature ........ -65°C to +150°C
  • Voltage on any pin with respect to Vss (except VDD, \overlineMCLR. and RA4) ........ -0.3V to (VDD + 0.3V)
  • Voltage on VDD with respect to Vss ........ -0.3 to +7.5V
  • Voltage on \overlineMCLR with respect to Vss (Note 2) ........ 0 to +14V
  • Voltage on RA4 with respect to Vss ........ 0 to +8.5V
  • Total power dissipation (Note 1) ........ 1.0W
  • Maximum current out of Vss pin ........ 300 mA
  • Maximum current into VDD pin ........ 250 mA
  • Input clamp current, IIK (VI < 0 or VI > VDD) ........ ± 20 mA
  • Output clamp current, IOK (VO < 0 or VO > VDD) ........ ± 20 mA
  • Maximum output current sunk by any I/O pin ........ 25 mA
  • Maximum output current sourced by any I/O pin ........ 25 mA
  • Maximum current sunk by PORTA, PORTB and PORTE (combined) (Note 3) ........ 200 mA
  • Maximum current sourced by PORTA, PORTB and PORTE (combined) (Note 3) ........ 200 mA
  • Maximum current sunk by PORTC and PORTD (combined) (Note 3) ........ 200 mA
  • Maximum current sourced by PORTC and PORTD (combined) (Note 3) ........ 200 mA

Note 1: Power dissipation is calculated as follows: Pdis = VDD x {IDD - \Sigma IOH} + \Sigma {(VDD - VOH) x IOH} + \Sigma(VOI x IOL) 2: Voltage spikes below Vss at the \overlineMCLR pin, inducing currents greater than 80 mA, may cause latch-up. Thus, a series resistor of 50-100\Omega should be used when applying a "low" level to the MCLR pin rather than pulling this pin directly to Vss. 3: PORTD and PORTE are not implemented on PIC16F873A/876A devices.

† NOTICE: Stresses above those listed under “Absolute Maximum Ratings” may cause permanent damage to the device. This is a stress rating only and functional operation of the device at those or any other conditions above those indicated in the operation listings of this specification is not implied. Exposure to maximum rating conditions for extended periods may affect device reliability.

FIGURE 17-1: PIC16F87XA VOLTAGE-FREQUENCY GRAPH (INDUSTRIAL, EXTENDED)

Figure from the manual

FIGURE 17-2: PIC16LF87XA VOLTAGE-FREQUENCY GRAPH (INDUSTRIAL)

Figure from the manual

FMAX = (6.0 MHz/V) (VDDAPPMIN – 2.0V) + 4 MHz Note 1: VDDAPPMIN is the minimum voltage of the PIC® device in the application. 2: FMAX has a maximum frequency of 10 MHz.

DS39582C-page 174 © 2001-2013 Microchip Technology Inc.

17.1 DC Characteristics: PIC16F873A/874A/876A/877A (Industrial, Extended) PIC16LF873A/874A/876A/877A (Industrial)

PIC16LF873A/874A/876A/877A (Industrial) Standard Operating Conditions (unless otherwise stated) Operating temperature -40°C ≤ TA ≤ +85°C for industrial
PIC16F873A/874A/876A/877A (Industrial, Extended) Standard Operating Conditions (unless otherwise stated) Operating temperature -40°C ≤ TA ≤ +85°C for industrial -40°C ≤ TA ≤ +125°C for extended
Param No. Symbol Characteristic/ Device Min Typ† Max Units Conditions
D001 VDD Supply Voltage 16LF87XA 2.0 — 5.5 V All configurations (DC to 10 MHz)
D001 D001A 16F87XA 4.0 — 5.5 V All configurations
VBOR 5.5 V BOR enabled, FMAX = 14 MHz(7)
D002 VDR RAM Data Retention Voltage(1) — 1.5 — V
D003 VPOR VDD Start Voltage to ensure internal Power-on Reset signal — VSS — V See Section 14.5 “Power-on Reset (POR)” for details
D004 SVDD VDD Rise Rate to ensure internal Power-on Reset signal 0.05 — — V/ms See Section 14.5 “Power-on Reset (POR)” for details
D005 VBOR Brown-out Reset Voltage 3.65 4.0 4.35 V BODEN bit in configuration word enabled

Legend: Rows with standard voltage device data only are shaded for improved readability.

† Data in “Typ” column is at 5V, 25°C, unless otherwise stated. These parameters are for design guidance only and are not tested.

Note 1: This is the limit to which VDD can be lowered without losing RAM data.

2: The supply current is mainly a function of the operating voltage and frequency. Other factors, such as I/O pin loading, switching rate, oscillator type, internal code execution pattern and temperature, also have an impact on the current consumption.

The test conditions for all IDD measurements in active operation mode are: OSC1 = external square wave, from rail-to-rail; all I/O pins tri-stated, pulled to VDD; MCLR = VDD; WDT enabled/disabled as specified.

3: The power-down current in Sleep mode does not depend on the oscillator type. Power-down current is measured with the part in Sleep mode, with all I/O pins in high-impedance state and tied to VDD and VSS.

4: For RC osc configuration, current through REXT is not included. The current through the resistor can be estimated by the formula Ir = VDD/2REXT (mA) with REXT in kΩ.

5: Timer1 oscillator (when enabled) adds approximately 20 μA to the specification. This value is from characterization and is for design guidance only. This is not tested.

6: The Δ current is the additional current consumed when this peripheral is enabled. This current should be added to the base IDD or IPD measurement.

7: When BOR is enabled, the device will operate correctly until the VBOR voltage trip point is reached.

17.1 DC Characteristics: PIC16F873A/874A/876A/877A (Industrial, Extended) PIC16LF873A/874A/876A/877A (Industrial) (Continued)

PIC16LF873A/874A/876A/877A (Industrial) Standard Operating Conditions (unless otherwise stated) Operating temperature -40°C ≤ TA ≤ +85°C for industrial
PIC16F873A/874A/876A/877A (Industrial, Extended) Standard Operating Conditions (unless otherwise stated) Operating temperature -40°C ≤ TA ≤ +85°C for industrial -40°C ≤ TA ≤ +125°C for extended
Param No. Symbol Characteristic/ Device Min Typ† Max Units Conditions
D010 IDD Supply Current(2,5)
16LF87XA — 0.6 2.0 mA XT, RC osc configurations, FOSC = 4 MHz, VDD = 3.0V
D010 16F87XA — 1.6 4 mA XT, RC osc configurations, FOSC = 4 MHz, VDD = 5.5V
D010A 16LF87XA — 20 35 µA LP osc configuration, FOSC = 32 kHz, VDD = 3.0V, WDT disabled
D013 16F87XA — 7 15 mA HS osc configuration, FOSC = 20 MHz, VDD = 5.5V
D015 ΔIBOR Brown-out Reset Current(6) — 85 200 µA BOR enabled, VDD = 5.0V

Legend: Rows with standard voltage device data only are shaded for improved readability.

† Data in “Typ” column is at 5V, 25°C, unless otherwise stated. These parameters are for design guidance only and are not tested.

Note 1: This is the limit to which VDD can be lowered without losing RAM data.

2: The supply current is mainly a function of the operating voltage and frequency. Other factors, such as I/O pin loading, switching rate, oscillator type, internal code execution pattern and temperature, also have an impact on the current consumption.

The test conditions for all IDD measurements in active operation mode are: OSC1 = external square wave, from rail-to-rail; all I/O pins tri-stated, pulled to VDD; MCLR = VDD; WDT enabled/disabled as specified.

3: The power-down current in Sleep mode does not depend on the oscillator type. Power-down current is measured with the part in Sleep mode, with all I/O pins in high-impedance state and tied to VDD and VSS.

4: For RC osc configuration, current through REXT is not included. The current through the resistor can be estimated by the formula Ir = VDD/2REXT (mA) with REXT in kΩ.

5: Timer1 oscillator (when enabled) adds approximately 20 µA to the specification. This value is from characterization and is for design guidance only. This is not tested.

6: The Δ current is the additional current consumed when this peripheral is enabled. This current should be added to the base IDD or IPD measurement.

7: When BOR is enabled, the device will operate correctly until the VBOR voltage trip point is reached.

17.1 DC Characteristics: PIC16F873A/874A/876A/877A (Industrial, Extended) PIC16LF873A/874A/876A/877A (Industrial) (Continued)

PIC16LF873A/874A/876A/877A (Industrial) Standard Operating Conditions (unless otherwise stated) Operating temperature -40°C ≤ TA ≤ +85°C for industrial
PIC16F873A/874A/876A/877A (Industrial, Extended) Standard Operating Conditions (unless otherwise stated) Operating temperature -40°C ≤ TA ≤ +85°C for industrial -40°C ≤ TA ≤ +125°C for extended
Param No. Symbol Characteristic/ Device Min Typ† Max Units Conditions
D020 IPD Power-down Current(3,5)
16LF87XA — 7.5 30 μA VDD = 3.0V, WDT enabled, -40°C to +85°C
D020 16F87XA — 10.5 42 μA VDD = 4.0V, WDT enabled, -40°C to +85°C
60 μA VDD = 4.0V, WDT enabled, -40°C to +125°C (extended)
D021 16LF87XA — 0.9 5 μA VDD = 3.0V, WDT disabled, 0°C to +70°C
D021 16F87XA — 1.5 16 μA VDD = 4.0V, WDT disabled, -40°C to +85°C
20 μA VDD = 4.0V, WDT disabled, -40°C to +125°C (extended)
D021A 16LF87XA 0.9 5 μA VDD = 3.0V, WDT disabled, -40°C to +85°C
D021A 16F87XA 1.5 19 μA VDD = 4.0V, WDT disabled, -40°C to +85°C
D023 ΔIBOR Brown-out Reset Current(6) — 85 200 μA BOR enabled, VDD = 5.0V

Legend: Rows with standard voltage device data only are shaded for improved readability.

† Data in “Typ” column is at 5V, 25°C, unless otherwise stated. These parameters are for design guidance only and are not tested.

Note 1: This is the limit to which VDD can be lowered without losing RAM data.

2: The supply current is mainly a function of the operating voltage and frequency. Other factors, such as I/O pin loading, switching rate, oscillator type, internal code execution pattern and temperature, also have an impact on the current consumption.

The test conditions for all IDD measurements in active operation mode are:

  • OSC1 = external square wave, from rail-to-rail; all I/O pins tri-stated, pulled to VDD;
  • MCLR = VDD; WDT enabled/disabled as specified.

3: The power-down current in Sleep mode does not depend on the oscillator type. Power-down current is measured with the part in Sleep mode, with all I/O pins in high-impedance state and tied to VDD and Vss.

4: For RC osc configuration, current through REXT is not included. The current through the resistor can be estimated by the formula Ir = VDD/2REXT (mA) with REXT in kΩ.

5: Timer1 oscillator (when enabled) adds approximately 20 μA to the specification. This value is from characterization and is for design guidance only. This is not tested.

6: The Δ current is the additional current consumed when this peripheral is enabled. This current should be added to the base IDD or IPD measurement.

7: When BOR is enabled, the device will operate correctly until the VBOR voltage trip point is reached.

17.2 DC Characteristics: PIC16F873A/874A/876A/877A (Industrial, Extended) PIC16LF873A/874A/876A/877A (Industrial)

DC CHARACTERISTICS Standard Operating Conditions (unless otherwise stated) Operating temperature -40°C ≤ TA ≤ +85°C for industrial -40°C ≤ TA ≤ +125°C for extended Operating voltage VDD range as described in DC specification (Section 17.1)
Param No. Sym Characteristic Min Typ† Max Units Conditions
D030 D030A D031 D032 D033 D034 D034A VIL Input Low Voltage
I/O ports: with TTL buffer VSS — 0.15 VDD V For entire VDD range
VSS — 0.8V V 4.5V ≤ VDD ≤ 5.5V
with Schmitt Trigger buffer VSS — 0.2 VDD V
MCLR, OSC1 (in RC mode) VSS — 0.2 VDD V
OSC1 (in XT and LP modes) VSS — 0.3V V (Note 1)
OSC1 (in HS mode) VSS — 0.3 VDD V
Ports RC3 and RC4: with Schmitt Trigger buffer VSS — 0.3 VDD V For entire VDD range
with SMBus -0.5 — 0.6 V For VDD = 4.5 to 5.5V
D040 D040A D041 D042 D042A D043 D044 D044A VIH Input High Voltage
I/O ports: with TTL buffer 2.0 — VDD V 4.5V ≤ VDD ≤ 5.5V
0.25 VDD + 0.8V — VDD V For entire VDD range
with Schmitt Trigger buffer 0.8 VDD — VDD V For entire VDD range
MCLR 0.8 VDD — VDD V
OSC1 (in XT and LP modes) 1.6V — VDD V (Note 1)
OSC1 (in HS mode) 0.7 VDD — VDD V
OSC1 (in RC mode) 0.9 VDD — VDD V
Ports RC3 and RC4: with Schmitt Trigger buffer 0.7 VDD — VDD V For entire VDD range
with SMBus 1.4 — 5.5 V For VDD = 4.5 to 5.5V
D070 IPURB PORTB Weak Pull-up Current 50 250 400 μA VDD = 5V, VPIN = VSS, -40°C TO +85°C
D060 D061 D063 IIL Input Leakage Current(2, 3)
I/O ports — — ±1 μA VSS ≤ VPIN ≤ VDD, pin at high-impedance
MCLR, RA4/T0CKI — — ±5 μA VSS ≤ VPIN ≤ VDD
OSC1 — — ±5 μA VSS ≤ VPIN ≤ VDD, XT, HS and LP osc configuration
  • These parameters are characterized but not tested. † Data in “Typ” column is at 5V, 25°C unless otherwise stated. These parameters are for design guidance only and are not tested.

Note 1: In RC oscillator configuration, the OSC1/CLKI pin is a Schmitt Trigger input. It is not recommended that the PIC16F87XA be driven with external clock in RC mode. 2: The leakage current on the MCLR pin is strongly dependent on the applied voltage level. The specified levels represent normal operating conditions. Higher leakage current may be measured at different input voltages. 3: Negative current is defined as current sourced by the pin.

DS39582C-page 178 © 2001-2013 Microchip Technology Inc.

17.2 DC Characteristics: PIC16F873A/874A/876A/877A (Industrial, Extended) PIC16LF873A/874A/876A/877A (Industrial) (Continued)

DC CHARACTERISTICS Standard Operating Conditions (unless otherwise stated) Operating temperature -40°C ≤ TA ≤ +85°C for industrial -40°C ≤ TA ≤ +125°C for extended Operating voltage VDD range as described in DC specification (Section 17.1)
Param No. Sym Characteristic Min Typ† Max Units Conditions
D080 VOL Output Low Voltage
I/O ports — — 0.6 V IOL = 8.5 mA, VDD = 4.5V, -40°C to +85°C
D083 OSC2/CLKO (RC osc config) — — 0.6 V IOL = 1.6 mA, VDD = 4.5V, -40°C to +85°C
D090 VOH Output High Voltage
I/O ports⁽³⁾ VDD – 0.7 — — V IOH = -3.0 mA, VDD = 4.5V, -40°C to +85°C
D092 OSC2/CLKO (RC osc config) VDD – 0.7 — — V IOH = -1.3 mA, VDD = 4.5V, -40°C to +85°C
D150* VOD Open-Drain High Voltage — — 8.5 V RA4 pin
D100 Cosc2 Capacitive Loading Specs on Output Pins
OSC2 pin — — 15 pF In XT, HS and LP modes when external clock is used to drive OSC1
D101 CIO All I/O pins and OSC2 (RC mode) — — 50 pF
D102 CB SCL, SDA (I²C mode) — — 400 pF
D120 ED Data EEPROM Memory
Endurance 100K 1M — E/W -40°C to +85°C
D121 VDRW VDD for read/write VMIN — 5.5 V Using EECON to read/write, VMIN = min. operating voltage
D122 TDEW Erase/write cycle time — 4 8 ms
D130 EP Program Flash Memory
Endurance 10K 100K — E/W -40°C to +85°C
D131 VPR VDD for read VMIN — 5.5 V VMIN = min. operating voltage
D132A VDD for erase/write VMIN — 5.5 V Using EECON to read/write, VMIN = min. operating voltage
D133 TPEW Erase/Write cycle time — 4 8 ms
  • These parameters are characterized but not tested. † Data in “Typ” column is at 5V, 25°C unless otherwise stated. These parameters are for design guidance only and are not tested.

Note 1: In RC oscillator configuration, the OSC1/CLKI pin is a Schmitt Trigger input. It is not recommended that the PIC16F87XA be driven with external clock in RC mode. 2: The leakage current on the MCLR pin is strongly dependent on the applied voltage level. The specified levels represent normal operating conditions. Higher leakage current may be measured at different input voltages. 3: Negative current is defined as current sourced by the pin.

TABLE 17-1: COMPARATOR SPECIFICATIONS

Operating Conditions: 3.0V < VDD < 5.5V, -40°C < TA < +85°C (unless otherwise stated)
4.0V < VDD < 5.5V, -40°C < TA < +125°C (unless otherwise stated)

Param No. Sym Characteristics Min Typ Max Units Comments
D300 VIOFF Input Offset Voltage — ± 5.0 ± 10 mV
D301 VICM Input Common Mode Voltage* 0 - VDD – 1.5 V
D302 CMRR Common Mode Rejection Ratio* 55 - — dB
300 TRESP Response Time*(1) — 150 400 ns PIC16F87XA
300A 600 ns PIC16LF87XA
301 TMC2OV Comparator Mode Change to Output Valid* — — 10 μs
  • These parameters are characterized but not tested.

Note 1: Response time measured with one comparator input at (VDD – 1.5)/2 while the other input transitions from VSS to VDD.

TABLE 17-2: VOLTAGE REFERENCE SPECIFICATIONS

Operating Conditions: 3.0V < VDD < 5.5V, -40°C < TA < +85°C (unless otherwise stated)
4.0V < VDD < 5.5V, -40°C < TA < +125°C (unless otherwise stated)

Spec No. Sym Characteristics Min Typ Max Units Comments
D310 VRES Resolution VDD/24 — VDD/32 LSb
D311 VRAA Absolute Accuracy — — 1/2 LSb Low Range (VRR = 1)
— — 1/2 LSb High Range (VRR = 0)
D312 VRUR Unit Resistor Value (R)* — 2k — Ω
310 TSET Settling Time*(1) — — 10 μs
  • These parameters are characterized but not tested.

Note 1: Settling time measured while VRR = 1 and VR<3:0> transitions from ‘0000’ to ‘1111’.

17.3 Timing Parameter Symbology

The timing parameter symbols have been created following one of the following formats:

  1. TppS2ppS
  2. TppS
  3. Tcc:ST (I²C specifications only)
  4. Ts (I²C specifications only)
T F Frequency T Time

Lowercase letters (pp) and their meanings:

pp
cc CCP1 osc OSC1
ck CLKO rd RD
cs CS rw RD or WR
di SDI sc SCK
do SDO ss SS
dt Data in t0 T0CKI
io I/O port t1 T1CKI
mc MCLR wr WR

Uppercase letters and their meanings:

S
F Fall P Period
H High R Rise
I Invalid (High-impedance) V Valid
L Low Z High-impedance

I²C only

AA output access High High
BUF Bus free Low Low

Tcc:ST (I²C specifications only)

CC
HD Hold SU Setup
ST STO Stop condition
DAT Data input hold
STA Start condition

FIGURE 17-3: LOAD CONDITIONS

Figure from the manual

RL = 464Ω
CL = 50 pF for all pins except OSC2, but including PORTD and PORTE outputs as ports,
15 pF for OSC2 output

Note: PORTD and PORTE are not implemented on PIC16F873A/876A devices.

FIGURE 17-4: EXTERNAL CLOCK TIMING

Figure from the manual

TABLE 17-3: EXTERNAL CLOCK TIMING REQUIREMENTS

Param No. Symbol Characteristic Min Typ† Max Units Conditions
FOSC External CLKI Frequency (Note 1) DC — 1 MHz XT and RC Osc mode
DC — 20 MHz HS Osc mode
DC — 32 kHz LP Osc mode
Oscillator Frequency (Note 1) DC — 4 MHz RC Osc mode
0.1 — 4 MHz XT Osc mode
4 — 20 MHz HS Osc mode
5 — 200 kHz LP Osc mode
1 TOSC External CLKI Period (Note 1) 1000 — — ns XT and RC Osc mode
50 — — ns HS Osc mode
5 — — µs LP Osc mode
Oscillator Period (Note 1) 250 — — ns RC Osc mode
250 — 1 µs XT Osc mode
100 — 250 ns HS Osc mode
50 — 250 ns HS Osc mode
31.25 — — µs LP Osc mode
2 TCY Instruction Cycle Time (Note 1) 200 TCY DC ns TCY = 4/FOSC
3 TOSL, TOSH External Clock in (OSC1) High or Low Time 100 — — ns XT oscillator
2.5 — — µs LP oscillator
15 — — ns HS oscillator
4 TOSR, TOSF External Clock in (OSC1) Rise or Fall Time — — 25 ns XT oscillator
— — 50 ns LP oscillator
— — 15 ns HS oscillator

† Data in “Typ” column is at 5V, 25°C unless otherwise stated. These parameters are for design guidance only and are not tested.

Note 1: Instruction cycle period (TCY) equals four times the input oscillator time base period. All specified values are based on characterization data for that particular oscillator type, under standard operating conditions, with the device executing code. Exceeding these specified limits may result in an unstable oscillator operation and/or higher than expected current consumption. All devices are tested to operate at “min.” values with an external clock applied to the OSC1/CLKI pin. When an external clock input is used, the “max.” cycle time limit is “DC” (no clock) for all devices.

FIGURE 17-5: CLKO AND I/O TIMING

Figure from the manual

Note: Refer to Figure 17-3 for load conditions.

TABLE 17-4: CLKO AND I/O TIMING REQUIREMENTS

Param No. Symbol Characteristic Min Typ† Max Units Conditions
10* TOSH2ckL OSC1 ↑ to CLKO ↓ — 75 200 ns (Note 1)
11* TOSH2ckH OSC1 ↑ to CLKO ↑ — 75 200 ns (Note 1)
12* TckR CLKO Rise Time — 35 100 ns (Note 1)
13* TckF CLKO Fall Time — 35 100 ns (Note 1)
14* TckL2ioV CLKO ↓ to Port Out Valid — — 0.5 TCY + 20 ns (Note 1)
15* TioV2ckH Port In Valid before CLKO ↑ TOSC + 200 — — ns (Note 1)
16* TckH2ioI Port In Hold after CLKO ↑ 0 — — ns (Note 1)
17* TOSH2ioV OSC1 ↑ (Q1 cycle) to Port Out Valid — 100 255 ns
18* TOSH2ioI OSC1 ↑ (Q2 cycle) to Port Input Invalid (I/O in hold time) Standard (F) 100 — ns
Extended (LF) 200 — ns
19* TioV2osH Port Input Valid to OSC1 ↑ (I/O in setup time) 0 — — ns
20* TioR Port Output Rise Time Standard (F) — 10 40 ns
Extended (LF) — — 145 ns
21* TioF Port Output Fall Time Standard (F) — 10 40 ns
Extended (LF) — — 145 ns
22††* TINP INT pin High or Low Time TCY — — ns
23††* TRBP RB7:RB4 Change INT High or Low Time TCY — — ns
  • These parameters are characterized but not tested. † Data in “Typ” column is at 5V, 25°C unless otherwise stated. These parameters are for design guidance only and are not tested. †† These parameters are asynchronous events not related to any internal clock edges. Note 1: Measurements are taken in RC mode where CLKO output is 4 x TOSC.

FIGURE 17-6: RESET, WATCHDOG TIMER, OSCILLATOR START-UP TIMER AND POWER-UP TIMER TIMING

Figure from the manual

Note: Refer to Figure 17-3 for load conditions.

FIGURE 17-7: BROWN-OUT RESET TIMING

Figure from the manual

TABLE 17-5: RESET, WATCHDOG TIMER, OSCILLATOR START-UP TIMER, POWER-UP TIMER AND BROWN-OUT RESET REQUIREMENTS

Param No. Symbol Characteristic Min Typ† Max Units Conditions
30 TMCL MCLR Pulse Width (low) 2 — — µs VDD = 5V, -40°C to +85°C
31* TWDT Watchdog Timer Time-out Period (no prescaler) 7 18 33 ms VDD = 5V, -40°C to +85°C
32 TOST Oscillation Start-up Timer Period — 1024 TOSC — — TOSC = OSC1 period
33* TPWRT Power-up Timer Period 28 72 132 ms VDD = 5V, -40°C to +85°C
34 Tioz I/O High-Impedance from MCLR Low or Watchdog Timer Reset — — 2.1 µs
35 TBOR Brown-out Reset Pulse Width 100 — — µs VDD ≤ VBOR (D005)
  • These parameters are characterized but not tested. † Data in “Typ” column is at 5V, 25°C unless otherwise stated. These parameters are for design guidance only and are not tested.

FIGURE 17-8: TIMER0 AND TIMER1 EXTERNAL CLOCK TIMINGS

Figure from the manual

Note: Refer to Figure 17-3 for load conditions.

TABLE 17-6: TIMER0 AND TIMER1 EXTERNAL CLOCK REQUIREMENTS

Param No. Symbol Characteristic Min Typ† Max Units Conditions
40* Tt0H T0CKI High Pulse Width No Prescaler 0.5 TCY + 20 — — ns Must also meet parameter 42
With Prescaler 10 — — ns
41* Tt0L T0CKI Low Pulse Width No Prescaler 0.5 TCY + 20 — — ns Must also meet parameter 42
With Prescaler 10 — — ns
42* Tt0P T0CKI Period No Prescaler TCY + 40 — — ns
With Prescaler Greater of: 20 or TCY + 40 / N — — ns N = prescale value (2, 4,..., 256)
45* Tt1H T1CKI High Time Synchronous, Prescaler = 1 0.5 TCY + 20 — — ns Must also meet parameter 47
Synchronous, Prescaler = 2, 4, 8 Standard(F) 15 — — ns
Extended(LF) 25 — — ns
Asynchronous Standard(F) 30 — — ns
Extended(LF) 50 — — ns
46* Tt1L T1CKI Low Time Synchronous, Prescaler = 1 0.5 TCY + 20 — — ns Must also meet parameter 47
Synchronous, Prescaler = 2, 4, 8 Standard(F) 15 — — ns
Extended(LF) 25 — — ns
Asynchronous Standard(F) 30 — — ns
Extended(LF) 50 — — ns
47* Tt1P T1CKI Input Period Synchronous Standard(F) Greater of: 30 or TCY + 40 / N — — ns N = prescale value (1, 2, 4, 8)
Extended(LF) Greater of: 50 or TCY + 40 / N N = prescale value (1, 2, 4, 8)
Asynchronous Standard(F) 60 — — ns
Extended(LF) 100 — — ns
Ft1 Timer1 Oscillator Input Frequency Range (oscillator enabled by setting bit T1OSCEN) DC — 200 kHz
48 TCKEZTMR1 Delay from External Clock Edge to Timer Increment 2 TOSC — 7 TOSC —
  • These parameters are characterized but not tested. † Data in “Typ” column is at 5V, 25°C unless otherwise stated. These parameters are for design guidance only and are not tested.

FIGURE 17-9: CAPTURE/COMPARE/PWM TIMINGS (CCP1 AND CCP2)

Figure from the manual

Note: Refer to Figure 17-3 for load conditions.

TABLE 17-7: CAPTURE/COMPARE/PWM REQUIREMENTS (CCP1 AND CCP2)

Param No. Symbol Characteristic Min Typ† Max Units Conditions
50* TccL CCP1 and CCP2 Input Low Time No Prescaler 0.5 TCY + 20 — — ns
With Prescaler Standard(F) 10 — — ns
Extended(LF) 20 — — ns
51* TccH CCP1 and CCP2 Input High Time No Prescaler 0.5 TCY + 20 — — ns
With Prescaler Standard(F) 10 — — ns
Extended(LF) 20 — — ns
52* TccP CCP1 and CCP2 Input Period 3 TCY + 40 / N — — ns N = prescale value (1, 4 or 16)
53* TccR CCP1 and CCP2 Output Rise Time Standard(F) — 10 25 ns
Extended(LF) — 25 50 ns
54* TccF CCP1 and CCP2 Output Fall Time Standard(F) — 10 25 ns
Extended(LF) — 25 45 ns
  • These parameters are characterized but not tested. † Data in “Typ” column is at 5V, 25°C unless otherwise stated. These parameters are for design guidance only and are not tested.

FIGURE 17-10: PARALLEL SLAVE PORT TIMING (PIC16F874A/877A ONLY)

Figure from the manual

Note: Refer to Figure 17-3 for load conditions.

TABLE 17-8: PARALLEL SLAVE PORT REQUIREMENTS (PIC16F874A/877A ONLY)

Param No. Symbol Characteristic Min Typ† Max Units Conditions
62 TDTV2WRH Data In Valid before \overlineWR ↑ or \overlineCS ↑ (setup time) 20 — — ns
63* TWRH2DTI \overlineWR ↑ or \overlineCS ↑ to Data-in Invalid (hold time) Standard(F) 20 — — ns
Extended(LF) 35 — — ns
64 TRDL2DTV \overlineRD ↓ and \overlineCS ↓ to Data-out Valid — — 80 ns
65 TRDH2DTI \overlineRD ↑ or \overlineCS ↓ to Data-out Invalid 10 — 30 ns
  • These parameters are characterized but not tested. † Data in “Typ” column is at 5V, 25°C unless otherwise stated. These parameters are for design guidance only and are not tested.

FIGURE 17-11: SPI MASTER MODE TIMING (CKE = 0, SMP = 0)

Figure from the manual

Note: Refer to Figure 17-3 for load conditions.

FIGURE 17-12: SPI MASTER MODE TIMING (CKE = 1, SMP = 1)

Figure from the manual

Note: Refer to Figure 17-3 for load conditions.

DS39582C-page 188 © 2001-2013 Microchip Technology Inc.

FIGURE 17-13: SPI SLAVE MODE TIMING (CKE = 0)

Figure from the manual

Note: Refer to Figure 17-3 for load conditions.

FIGURE 17-14: SPI SLAVE MODE TIMING (CKE = 1)

Figure from the manual

Note: Refer to Figure 17-3 for load conditions.

TABLE 17-9: SPI MODE REQUIREMENTS

Param No. Symbol Characteristic Min Typ† Max Units Conditions
70* TssL2sCH, TssL2sCL SS ↓ to SCK ↓ or SCK ↑ Input TCY — — ns
71* TSCH SCK Input High Time (Slave mode) TCY + 20 — — ns
72* TSCL SCK Input Low Time (Slave mode) TCY + 20 — — ns
73* TdI/V2sCH, TdI/V2sCL Setup Time of SDI Data Input to SCK Edge 100 — — ns
74* TSCH2dIL, TSCL2dIL Hold Time of SDI Data Input to SCK Edge 100 — — ns
75* TdoR SDO Data Output Rise Time Standard(F) — 10 25 ns
Extended(LF) — 25 50 ns
76* TdoF SDO Data Output Fall Time — 10 25 ns
77* TssH2doZ SS ↑ to SDO Output High-Impedance 10 — 50 ns
78* TscR SCK Output Rise Time (Master mode) Standard(F) — 10 25 ns
Extended(LF) — 25 50 ns
79* TscF SCK Output Fall Time (Master mode) — 10 25 ns
80* TSCH2doV, TSCL2doV SDO Data Output Valid after SCK Edge Standard(F) — — 50 ns
Extended(LF) — — 145 ns
81* TdoV2sCH, TdoV2sCL SDO Data Output Setup to SCK Edge TCY — — ns
82* TssL2doV SDO Data Output Valid after SS ↓ Edge — — 50 ns
83* TSCH2ssH, TSCL2ssH SS ↑ after SCK Edge 1.5 TCY + 40 — — ns
  • These parameters are characterized but not tested. † Data in “Typ” column is at 5V, 25°C unless otherwise stated. These parameters are for design guidance only and are not tested.

FIGURE 17-15: I²C BUS START/STOP BITS TIMING

Figure from the manual

Note: Refer to Figure 17-3 for load conditions.

TABLE 17-10: I²C BUS START/STOP BITS REQUIREMENTS

Param No. Symbol Characteristic Min Typ Max Units Conditions
90 TSU:STA Start condition Setup time 100 kHz mode 4700 — — ns Only relevant for Repeated Start condition
400 kHz mode 600 — —
91 THD:STA Start condition Hold time 100 kHz mode 4000 — — ns After this period, the first clock pulse is generated
400 kHz mode 600 — —
92 TSU:STO Stop condition Setup time 100 kHz mode 4700 — — ns
400 kHz mode 600 — —
93 THD:STO Stop condition Hold time 100 kHz mode 4000 — — ns
400 kHz mode 600 — —

FIGURE 17-16: I²C BUS DATA TIMING

Figure from the manual

Note: Refer to Figure 17-3 for load conditions.

TABLE 17-11: I²C BUS DATA REQUIREMENTS

Param No. Sym Characteristic Min Max Units Conditions
100 THIGH Clock High Time 100 kHz mode 4.0 — µs
400 kHz mode 0.6 — µs
SSP Module 0.5 TCY —
101 TLOW Clock Low Time 100 kHz mode 4.7 — µs
400 kHz mode 1.3 — µs
SSP Module 0.5 TCY —
102 TR SDA and SCL Rise Time 100 kHz mode — 1000 ns
400 kHz mode 20 + 0.1 CB 300 ns CB is specified to be from 10 to 400 pF
103 TF SDA and SCL Fall Time 100 kHz mode — 300 ns
400 kHz mode 20 + 0.1 CB 300 ns CB is specified to be from 10 to 400 pF
90 TSU:STA Start Condition Setup Time 100 kHz mode 4.7 — µs Only relevant for Repeated Start condition
400 kHz mode 0.6 — µs
91 THD:STA Start Condition Hold Time 100 kHz mode 4.0 — µs After this period, the first clock pulse is generated
400 kHz mode 0.6 — µs
106 THD:DAT Data Input Hold Time 100 kHz mode 0 — ns
400 kHz mode 0 0.9 µs
107 TSU:DAT Data Input Setup Time 100 kHz mode 250 — ns (Note 2)
400 kHz mode 100 — ns
92 TSU:STO Stop Condition Setup Time 100 kHz mode 4.7 — µs
400 kHz mode 0.6 — µs
109 TAA Output Valid from Clock 100 kHz mode — 3500 ns (Note 1)
400 kHz mode — — ns
110 TBUF Bus Free Time 100 kHz mode 4.7 — µs Time the bus must be free before a new transmission can start
400 kHz mode 1.3 — µs
CB Bus Capacitive Loading — 400 pF

Note 1: As a transmitter, the device must provide this internal minimum delay time to bridge the undefined region (min. 300 ns) of the falling edge of SCL to avoid unintended generation of Start or Stop conditions.

Note 2: A fast mode (400 kHz) I²C bus device can be used in a standard mode (100 kHz) I²C bus system, but the requirement that, TSU:DAT ≥ 250 ns, must then be met. This will automatically be the case if the device does not stretch the LOW period of the SCL signal. If such a device does stretch the LOW period of the SCL signal, it must output the next data bit to the SDA line, TR MAX. + TSU:DAT = 1000 + 250 = 1250 ns (according to the standard mode I²C bus specification), before the SCL line is released.

FIGURE 17-17: USART SYNCHRONOUS TRANSMISSION (MASTER/SLAVE) TIMING

Figure from the manual

Note: Refer to Figure 17-3 for load conditions.

TABLE 17-12: USART SYNCHRONOUS TRANSMISSION REQUIREMENTS

Param No. Symbol Characteristic Min Typ† Max Units Conditions
120 TCKH2DTV SYNC XMIT (MASTER & SLAVE) Clock High to Data Out Valid — — 80 ns Standard(F)
— — 100 ns Extended(LF)
121 TCKRF Clock Out Rise Time and Fall Time (Master mode) — — 45 ns Standard(F)
— — 50 ns Extended(LF)
122 TDTRF Data Out Rise Time and Fall Time — — 45 ns Standard(F)
— — 50 ns Extended(LF)

† Data in “Typ” column is at 5V, 25°C unless otherwise stated. These parameters are for design guidance only and are not tested.

FIGURE 17-18: USART SYNCHRONOUS RECEIVE (MASTER/SLAVE) TIMING

Figure from the manual

Note: Refer to Figure 17-3 for load conditions.

TABLE 17-13: USART SYNCHRONOUS RECEIVE REQUIREMENTS

Param No. Symbol Characteristic Min Typ† Max Units Conditions
125 TDTV2CKL SYNC RCV (MASTER & SLAVE) Data Setup before CK ↓ (DT setup time) 15 — — ns
126 TCKL2DTL Data Hold after CK ↓ (DT hold time) 15 — — ns

† Data in “Typ” column is at 5V, 25°C unless otherwise stated. These parameters are for design guidance only and are not tested.

TABLE 17-14: A/D CONVERTER CHARACTERISTICS:PIC16F873A/874A/876A/877A (INDUSTRIAL) PIC16LF873A/874A/876A/877A (INDUSTRIAL)

Param No. Sym Characteristic Min Typ† Max Units Conditions
A01 NR Resolution — — 10-bits bit VREF = VDD = 5.12V, VSS ≤ VAIN ≤ VREF
A03 EIL Integral Linearity Error — — < ± 1 LSb VREF = VDD = 5.12V, VSS ≤ VAIN ≤ VREF
A04 EDL Differential Linearity Error — — < ± 1 LSb VREF = VDD = 5.12V, VSS ≤ VAIN ≤ VREF
A06 EOFF Offset Error — — < ± 2 LSb VREF = VDD = 5.12V, VSS ≤ VAIN ≤ VREF
A07 EGN Gain Error — — < ± 1 LSb VREF = VDD = 5.12V, VSS ≤ VAIN ≤ VREF
A10 — Monotonicity — guaranteed(3) — — VSS ≤ VAIN ≤ VREF
A20 VREF Reference Voltage (VREF+ – VREF-) 2.0 — VDD + 0.3 V
A21 VREF+ Reference Voltage High AVDD – 2.5V — AVDD + 0.3V V
A22 VREF- Reference Voltage Low AVSS – 0.3V — VREF+ – 2.0V V
A25 VAIN Analog Input Voltage VSS – 0.3V — VREF + 0.3V V
A30 ZAIN Recommended Impedance of Analog Voltage Source — — 2.5 kΩ (Note 4)
A40 IAD A/D Conversion Current (VDD) PIC16F87XA — 220 — μA Average current consumption when A/D is on (Note 1)
PIC16LF87XA — 90 — μA
A50 IREF VREF Input Current (Note 2) — — 5 μA During VAIN acquisition. Based on differential of VHOLD to VAIN to charge CHOLD, see Section 11.1 “A/D Acquisition Requirements”.
— — 150 μA During A/D conversion cycle
  • These parameters are characterized but not tested. † Data in “Typ” column is at 5V, 25°C unless otherwise stated. These parameters are for design guidance only and are not tested.

Note 1: When A/D is off, it will not consume any current other than minor leakage current. The power-down current spec includes any such leakage from the A/D module.

2: VREF current is from RA3 pin or VDD pin, whichever is selected as reference input.

3: The A/D conversion result never decreases with an increase in the input voltage and has no missing codes.

4: Maximum allowed impedance for analog voltage source is 10 kΩ. This requires higher acquisition time.

FIGURE 17-19: A/D CONVERSION TIMING

Figure from the manual

Note: If the A/D clock source is selected as RC, a time of TCY is added before the A/D clock starts. This allows the SLEEP instruction to be executed.

TABLE 17-15: A/D CONVERSION REQUIREMENTS

Param No. Symbol Characteristic Min Typ† Max Units Conditions
130 TAD A/D Clock Period PIC16F87XA 1.6 — — µs TOSC based, VREF ≥ 3.0V
PIC16LF87XA 3.0 — — µs TOSC based, VREF ≥ 2.0V
PIC16F87XA 2.0 4.0 6.0 µs A/D RC mode
PIC16LF87XA 3.0 6.0 9.0 µs A/D RC mode
131 TCNV Conversion Time (not including S/H time) (Note 1) — 12 TAD
132 TACQ Acquisition Time (Note 2) 40 — µs
10* — — µs The minimum time is the amplifier settling time. This may be used if the “new” input voltage has not changed by more than 1 LSb (i.e., 20.0 mV @ 5.12V) from the last sampled voltage (as stated on CHOLD).
134 TGO Q4 to A/D Clock Start — TOSC/2 § — — If the A/D clock source is selected as RC, a time of TCY is added before the A/D clock starts. This allows the SLEEP instruction to be executed.
  • These parameters are characterized but not tested. † Data in “Typ” column is at 5V, 25°C unless otherwise stated. These parameters are for design guidance only and are not tested. § This specification ensured by design. Note 1: ADRES register may be read on the following TCY cycle. Note 2: See Section 11.1 “A/D Acquisition Requirements” for minimum conditions.

NOTES:

DS39582C-page 196 © 2001-2013 Microchip Technology Inc.

Text converted from the manufacturer's document. A □ marks a character that could not be read in the original. Back to the Microchip PIC16 discussions