16F84 MICROCHIP [Microchip Technology], 16F84 Datasheet

no-image

16F84

Manufacturer Part Number
16F84
Description
18-pin Flash/EEPROM 8-Bit Microcontrollers
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet
Devices Included in this Data Sheet:
• PIC16F83
• PIC16F84
• PIC16CR83
• PIC16CR84
• Extended voltage range devices available
High Performance RISC CPU Features:
• Only 35 single word instructions to learn
• All instructions single cycle except for program
• Operating speed: DC - 10 MHz clock input
• 14-bit wide instructions
• 8-bit wide data path
• 15 special function hardware registers
• Eight-level deep hardware stack
• Direct, indirect and relative addressing modes
• Four interrupt sources:
• 1000 erase/write cycles Flash program memory
• 10,000,000 erase/write cycles EEPROM data mem-
• EEPROM Data Retention > 40 years
Peripheral Features:
• 13 I/O pins with individual direction control
• High current sink/source for direct LED drive
• TMR0: 8-bit timer/counter with 8-bit
M
PIC16F83
PIC16F84
PIC16CR83 512 ROM
PIC16CR84 1 K ROM
1998 Microchip Technology Inc.
(PIC16LF8X, PIC16LCR8X)
branches which are two-cycle
- External RB0/INT pin
- TMR0 timer overflow
- PORTB<7:4> interrupt on change
- Data EEPROM write complete
ory
- 25 mA sink max. per pin
- 20 mA source max. per pin
programmable prescaler
Device
Program
Memory
(words)
512 Flash
1 K Flash
18-pin Flash/EEPROM 8-Bit Microcontrollers
DC - 400 ns instruction cycle
Data
RAM
(bytes)
36
68
36
68
Data
EEPROM
(bytes)
64
64
64
64
Max.
Freq
(MHz)
10
10
10
10
Pin Diagrams
Special Microcontroller Features:
• In-Circuit Serial Programming (ICSP™) - via two
• Power-on Reset (POR)
• Power-up Timer (PWRT)
• Oscillator Start-up Timer (OST)
• Watchdog Timer (WDT) with its own on-chip RC
• Code-protection
• Power saving SLEEP mode
• Selectable oscillator options
CMOS Flash/EEPROM Technology:
• Low-power, high-speed technology
• Fully static design
• Wide operating voltage range:
• Low power consumption:
pins (ROM devices support only Data EEPROM
programming)
oscillator for reliable operation
- Commercial: 2.0V to 6.0V
- Industrial:
- < 2 mA typical @ 5V, 4 MHz
- 15 A typical @ 2V, 32 kHz
- < 1 A typical standby current @ 2V
RA4/T0CKI
RB0/INT
MCLR
RA2
RA3
RB1
RB2
RB3
V
SS
PIC16F8X
2.0V to 6.0V
2
3
4
5
6
7
8
9
1
PDIP, SOIC
18
17
16
15
14
13
12
11
10
DS30430C-page 1
RA1
RA0
OSC1/CLKIN
OSC2/CLKOUT
V
RB7
RB6
RB5
RB4
DD

Related parts for 16F84

16F84 Summary of contents

Page 1

... M 18-pin Flash/EEPROM 8-Bit Microcontrollers Devices Included in this Data Sheet: • PIC16F83 • PIC16F84 • PIC16CR83 • PIC16CR84 • Extended voltage range devices available (PIC16LF8X, PIC16LCR8X) High Performance RISC CPU Features: • Only 35 single word instructions to learn • All instructions single cycle except for program branches which are two-cycle • ...

Page 2

... Data EEPROM Memory.............................................................................................................................................................. 33 8.0 Special Features of the CPU ...................................................................................................................................................... 37 9.0 Instruction Set Summary ............................................................................................................................................................ 53 10.0 Development Support ................................................................................................................................................................. 69 11.0 Electrical Characteristics for PIC16F83 and PIC16F84.............................................................................................................. 73 12.0 Electrical Characteristics for PIC16CR83 and PIC16CR84........................................................................................................ 85 13.0 DC & AC Characteristics Graphs/Tables.................................................................................................................................... 97 14.0 Packaging Information .............................................................................................................................................................. 109 Appendix A: Feature Improvements - From PIC16C5X To PIC16F8X .......................................................................................... 113 Appendix B: Code Compatibility - from PIC16C5X to PIC16F8X.................................................................................................. 113 Appendix C: What’ ...

Page 3

... The PIC16F8X is a group in the PIC16CXX family of low-cost, high-performance, CMOS, fully-static, 8-bit microcontrollers. This group contains the following devices: • PIC16F83 • PIC16F84 • PIC16CR83 • PIC16CR84 All PICmicro™ microcontrollers employ an advanced RISC architecture. PIC16F8X devices have enhanced core features, eight-level deep stack, and multiple internal and external interrupt sources ...

Page 4

... All PICmicro™ Family devices have Power-on Reset, selectable Watchdog Timer, selectable code protect and high I/O current capa- bility. All PIC16F8X Family devices use serial programming with clock pin RB6 and data pin RB7. DS30430C-page 4 PIC16F83 PIC16CR83 PIC16F84 512 — ...

Page 5

... Identification System” at the back of this data sheet to specify the correct part number. There are four device “types” as indicated in the device number PIC16F84. These devices have Flash program memory and operate over the standard voltage range PIC16LF84. These devices have Flash program memory and operate over an extended voltage range ...

Page 6

PIC16F8X NOTES: DS30430C-page 6 1998 Microchip Technology Inc. ...

Page 7

... Consequently, all instructions exe- cute in a single cycle except for program branches. The PIC16F83 and PIC16CR83 address 512 program memory, and the PIC16F84 and PIC16CR84 address program memory. All program mem- ory is internal. The PIC16CXX can directly or indirectly address its register fi ...

Page 8

... Decode & Start-up Timer Control Power-on Reset Watchdog Timing Timer Generation OSC2/CLKOUT MCLR OSC1/CLKIN DS30430C-page 8 Data Bus 8 RAM File Registers PIC16F83/CR83 PIC16F84/CR84 RAM Addr Addr Mux 7 Indirect Direct Addr Addr FSR reg STATUS reg 8 MUX ALU W reg ...

Page 9

TABLE 3-1 PIC16F8X PINOUT DESCRIPTION DIP SOIC I/O/P Pin Name No. No. Type OSC1/CLKIN 16 16 OSC2/CLKOUT 15 15 MCLR 4 4 I/P RA0 17 17 I/O RA1 18 18 I/O RA2 1 1 I/O RA3 2 2 I/O RA4/T0CKI ...

Page 10

PIC16F8X 3.1 Clocking Scheme/Instruction Cycle The clock input (from OSC1) is internally divided by four to generate four non-overlapping quadrature clocks namely Q1, Q2, Q3 and Q4. Internally, the program counter (PC) is incremented every Q1, the instruction is fetched ...

Page 11

... PIC16F83 and PIC16CR83, the first 512 x 14 (0000h-01FFh) are physically (Figure 4-1). For the PIC16F84 and PIC16CR84, the first (0000h-03FFh) are physically imple- mented (Figure 4-2). Accessing a location above the physically implemented address will cause a wrap- around. For example, for the PIC16F84 locations 20h, 420h, 820h, C20h, 1020h, 1420h, 1820h, and 1C20h will be the same instruction ...

Page 12

PIC16F8X 4.2 Data Memory Organization The data memory is partitioned into two areas. The first is the Special Function Registers (SFR) area, while the second is the General Purpose Registers (GPR) area. The SFRs control the operation of the device. ...

Page 13

... AFh B0h 4Fh 50h FFh 7Fh Unimplemented data memory location; read as '0'. Note 1: Not a physical register. PIC16F8X REGISTER FILE MAP - PIC16F84/CR84 File Address (1) (1) Indirect addr. 80h TMR0 OPTION 81h PCL PCL 82h STATUS STATUS 83h ...

Page 14

PIC16F8X TABLE 4-1 REGISTER FILE SUMMARY Address Name Bit 7 Bit 6 Bank 0 00h INDF Uses contents of FSR to address data memory (not a physical register) 01h TMR0 8-bit real-time clock/counter 02h PCL Low order 8 bits of ...

Page 15

STATUS REGISTER The STATUS register contains the arithmetic status of the ALU, the RESET status and the bank select bit for data memory. As with any register, the STATUS register can be the destination for any instruction. If the ...

Page 16

PIC16F8X 4.2.2.2 OPTION_REG REGISTER The OPTION_REG register is a readable and writable register which contains various control bits to configure the TMR0/WDT prescaler, the external INT interrupt, TMR0, and the weak pull-ups on PORTB. FIGURE 4-1: OPTION_REG REGISTER (ADDRESS 81h) ...

Page 17

INTCON REGISTER The INTCON register is a readable and writable register which contains the various enable bits for all interrupt sources. FIGURE 4-1: INTCON REGISTER (ADDRESS 0Bh, 8Bh) R/W-0 R/W-0 R/W-0 R/W-0 GIE EEIE T0IE INTE bit7 bit 7: ...

Page 18

... PROGRAM MEMORY PAGING The PIC16F83 and PIC16CR83 have 512 words of pro- gram memory. The PIC16F84 and PIC16CR84 have 1K of program memory. The CALL and GOTO instruc- tions have an 11-bit address range. This 11-bit address range allows a branch within a 2K program memory page size ...

Page 19

... Memory 30h (2) 4Fh (2) 50h 7Fh Bank 0 Note 1: PIC16F83 and PIC16CR83 devices. 2: PIC16F84 and PIC16CR84 devices 3: For memory map detail see Figure 4-1. 1998 Microchip Technology Inc. A simple program to clear RAM locations 20h-2Fh using indirect addressing is shown in Example 4-2. EXAMPLE 4-2: movlw movwf NEXT clrf ...

Page 20

PIC16F8X NOTES: DS30430C-page 20 1998 Microchip Technology Inc. ...

Page 21

I/O PORTS The PIC16F8X has two ports, PORTA and PORTB. Some port pins are multiplexed with an alternate func- tion for other features on the device. 5.1 PORTA and TRISA Registers PORTA is a 5-bit wide latch. RA4 is ...

Page 22

PIC16F8X TABLE 5-1 PORTA FUNCTIONS Name Bit0 Buffer Type RA0 bit0 TTL RA1 bit1 TTL RA2 bit2 TTL RA3 bit3 TTL RA4/T0CKI bit4 ST Legend: TTL = TTL input Schmitt Trigger input TABLE 5-2 SUMMARY OF REGISTERS ASSOCIATED ...

Page 23

PORTB and TRISB Registers PORTB is an 8-bit wide bi-directional port. The corresponding data direction register is TRISB. A '1' on any bit in the TRISB register puts the corresponding output driver in a hi-impedance mode. A '0' on ...

Page 24

PIC16F8X EXAMPLE 5-1: INITIALIZING PORTB CLRF PORTB ; Initialize PORTB by ; setting output ; data latches BSF STATUS, RP0 ; Select Bank 1 MOVLW 0xCF ; Value used to ; initialize data ; direction MOVWF TRISB ; Set RB<3:0> ...

Page 25

I/O Programming Considerations 5.3.1 BI-DIRECTIONAL I/O PORTS Any instruction which writes, operates internally as a read followed by a write operation. The BCF and BSF instructions, for example, read the register into the CPU, execute the bit operation and ...

Page 26

PIC16F8X NOTES: DS30430C-page 26 1998 Microchip Technology Inc. ...

Page 27

TIMER0 MODULE AND TMR0 REGISTER The Timer0 module timer/counter has the following features: • 8-bit timer/counter • Readable and writable • 8-bit software programmable prescaler • Internal or external clock select • Interrupt on overflow from FFh to 00h ...

Page 28

PIC16F8X FIGURE 6-3: TMR0 TIMING: INTERNAL CLOCK/PRESCALE 1 ...

Page 29

Using TMR0 with External Clock When an external clock input is used for TMR0, it must meet certain requirements. The external clock requirement is due to internal phase clock (T synchronization. Also, there is a delay in the actual ...

Page 30

PIC16F8X FIGURE 6-5: TIMER0 TIMING WITH EXTERNAL CLOCK Ext. Clock Input or Prescaler Out (Note 2) Ext. Clock/Prescaler Output After Sampling Increment TMR0 (Q4) ...

Page 31

SWITCHING PRESCALER ASSIGNMENT The prescaler assignment is fully under software control (i.e., it can be changed “on the fly” during program execution). Note: To avoid an unintended device RESET, the following instruction (Example 6-1) must be executed when changing ...

Page 32

PIC16F8X NOTES: DS30430C-page 32 1998 Microchip Technology Inc. ...

Page 33

DATA EEPROM MEMORY The EEPROM data memory is readable and writable during normal operation (full V range). This memory DD is not directly mapped in the register file space. Instead it is indirectly addressed through the Special Function Registers. ...

Page 34

PIC16F8X 7.2 EECON1 and EECON2 Registers EECON1 is the control register with five low order bits physically implemented. The upper-three bits are non- existent and read as '0's. Control bits RD and WR initiate read and write, respectively. These bits ...

Page 35

Write Verify Depending on the application, good programming practice may dictate that the value written to the Data EEPROM should be verified (Example 7-1) to the desired value to be written. This should be used in applications where an ...

Page 36

PIC16F8X NOTES: DS30430C-page 36 1998 Microchip Technology Inc. ...

Page 37

SPECIAL FEATURES OF THE CPU What sets a microcontroller apart from other processors are special circuits to deal with the needs of real time applications. The PIC16F8X has a host of such features intended to maximize system reliability, minimize ...

Page 38

... WDTE: Watchdog Timer Enable bit 1 = WDT enabled 0 = WDT disabled bit 1:0 FOSC1:FOSC0: Oscillator Selection bits oscillator oscillator oscillator oscillator FIGURE 8-2: CONFIGURATION WORD - PIC16F83 AND PIC16F84 R/P-u R/P-u R/P-u R/P-u R/P-u R/P-u R/P-u R/P-u R/P-u R/P bit13 bit 13:4 CP: Code Protection bit 1 = Code protection off 0 = All memory is code protected ...

Page 39

Oscillator Configurations 8.2.1 OSCILLATOR TYPES The PIC16F8X can be operated in four different oscillator modes. The user can configuration bits (FOSC1 and FOSC0) to select one of these four modes: • LP Low Power Crystal • XT Crystal/Resonator • ...

Page 40

PIC16F8X 8.2.3 EXTERNAL CRYSTAL OSCILLATOR CIRCUIT Either a prepackaged oscillator can be used or a simple oscillator circuit with TTL gates can be built. Prepackaged oscillators provide a wide operating range and better stability. A well-designed crystal oscillator will provide ...

Page 41

Reset The PIC16F8X differentiates between various kinds of reset: • Power-on Reset (POR) • MCLR reset during normal operation • MCLR reset during SLEEP • WDT Reset (during normal operation) • WDT Wake-up (during SLEEP) Figure 8-8 shows a ...

Page 42

PIC16F8X TABLE 8-3 RESET CONDITION FOR PROGRAM COUNTER AND THE STATUS REGISTER Condition Power-on Reset MCLR Reset during normal operation MCLR Reset during SLEEP WDT Reset (during normal operation) WDT Wake-up Interrupt wake-up from SLEEP Legend unchanged, x ...

Page 43

Power-on Reset (POR) A Power-on Reset pulse is generated on-chip when V rise is detected (in the range of 1.2V - 1.7V take advantage of the POR, just tie the MCLR pin directly (or through a resistor) ...

Page 44

PIC16F8X FIGURE 8-10: TIME-OUT SEQUENCE ON POWER-UP (MCLR NOT TIED MCLR INTERNAL POR PWRT TIME-OUT OST TIME-OUT INTERNAL RESET FIGURE 8-11: TIME-OUT SEQUENCE ON POWER-UP (MCLR NOT TIED MCLR INTERNAL POR PWRT ...

Page 45

FIGURE 8-12: TIME-OUT SEQUENCE ON POWER-UP (MCLR TIED MCLR INTERNAL POR PWRT TIME-OUT OST TIME-OUT INTERNAL RESET FIGURE 8-13: TIME-OUT SEQUENCE ON POWER-UP (MCLR TIED MCLR INTERNAL POR PWRT TIME-OUT OST TIME-OUT ...

Page 46

PIC16F8X 8.7 Time-out Sequence and Power-down Status Bits (TO/PD) On power-up (Figure 8-10, Figure 8-11, Figure 8-12 and Figure 8-13) the time-out sequence is as follows: First PWRT time-out is invoked after a POR has expired. Then the OST is ...

Page 47

Interrupts The PIC16F8X has 4 sources of interrupt: • External interrupt RB0/INT pin • TMR0 overflow interrupt • PORTB change interrupts (pins RB7:RB4) • Data EEPROM write complete interrupt The interrupt control register (INTCON) records individual interrupt requests in ...

Page 48

PIC16F8X FIGURE 8-17: INT PIN INTERRUPT TIMING OSC1 CLKOUT 3 4 INT pin 1 INTF flag 5 (INTCON<1>) GIE bit (INTCON<7>) INSTRUCTION FLOW PC PC Instruction Inst (PC) fetched Instruction Inst (PC-1) executed Note 1: ...

Page 49

Context Saving During Interrupts During an interrupt, only the return PC value is saved on the stack. Typically, users wish to save key register values during an interrupt (e.g., W register and STATUS register). This is implemented in software. ...

Page 50

PIC16F8X 8.11 Watchdog Timer (WDT) The Watchdog Timer is a free running on-chip RC oscillator which does not require any external components. This RC oscillator is separate from the RC oscillator of the OSC1/CLKIN pin. That means that the WDT ...

Page 51

Power-down Mode (SLEEP) A device may be powered down (SLEEP) and later powered up (Wake-up from SLEEP). 8.12.1 SLEEP The Power-down mode is entered by executing the SLEEP instruction. If enabled, the Watchdog Timer is cleared (but keeps running), ...

Page 52

PIC16F8X 8.12.3 WAKE-UP USING INTERRUPTS When global interrupts are disabled (GIE cleared) and any interrupt source has both its interrupt enable bit and interrupt flag bit set, one of the following will occur: • If the interrupt occurs before the ...

Page 53

INSTRUCTION SET SUMMARY Each PIC16CXX 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 PIC16CXX instruction set summary in Table ...

Page 54

PIC16F8X TABLE 9-2 PIC16FXX INSTRUCTION SET Mnemonic, Description Operands BYTE-ORIENTED FILE REGISTER OPERATIONS ADDWF f, d Add W and f ANDWF f, d AND W with f CLRF f CLRW - COMF f, d Complement f DECF f, d Decrement ...

Page 55

Instruction Descriptions ADDLW Add Literal and W Syntax: [ label ] ADDLW k Operands 255 Operation: ( (W) Status Affected: C, DC, Z Encoding: 11 111x Description: The contents of the W register are added ...

Page 56

PIC16F8X BCF Bit Clear f Syntax: [ label ] BCF f,b Operands 127 Operation: 0 (f<b>) Status Affected: None Encoding: 01 00bb bfff Description: Bit 'b' in register 'f' is cleared Words: 1 Cycles: 1 ...

Page 57

BTFSS Bit Test f, Skip if Set Syntax: [ label ] BTFSS f,b Operands 127 0 b < 7 Operation: skip if (f<b> Status Affected: None Encoding: 01 11bb Description: If bit 'b' in register 'f' ...

Page 58

PIC16F8X CLRF Clear f [ label ] CLRF Syntax: f Operands 127 Operation: 00h ( Status Affected: Z Encoding: 00 0001 1fff Description: The contents of register 'f' are cleared and the Z bit is set. ...

Page 59

COMF Complement f Syntax: [ label ] COMF f,d Operands 127 d [0,1] Operation: (f) (destination) Status Affected: Z Encoding: 00 1001 dfff Description: The contents of register 'f' are comple- mented the result ...

Page 60

PIC16F8X GOTO Unconditional Branch [ label ] Syntax: GOTO k Operands 2047 Operation: k PC<10:0> PCLATH<4:3> PC<12:11> Status Affected: None Encoding: 10 1kkk Description: GOTO is an unconditional branch. The eleven bit immediate value is loaded into PC ...

Page 61

INCFSZ Increment f, Skip if 0 Syntax: [ label ] INCFSZ f,d Operands 127 d [0,1] Operation: ( (destination), skip if result = 0 Status Affected: None Encoding: 00 1111 Description: The contents of register 'f' ...

Page 62

PIC16F8X IORWF Inclusive OR W with f Syntax: [ label ] IORWF Operands 127 d [0,1] Operation: (W) .OR. (f) (destination) Status Affected: Z Encoding: 00 0100 dfff Description: Inclusive OR the W register with regis- ter 'f'. ...

Page 63

NOP No Operation Syntax: [ label ] NOP Operands: None Operation: No operation Status Affected: None Encoding: 00 0000 Description: No operation. Words: 1 Cycles Cycle Activity Decode No-Opera No-Opera tion Example NOP OPTION Load Option ...

Page 64

PIC16F8X RETLW Return with Literal in W Syntax: [ label ] RETLW k Operands 255 Operation: k (W); TOS PC Status Affected: None Encoding: 11 01xx Description: The W register is loaded with the eight bit literal 'k'. ...

Page 65

RLF Rotate Left f through Carry Syntax: [ label ] RLF Operands 127 d [0,1] Operation: See description below Status Affected: C Encoding: 00 1101 Description: The contents of register 'f' are rotated one bit to the left ...

Page 66

PIC16F8X SLEEP Syntax: [ label ] SLEEP Operands: None Operation: 00h WDT, 0 WDT prescaler Status Affected: TO, PD Encoding: 00 0000 Description: The power-down status bit cleared. Time-out status bit set. ...

Page 67

SUBWF Subtract W from f [ label ] Syntax: SUBWF f,d Operands 127 d [0,1] Operation: (f) - (W) destination) Status Affected: C, DC, Z Encoding: 00 0010 Description: Subtract (2’s complement method) W reg- ister from register ...

Page 68

PIC16F8X XORLW Exclusive OR Literal with W Syntax: [ label ] XORLW k Operands 255 Operation: (W) .XOR Status Affected: Z Encoding: 11 1010 Description: The contents of the W register are XOR’ed with the eight ...

Page 69

DEVELOPMENT SUPPORT 10.1 Development Tools The PICmicr microcontrollers are supported with a full range of hardware and software development tools: • PICMASTER /PICMASTER CE Real-Time In-Circuit Emulator • ICEPIC Low-Cost PIC16C5X and PIC16CXXX In-Circuit Emulator • PRO MATE II ...

Page 70

PIC16F8X 10.6 PICDEM-1 Low-Cost PICmicro Demonstration Board The PICDEM simple board which demonstrates the capabilities of several of Microchip’s microcontrol- lers. The microcontrollers supported are: PIC16C5X (PIC16C54 to PIC16C58A), PIC16C61, PIC16C62X, PIC16C71, PIC16C8X, PIC17C42, PIC17C43 and PIC17C44. All ...

Page 71

MPASM has the following features to assist in develop- ing software for specific use applications. • Provides translation of Assembler source code to object code for all Microchip microcontrollers. • Macro assembly capability. • Produces all the files (Object, Listing, ...

Page 72

PIC12C5XX PIC14000 PIC16C5X PICMASTER / PICMASTER-CE ü ü ü In-Circuit Emulator ICEPIC Low-Cost In-Circuit Emulator ü ü MPLAB Integrated Development ü ü ü Environment MPLAB C17 Compiler fuzzy TECH -MP Explorer/Edition Fuzzy Logic ü ü ü Dev. Tool MP-DriveWay Applications ...

Page 73

... ELECTRICAL CHARACTERISTICS FOR PIC16F83 AND PIC16F84 Absolute Maximum Ratings † Ambient temperature under bias.............................................................................................................- +125 C Storage temperature .............................................................................................................................. - +150 C Voltage on V with respect to V .......................................................................................................... -0.3 to +7. (2) Voltage on MCLR with respect to V Voltage on any pin with respect (1) Total power dissipation ...

Page 74

... Freq: 200 kHz max. The shaded sections indicate oscillator selections which are tested for functionality, but not for MIN/MAX specifica- tions recommended that the user select the device type that ensures the specifications required. DS30430C-page 74 PIC16F83/84 PIC16F84-10 PIC16F83- 4.5V to 5.5V ...

Page 75

... V — V See section on Power-on Reset for details SS 0.05* — — V/ms See section on Power-on Reset for details RC and XT osc configuration — 1.8 4 — 7 (During Flash programming) HS osc configuration (PIC16F84-10) — (3) — 7 — 1 — 1.0 16 ...

Page 76

PIC16F8X 10.2 DC CHARACTERISTICS: DC Characteristics Power Supply Pins Parameter Sym Characteristic No. D001 V Supply Voltage DD D002 V RAM Data Retention DR (1) Voltage D003 V V start voltage to POR DD ensure internal Power-on Reset signal D004 ...

Page 77

... Higher leakage current may be measured at different input volt- ages. 3: Negative current is defined as coming out of the pin. 4: The user may choose the better of the two specs. 1998 Microchip Technology Inc. PIC16F83/84 PIC16F84, PIC16F83 (Commercial, Industrial) PIC16LF84, PIC16LF83 (Commercial, Industrial) Standard Operating Conditions (unless otherwise stated) Operating temperature 0 C -40 C ...

Page 78

... PIC16F8X 10.4 DC CHARACTERISTICS: PIC16F84, PIC16F83 (Commercial, Industrial) DC Characteristics All Pins Except Power Supply Pins Parameter Sym Characteristic No. Capacitive Loading Specs on Output Pins D100 C OSC2 pin OSC2 D101 C All I/O pins and OSC2 IO (RC mode) Data EEPROM Memory D120 E Endurance D D121 V V for read/write ...

Page 79

TABLE 10-2 TIMING PARAMETER SYMBOLOGY The timing parameter symbols have been created fol- lowing one of the following formats: 1. TppS2ppS 2. TppS T F Frequency Lowercase symbols (pp) and their meanings CLKOUT cy cycle time ...

Page 80

PIC16F8X 10.5 Timing Diagrams and Specifications FIGURE 10-3: EXTERNAL CLOCK TIMING Q4 Q1 OSC1 CLKOUT TABLE 10-3 EXTERNAL CLOCK TIMING REQUIREMENTS Parameter No. Sym Characteristic F External CLKIN Frequency OSC Oscillator Frequency 1 Tosc External CLKIN Period (1) Oscillator Period ...

Page 81

FIGURE 10-4: CLKOUT AND I/O TIMING Q4 OSC1 CLKOUT I/O Pin (input) I/O Pin old value (output) Note: All tests must be done with specified capacitive loads (Figure 10- I/O pins and CLKOUT. TABLE 10-4 CLKOUT AND ...

Page 82

PIC16F8X FIGURE 10-5: RESET, WATCHDOG TIMER, OSCILLATOR START-UP TIMER AND POWER-UP TIMER TIMING V DD MCLR Internal POR 33 PWRT Time-out 32 OSC Time-out Internal RESET Watchdog Timer RESET I/O Pins TABLE 10-5 RESET, WATCHDOG TIMER, OSCILLATOR START-UP TIMER AND ...

Page 83

FIGURE 10-6: TIMER0 CLOCK TIMINGS RA4/T0CKI TABLE 10-6 TIMER0 CLOCK REQUIREMENTS Parameter Sym Characteristic No. 40 Tt0H T0CKI High Pulse Width 41 Tt0L T0CKI Low Pulse Width 42 Tt0P T0CKI Period * These parameters are characterized but not tested. C ...

Page 84

PIC16F8X NOTES: DS30430C-page 84 PIC16F83/84 1998 Microchip Technology Inc. ...

Page 85

ELECTRICAL CHARACTERISTICS FOR PIC16CR83 AND PIC16CR84 Absolute Maximum Ratings † Ambient temperature under bias.............................................................................................................- +125 C Storage temperature .............................................................................................................................. - +150 C Voltage on V with respect to V .......................................................................................................... -0.3 to +7. ...

Page 86

PIC16F8X TABLE 11-1 CROSS REFERENCE OF DEVICE SPECS FOR OSCILLATOR CONFIGURATIONS AND FREQUENCIES OF OPERATION (COMMERCIAL DEVICES) PIC16CR84-04 OSC PIC16CR83- 4. 4.5 mA max max. ...

Page 87

DC CHARACTERISTICS: DC Characteristics Power Supply Pins Sym Characteristic Parameter No. D001 V Supply Voltage DD D001A D002 V RAM Data Retention DR (1) Voltage D003 V V start voltage to POR DD ensure internal Power-on Reset signal D004 ...

Page 88

PIC16F8X 11.2 DC CHARACTERISTICS: DC Characteristics Power Supply Pins Parameter Sym Characteristic No. D001 V Supply Voltage DD D002 V RAM Data Retention DR (1) Voltage D003 V V start voltage to POR DD ensure internal Power-on Reset signal D004 ...

Page 89

DC CHARACTERISTICS: DC Characteristics All Pins Except Power Supply Pins Parame- ter Sym Characteristic No. Input Low Voltage V I/O ports IL D030 with TTL buffer D030A D031 with Schmitt Trigger buffer D032 MCLR, RA4/T0CKI D033 OSC1 (XT, HS ...

Page 90

PIC16F8X 11.4 DC CHARACTERISTICS: PIC16CR84, PIC16CR83 (Commercial, Industrial) DC Characteristics All Pins Except Power Supply Pins Parameter Sym Characteristic No. Capacitive Loading Specs on Output Pins D100 C OSC2 pin OSC2 D101 C All I/O pins and OSC2 IO (RC ...

Page 91

TABLE 11-2 TIMING PARAMETER SYMBOLOGY The timing parameter symbols have been created fol- lowing one of the following formats: 1. TppS2ppS 2. TppS T F Frequency Lowercase symbols (pp) and their meanings CLKOUT cy cycle time ...

Page 92

PIC16F8X 11.5 Timing Diagrams and Specifications FIGURE 11-3: EXTERNAL CLOCK TIMING Q4 Q1 OSC1 CLKOUT TABLE 11-3 EXTERNAL CLOCK TIMING REQUIREMENTS Parameter No. Sym Characteristic F External CLKIN Frequency OSC Oscillator Frequency 1 Tosc External CLKIN Period (1) Oscillator Period ...

Page 93

FIGURE 11-4: CLKOUT AND I/O TIMING Q4 OSC1 CLKOUT I/O Pin (input) I/O Pin old value (output) Note: All tests must be done with specified capacitive loads (Figure 11- I/O pins and CLKOUT. TABLE 11-4 CLKOUT AND ...

Page 94

PIC16F8X FIGURE 11-5: RESET, WATCHDOG TIMER, OSCILLATOR START-UP TIMER AND POWER-UP TIMER TIMING V DD MCLR Internal POR 33 PWRT Time-out 32 OSC Time-out Internal RESET Watchdog Timer RESET I/O Pins TABLE 11-5 RESET, WATCHDOG TIMER, OSCILLATOR START-UP TIMER AND ...

Page 95

FIGURE 11-6: TIMER0 CLOCK TIMINGS RA4/T0CKI TABLE 11-6 TIMER0 CLOCK REQUIREMENTS Parameter Sym Characteristic No. 40 Tt0H T0CKI High Pulse Width 41 Tt0L T0CKI Low Pulse Width 42 Tt0P T0CKI Period * These parameters are characterized but not tested. C ...

Page 96

PIC16F8X NOTES: DS30430C-page 96 PIC16CR83/84 1998 Microchip Technology Inc. ...

Page 97

DC & AC CHARACTERISTICS GRAPHS/TABLES The graphs and tables provided in this section are for design guidance and are not tested or guaranteed. In some graphs or tables, the data presented are outside specified operating range (i.e., outside specified ...

Page 98

PIC16F8X FIGURE 12-2: TYPICAL RC OSCILLATOR FREQUENCY vs. V 5.5 5.0 4.5 4.0 3.5 3.0 2.5 2.0 1.5 1.0 0.5 0.0 2.0 DS30430C-page Measured on DIP Packages 25˚ 10k ...

Page 99

FIGURE 12-3: TYPICAL RC OSCILLATOR FREQUENCY vs. V 1.8 1.6 1.4 1.2 1.0 0.8 0.6 0.4 0.2 0.0 2.0 FIGURE 12-4: TYPICAL RC OSCILLATOR FREQUENCY vs. V 0.6 0.5 0.4 0.3 0.2 0.1 0.0 2.0 1998 Microchip Technology Inc. , ...

Page 100

PIC16F8X FIGURE 12-5: TYPICAL I vs WATCHDOG DISABLED 6.0 5 4.0 3.0 2.0 1.0 0.0 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 V (Volts) DD FIGURE 12-7: V (INPUT THRESHOLD VOLTAGE) OF ...

Page 101

FIGURE 12-8: V (INPUT THRESHOLD VOLTAGE) OF OSC1 INPUT TH (IN XT, HS, AND LP MODES) vs. V 3.0 2.8 2.6 2.4 2.2 2.0 1.8 1.6 1.4 1.2 1.0 0.8 2.0 2.5 3.0 Note: This input pin is CMOS input. ...

Page 102

PIC16F8X FIGURE 12-10: TYPICAL I vs. FREQUENCY (RC MODE @20PF 10000 1000 6.0V 5.5V 5.0V 4.5V 4.0V 3.5V 100 3.0V 2.5V 2.0V 10 100000 DS30430C-page 102 TYPICAL IDD vs FREQ (RC MODE @20pF) 1000000 FREQ (Hz) 10000000 ...

Page 103

FIGURE 12-11: TYPICAL I vs. FREQUENCY (RC MODE @100PF 10000 1000 6.0V 100 5.0V 4.5V 4.0V 3.5V 3.0V 2.5V 2.0V 10 10000 1998 Microchip Technology Inc. TYPICAL IDD vs FREQ (RC MODE @100 pF) 5.5V 100000 1000000 ...

Page 104

PIC16F8X FIGURE 12-12: TYPICAL I vs. FREQUENCY (RC MODE @300PF 1000 6.0V 5.5V 100 5.0V 4.5V 4.0V 3.5V 3.0V 2.5V 2.0V 10 10000 DS30430C-page 104 TYPICAL IDD vs FREQ (RC MODE @300pF) 100000 FREQ (Hz) 1000000 1998 ...

Page 105

FIGURE 12-13: WDT TIMER TIME-OUT PERIOD vs Typ + 3.0 4.0 5.0 2.0 V (Volts) DD 1998 Microchip Technology Inc. FIGURE 12-14: TRANSCONDUCTANCE (gm OSCILLATOR ...

Page 106

PIC16F8X FIGURE 12-15: TRANSCONDUCTANCE (gm OSCILLATOR vs Typ + 3.0 4.0 5.0 2.0 V (Volts) DD DS30430C-page 106 FIGURE 12-16: TRANSCONDUCTANCE (gm OSCILLATOR vs. ...

Page 107

FIGURE 12-17 –5 –10 Typ +25 C –15 –20 –25 0.0 0.5 1.0 1.5 2.0 V (Volts) OH FIGURE 12-18 ...

Page 108

PIC16F8X FIGURE 12-21: TYPICAL DATA MEMORY ERASE/WRITE CYCLE TIME VS. VDD 1.5 2.0 2.5 Shaded area is beyond recommended range. TABLE 12-2 INPUT CAPACITANCE* Pin Name PORTA PORTB MCLR ...

Page 109

... For OTP marking beyond this, certain price adders apply. Please check with your Microchip Sales Office. For QTP devices, any special marking adders are included in QTP price. 1998 Microchip Technology Inc. PIC16F8X Example PIC16F84-04I/P 9632SAW Example PIC16F84-04 /SO 9648SAN DS30430C-page 109 ...

Page 110

PIC16F8X Package Type: K04-007 18-Lead Plastic Dual In-line (P) – 300 mil Units Dimension Limits PCB Row Spacing Number of Pins Pitch Lower Lead Width Upper Lead Width Shoulder Radius Lead Thickness Top ...

Page 111

Package Type: K04-051 18-Lead Plastic Small Outline (SO) – Wide, 300 mil Units Dimension Limits Pitch p Number of Pins n Overall Pack. Height A Shoulder Height A1 Standoff A2 ‡ ...

Page 112

PIC16F8X NOTES: DS30430C-page 112 1998 Microchip Technology Inc. ...

Page 113

APPENDIX A: FEATURE IMPROVEMENTS - FROM PIC16C5X TO PIC16F8X The following is the list of feature improvements over the PIC16C5X microcontroller family: 1. Instruction word length is increased to 14 bits. This allows larger page sizes both in program memory ...

Page 114

... PIC16F8X devices has been added appendix on conversion considerations has been added. This explains differences for cus- tomers wanting to go from PIC16C84 to PIC16F84 or similar device. DS30430C-page 114 APPENDIX D: WHAT’S CHANGED IN THIS DATA SHEET Here’s what’s changed in this data sheet: 1 ...

Page 115

... APPENDIX E: CONVERSION CONSIDERATIONS - PIC16C84 TO PIC16F83/F84 AND PIC16CR83/CR84 Considerations for converting from the PIC16C84 to the PIC16F84 are listed in the table below. These con- siderations apply to converting from the PIC16C84 to the PIC16F83 (same as PIC16F84 except for program Difference The polarity of the PWRTE bit has been reversed ...

Page 116

PIC16F8X NOTES: DS30430C-page 116 1998 Microchip Technology Inc. ...

Page 117

INDEX Numerics 8.1 Configuration Bits ......................................................... 37 A Absolute Maximum Ratings ......................................... 73, 85 ALU ...................................................................................... 7 Architectural Overview ......................................................... 7 Assembler MPASM Assembler .................................................... 70 B Block Diagram Interrupt Logic ............................................................ 47 On-Chip Reset Circuit ................................................ 41 RA3:RA0 and ...

Page 118

PIC16F8X P Paging, Program Memory .................................................. 18 PCL .............................................................................. 18, 42 PCLATH ....................................................................... 18 .......................................................................... 15, 41, 46 PICDEM-1 Low-Cost PICmicro Demo Board ..................... 70 PICDEM-2 Low-Cost PIC16CXX Demo Board .................. 70 PICDEM-3 Low-Cost PIC16CXXX Demo Board ................ ...

Page 119

ON-LINE SUPPORT Microchip provides on-line support on the Microchip World Wide Web (WWW) site. The web site is used by Microchip as a means to make files and information easily available to customers. To view the site, the user must ...

Page 120

PIC16F8X READER RESPONSE It is our intention to provide you with the best documentation possible to ensure successful use of your Microchip prod- uct. If you wish to provide your comments on organization, clarity, subject matter, and ways in which ...

Page 121

... For latest version information and upgrade kits for Microchip Development Tools, please call 1-800-755-2345 or 1-602-786-7302. 1998 Microchip Technology Inc. /XX XXX Examples: Package Pattern a) PIC16F84 -04/P 301 = Commercial temp., PDIP package, 4 MHz, normal V DD (3) b) PIC16LF84 - 04I/SO = Industrial temp., (3) SOIC package, 200 kHz, Extended V (3) limits ...

Page 122

PIC16F8X NOTES: DS30430C-page 122 1998 Microchip Technology Inc. ...

Page 123

NOTES: 1998 Microchip Technology Inc. PIC16F8X DS30430C-page 123 ...

Page 124

M W ORLDWIDE AMERICAS Corporate Office Microchip Technology Inc. 2355 West Chandler Blvd. Chandler, AZ 85224-6199 Tel: 602-786-7200 Fax: 602-786-7277 Technical Support: 602 786-7627 Web: http://www.microchip.com Atlanta Microchip Technology Inc. 500 Sugar Mill Road, Suite 200B Atlanta, GA 30350 Tel: ...

Related keywords