PIC16C84 Microchip Technology, PIC16C84 Datasheet

no-image

PIC16C84

Manufacturer Part Number
PIC16C84
Description
8 BIT CMOS EEPROM MICROCONTROLLERS
Manufacturer
Microchip Technology
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC16C84-04/SO
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
www.DataSheet4U.com
High Performance RISC CPU Features:
• Only 35 single word instructions to learn
• All instructions single cycle (400 ns @ 10 MHz)
• Operating speed: DC - 10 MHz clock input
• 14-bit wide instructions
• 8-bit wide data path
• 1K x 14 EEPROM program memory
• 36 x 8 general purpose registers (SRAM)
• 64 x 8 on-chip EEPROM data memory
• 15 special function hardware registers
• Eight-level deep hardware stack
• Direct, indirect and relative addressing modes
• Four interrupt sources:
• 1,000,000 data memory EEPROM
• 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
Special Microcontroller Features:
• 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
• Serial In-System Programming - via two pins
M
1997 Microchip Technology Inc.
except for program branches which are two-cycle
- External RB0/INT pin
- TMR0 timer overflow
- PORTB<7:4> interrupt on change
- Data EEPROM write complete
ERASE/WRITE cycles
- 25 mA sink max. per pin
- 20 mA source max. per pin
programmable prescaler
oscillator for reliable operation
DC - 400 ns instruction cycle
8-bit CMOS EEPROM Microcontroller
Pin Diagram
CMOS Technology:
• Low-power, high-speed CMOS EEPROM
• Fully static design
• Wide operating voltage range:
• Low power consumption:
technology
- Commercial: 2.0V to 6.0V
- Industrial:
- < 2 mA typical @ 5V, 4 MHz
- 60 A typical @ 2V, 32 kHz
- 26 A typical standby current @ 2V
PDIP, SOIC
RA4/T0CKI
RB0/INT
MCLR
RA2
RA3
RB1
RB2
RB3
V
SS
PIC16C84
2.0V to 6.0V
2
3
4
5
6
7
8
9
1
18
17
16
15
14
13
12
11
10
DS30445C-page 1
RA1
RA0
OSC1/CLKIN
OSC2/CLKOUT
V
RB7
RB6
RB5
RB4
DD

Related parts for PIC16C84

PIC16C84 Summary of contents

Page 1

... Code protection • Power saving SLEEP mode • Selectable oscillator options • Serial In-System Programming - via two pins 1997 Microchip Technology Inc. 8-bit CMOS EEPROM Microcontroller DC - 400 ns instruction cycle PIC16C84 Pin Diagram PDIP, SOIC RA2 1 18 RA1 RA3 ...

Page 2

... Timer0 Module and TMR0 Register............................................................................................................................................. 25 7.0 Data EEPROM Memory............................................................................................................................................................... 31 8.0 Special Features of the CPU ....................................................................................................................................................... 35 9.0 Instruction Set Summary.............................................................................................................................................................. 51 10.0 Development Support .................................................................................................................................................................. 67 11.0 Electrical Characteristics for PIC16C84....................................................................................................................................... 71 12.0 DC & AC Characteristics Graphs/Tables for PIC16C84 .............................................................................................................. 83 13.0 Packaging Information ................................................................................................................................................................. 97 Appendix A: Feature Improvements - From PIC16C5X To PIC16C84 ............................................................................................ 99 Appendix B: Code Compatibility - from PIC16C5X to PIC16C84.................................................................................................... 99 Appendix C: What’ ...

Page 3

... PIC16CXX microcontrollers typically achieve a 2:1 code compression and 2:1 speed improvement (at 10 MHz) over other 8-bit microcontrollers in their class. The PIC16C84 has 36 bytes of RAM, 64 bytes of Data EEPROM memory, and 13 I/O pins. A timer/counter is also available. The PIC16CXX family has special features to reduce external components, thus reducing cost, enhancing system reliability and reducing power consumption ...

Page 4

... PIC16C84 TABLE 1-1 PIC16C8X FAMILY OF DEVICES Maximum Frequency Clock of Operation (MHz) Flash Program Memory EEPROM Program Memory Memory ROM Program Memory Data Memory (bytes) Data EEPROM (bytes) Peripherals Timer Module(s) Interrupt Sources I/O Pins Features Voltage Range (Volts) www.DataSheet4U.com Packages All PICmicro™ Family devices have Power-on Reset, selectable Watchdog Timer, selectable code protect and high I/O current capa- bility ...

Page 5

... PIC16C84 DEVICE VARIETIES A variety of frequency ranges and packaging options are available. Depending on application and production requirements the proper device option can be selected using the information in this section. When placing orders, please use Identification System” at the back of this data sheet to specify the correct part number. There are two device “ ...

Page 6

... PIC16C84 NOTES: www.DataSheet4U.com DS30445C-page 6 1997 Microchip Technology Inc. ...

Page 7

... This symmetrical nature and lack of ‘special optimal situations’ make programming with the PIC16CXX simple yet efficient. In addition, the learning curve is reduced significantly. The PIC16C84 has SRAM and EEPROM data memory. 1997 Microchip Technology Inc. PIC16C84 PIC16CXX devices contain an 8-bit ALU and working register ...

Page 8

... PIC16C84 FIGURE 3-1: PIC16C84 BLOCK DIAGRAM EEPROM Program Memory Program Bus 14 Instruction reg www.DataSheet4U.com Instruction Decode & Control Timing Generation OSC2/CLKOUT OSC1/CLKIN DS30445C-page 8 13 Data Bus 8 Program Counter RAM 8 Level Stack File Registers (13-bit RAM Addr Addr Mux 5 7 Direct Addr ...

Page 9

... Positive supply for logic and I/O pins output I/O = Input/Output — = Not used TTL = TTL input PIC16C84 Can also be selected to be the clock input to the TMR0 timer/ counter. Output is open drain type. RB0/INT can also be selected as an external interrupt pin. Interrupt on change pin. ...

Page 10

... PIC16C84 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 from the program memory and latched into the instruction register in Q4. The instruction is decoded and executed during the following Q1 through Q4 ...

Page 11

... Program Memory Organization The PIC16CXX has a 13-bit program counter capable of addressing program memory space. For the PIC16C84, only the first (0000h-03FFh) are physically implemented (Figure 4-1). Accessing a loca- tion above the physically implemented address will cause a wraparound. For example, locations 20h, 420h, 820h, C20h, 1020h, 1420h, 1820h, and 1C20h will be the same instruction ...

Page 12

... PIC16C84 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. Portions of data memory are banked. This is for both the SFR area and the GPR area ...

Page 13

... EEIF WRERR EEPROM control register 2 (not a physical register) — — — Write buffer for upper 5 bits of the PC GIE EEIE T0IE INTE RBIE PIC16C84 Value on Value on all Bit 2 Bit 1 Bit 0 Power-on other resets Reset (Note3) ---- ---- ---- ---- xxxx xxxx uuuu uuuu 0000 0000 ...

Page 14

... R/W-x R/W-x R/W not used by the PIC16C84 and should be programmed as cleared. Use of these bits as general purpose R/W bits is NOT recommended, since this may affect upward compatibility with future products. and digit borrow out bit, respectively, in subtraction. See the SUBLW and SUBWF instructions for examples. ...

Page 15

... PIC16C84 Note: When the prescaler is assigned to the WDT (PSA = '1'), TMR0 has a 1:1 prescaler assignment. R/W-1 R/W-1 PS1 PS0 R = Readable bit W = Writable bit bit0 U = Unimplemented bit, read as ‘0’ Value at POR reset ...

Page 16

... PIC16C84 4.2.2.3 INTCON REGISTER The INTCON register is a readable and writable register which contains the various enable bits for all interrupt sources. FIGURE 4-5: INTCON REGISTER (ADDRESS 0Bh, 8Bh) R/W-0 R/W-0 R/W-0 GIE EEIE T0IE bit7 www.DataSheet4U.com bit 7: GIE: Global Interrupt Enable bit 1 = Enables all un-masked interrupts 0 = Disables all interrupts Note: For the operation of the interrupt structure, please refer to Section 8 ...

Page 17

... PCLATH<4:3> is not required for the return instructions (which “pops” the PC from the stack). 1997 Microchip Technology Inc. 4.4 The PIC16C84 has an 8 deep x 13-bit wide hardware stack (Figure 4-1). The stack space is not part of either program or data space and the stack pointer is not readable or writable. ...

Page 18

... A simple program to clear RAM locations 20h-2Fh using indirect addressing is shown in Example 4-2. EXAMPLE 4-2: NEXT CONTINUE An effective 9-bit address is obtained by concatenating the 8-bit FSR register and the IRP bit (STATUS<7>), as shown in Figure 4-7. However, IRP is not used in the PIC16C84 00h not used not used ...

Page 19

... I/O PORTS The PIC16C84 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 a Schmitt Trigger input and an open drain output. All other RA port pins have TTL input levels and full CMOS output drivers ...

Page 20

... PIC16C84 TABLE 5-1 PORTA FUNCTIONS Name Bit0 RA0 bit0 RA1 bit1 RA2 bit2 RA3 bit3 RA4/T0CKI bit4 Legend: TTL = TTL input Schmitt Trigger input TABLE 5-2 SUMMARY OF REGISTERS ASSOCIATED WITH PORTA www.DataSheet4U.com Address Name Bit 7 05h PORTA — 85h TRISA — Legend unknown unchanged unimplemented read as '0'. Shaded cells are unimplemented, read as '0' ...

Page 21

... Port and PIC16C84 This interrupt can wake the device from SLEEP. The user, in the interrupt service routine, can clear the interrupt in the following manner: a) Read (or write) PORTB. This will end the mis- match condition. b) Clear flag bit RBIF. ...

Page 22

... PIC16C84 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> as inputs ; RB<5:4> as outputs ; RB<7:6> as inputs TABLE 5-3 PORTB FUNCTIONS Name Bit www.DataSheet4U.com RB0/INT bit0 RB1 bit1 RB2 ...

Page 23

... T PD MOVWF PORTB MOVF PORTB,W write to PORTB PIC16C84 5.3.2 SUCCESSIVE OPERATIONS ON I/O PORTS The actual write to an I/O port happens at the end of an instruction cycle, whereas for reading, the data must be valid at the beginning of the instruction cycle (Figure 5- 5). Therefore, care must be exercised if a write followed by a read operation is carried out on the same I/O port ...

Page 24

... PIC16C84 NOTES: www.DataSheet4U.com DS30445C-page 24 1997 Microchip Technology Inc. ...

Page 25

... NT0 Write TMR0 Read TMR0 executed reads NT0 PIC16C84 edge select bit, T0SE (OPTION<4>). Clearing bit T0SE selects the rising edge. Restrictions on the external clock input are discussed in detail in Section 6.2. The prescaler is shared between the Timer0 Module and the Watchdog Timer. The prescaler assignment is ...

Page 26

... PIC16C84 FIGURE 6-3: TMR0 TIMING: INTERNAL CLOCK/PRESCALE 1 PC-1 Instruction Fetch T0 TMR0 Instruction Execute FIGURE 6-4: TMR0 INTERRUPT TIMING www.DataSheet4U.com Q1 Q2 OSC1 (3) CLKOUT TMR0 timer FEh 1 4 T0IF bit (INTCON< ...

Page 27

... TMR0 T0 indicate where sampling occurs. A small clock pulse may be missed by sampling. PIC16C84 6.2.2 TMR0 INCREMENT DELAY Since the prescaler output is synchronized with the internal clocks, there is a small delay from the time the external clock edge occurs to the time the Timer0 Module is actually incremented ...

Page 28

... PIC16C84 FIGURE 6-6: BLOCK DIAGRAM OF THE TMR0/WDT PRESCALER CLKOUT (= Fosc/4) RA4/T0CKI pin T0SE www.DataSheet4U.com Watchdog Timer WDT Enable bit Note: T0CS, T0SE, PSA, PS2:PS0 are bits in the OPTION register. DS30445C-page T0CS PSA 0 8-bit Prescaler 1MUX ...

Page 29

... Timer0 module’s register GIE EEIE T0IE INTE RBIE RBPU INTEDG T0CS T0SE PSA — — — TRISA4 TRISA3 PIC16C84 EXAMPLE 6-1: CHANGING PRESCALER (TIMER0 WDT) BCF STATUS, RP0 ;Bank 0 CLRF TMR0 ;Clear TMR0 ; and Prescaler BSF STATUS, RP0 ;Bank 1 CLRWDT ;Clears WDT ...

Page 30

... PIC16C84 NOTES: www.DataSheet4U.com DS30445C-page 30 1997 Microchip Technology Inc. ...

Page 31

... EEDATA holds the 8-bit data for read/write, and EEADR holds the address of the EEPROM location being www.DataSheet4U.com accessed. PIC16C84 devices have 64 bytes of data EEPROM with an address range from 0h to 3Fh. The EEPROM data memory allows byte read and write. A byte write automatically erases the location and writes the new data (erase before write) ...

Page 32

... PIC16C84 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 cannot be cleared, only set, in software. They are cleared in hardware at completion of the read or write operation ...

Page 33

... EEIF WRERR EEPROM control register 2 PIC16C84 7.6 Protection Against Spurious Writes There are conditions when the device may not want to write to the data EEPROM memory. To protect against spurious EEPROM writes, various mechanisms have been built in. On power-up, WREN is cleared. Also, the ...

Page 34

... PIC16C84 NOTES: www.DataSheet4U.com DS30445C-page 34 1997 Microchip Technology Inc. ...

Page 35

... Address 2007h is beyond the user program memory space and it belongs to the special test/configuration memory space (2000h - 3FFFh). This space can only be accessed during programming. To find out how to program the PIC16C84, refer to PIC16C84 EEPROM Memory Programming Specifica- tion (DS30189). U-1 U-1 ...

Page 36

... A series resistor (RS) may be required for AT strip cut crystals varies with the crystal chosen. The PIC16C84 oscillator design requires the use of a parallel cut crystal. Use of a series cut crystal may give a frequency out of the crystal manufacturers specifications. When in XT modes, the device can have an external clock source to drive the OSC1/ CLKIN pin (Figure 8-3) ...

Page 37

... Cext values. The user needs to take into account variation due to tolerance of the external R and C components. Figure 8-6 shows how an R/C combination is connected to the PIC16C84. For Rext values below 2 the oscillator operation may become unstable, or stop completely. For very high Rext values (e.g the oscillator becomes sensitive to noise, humidity and leakage ...

Page 38

... PIC16C84 8.3 Reset The PIC16C84 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-7 shows a simplified block diagram of the on- chip reset circuit. The electrical specifi ...

Page 39

... PIC16C84 Program Counter STATUS Register 000h 0001 1xxx 000h 000u uuuu 000h 0001 0uuu 000h 0000 1uuu uuu0 0uuu ( ...

Page 40

... PIC16C84 8.4 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 external RC components usually needed to create Power-on Reset. A minimum rise time for V met for this to operate properly. See Electrical Specifi- cations for details ...

Page 41

... INTERNAL POR PWRT TIME-OUT OST TIME-OUT www.DataSheet4U.com INTERNAL RESET FIGURE 8-10: TIME-OUT SEQUENCE ON POWER-UP (MCLR NOT TIED MCLR INTERNAL POR PWRT TIME-OUT OST TIME-OUT INTERNAL RESET 1997 Microchip Technology Inc. PIC16C84 ): CASE PWRT T OST ): CASE PWRT T OST DS30445C-page 41 ...

Page 42

... PIC16C84 FIGURE 8-11: TIME-OUT SEQUENCE ON POWER-UP (MCLR TIED MCLR INTERNAL POR PWRT TIME-OUT OST TIME-OUT www.DataSheet4U.com INTERNAL RESET FIGURE 8-12: TIME-OUT SEQUENCE ON POWER-UP (MCLR TIED MCLR INTERNAL POR PWRT TIME-OUT OST TIME-OUT INTERNAL RESET When V rises very slowly possible that the T DD has reached its fi ...

Page 43

... A brown-out is a condition where device power (V dips below its minimum value, but not to zero, and then recovers. The device should be reset in the event of a brown-out. To reset PIC16C84 devices when a brown-out occurs, configuration and PWRTE external brown-out protection circuits may be built, as shown in Figure 8-13 and Figure 8-14 ...

Page 44

... PIC16C84 8.9 Interrupts The PIC16C84 has 4 sources of interrupt: • External interrupt RB0/INT pin • TMR0 overflow interrupt • PORTB change interrupts (pins RB7:RB4) • EEPROM write complete interrupt The interrupt control register (INTCON) records individual interrupt requests in flag bits. It also contains the individual and global interrupt enable bits. The global interrupt enable bit, GIE (INTCON< ...

Page 45

... EEIF EEIE GIE Interrupt Latency 5 PC+1 PC Inst (PC) Inst (PC+1) Dummy Cycle Inst (PC-1) Inst (PC) PIC16C84 Wake-up (If in SLEEP mode) Interrupt to CPU PC+1 0004h — Inst (0004h) Inst (0005h) Inst (0004h) Dummy Cycle DS30445C-page 45 Q3 ...

Page 46

... PIC16C84 8.9.1 INT INTERRUPT External interrupt on RB0/INT pin is edge triggered: either rising if INTEDG bit (OPTION_REG<6>) is set, or falling, if INTEDG bit is clear. When a valid edge appears on the RB0/INT (INTCON<1>) is set. This interrupt can be disabled by clearing control bit INTE (INTCON<4>). Flag bit INTF must be cleared in software via the interrupt service routine before re-enabling this interrupt ...

Page 47

... PSA WDT Enable Bit Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 — — — CP PWRTE RBPU INTEDG T0CS T0SE PSA PIC16C84 timing out and generating WDT PROGRAMMING CONSIDERATIONS = Min., Temperature = Max., max. DD Postscaler 8 PS2:PS0 MUX • To TMR0 (Figure 6- MUX PSA WDT ...

Page 48

... PIC16C84 8.12 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), the PD bit (STATUS<3>) is cleared, the TO bit (STATUS<4>) is set, and the oscillator driver is turned off ...

Page 49

... EEPROM memory may be read, but only the Data EEPROM memory may be programmed. bit(s) have not been FIGURE 8-19: TYPICAL IN-SYSTEM SERIAL External Connector Signals Data I/O PIC16C84 In-Circuit Serial Programming microcontrollers can be serially to V (see PIC16C84 EEPROM IL IHH PROGRAMMING CONNECTION To Normal Connections PIC16CXX + MCLR ...

Page 50

... PIC16C84 NOTES: www.DataSheet4U.com DS30445C-page 50 1997 Microchip Technology Inc. ...

Page 51

... Options Contents Assigned to Register bit field In the set of PIC16C84 The instruction set is highly orthogonal and is grouped into three basic categories: • Byte-oriented operations • Bit-oriented operations • Literal and control operations All instructions are executed within one single instruc- tion cycle, unless a conditional test is true or the pro- gram counter is changed as a result of an instruction ...

Page 52

... PIC16C84 TABLE 9-2 PIC16CXX INSTRUCTION SET Mnemonic, Operands ADDWF f, d ANDWF f, d CLRF f CLRW - COMF f, d DECF f, d DECFSZ f, d INCF f, d INCFSZ f, d IORWF f, d www.DataSheet4U.com MOVF f, d MOVWF f NOP - RLF f, d RRF f, d SUBWF f, d SWAPF f, d XORWF f, d BCF ...

Page 53

... Decode Read Process Write to register data destination 'f' ADDWF FSR 0x17 FSR = 0xC2 W = 0xD9 FSR = 0xC2 PIC16C84 ANDLW AND Literal with W Syntax: [ label ] ANDLW k Operands 255 Operation: (W) .AND. (k) (W) Status Affected: Z Encoding: 11 1001 kkkk Description: The contents of W register are AND’ ...

Page 54

... PIC16C84 BCF Bit Clear f [ label ] BCF Syntax: Operands Operation: 0 (f<b>) Status Affected: None Encoding: 01 Description: Bit 'b' in register 'f' is cleared Words: 1 Cycles Cycle Activity: Q1 www.DataSheet4U.com Decode Example BCF Before Instruction After Instruction BSF Bit Set f Syntax: [ label ] BSF Operands: ...

Page 55

... HERE BTFSC FLAG,1 FALSE GOTO PROCESS_CODE • TRUE • • address HERE if FLAG<1> address FALSE if FLAG<1> address TRUE PIC16C84 CALL Call Subroutine [ label ] CALL k Syntax: Operands 2047 Operation: (PC)+ 1 TOS, k PC<10:0>, (PCLATH<4:3>) PC<12:11> Status Affected: None Encoding: 10 0kkk ...

Page 56

... PIC16C84 CLRF Clear f Syntax: [ label ] CLRF Operands Operation: 00h 1 Z Status Affected: Z Encoding: 00 Description: The contents of register 'f' are cleared and the Z bit is set. Words: 1 Cycles: 1 www.DataSheet4U.com Q Cycle Activity: Q1 Decode Example CLRF Before Instruction After Instruction DS30445C-page 56 CLRW f Syntax: 127 Operands: ...

Page 57

... Decode Read Process Write to register data destination 'f' DECF CNT, 1 CNT = 0x01 CNT = 0x00 PIC16C84 DECFSZ Decrement f, Skip if 0 Syntax: [ label ] DECFSZ f,d Operands 127 d [0,1] Operation: ( (destination); skip if result = 0 Status Affected: None Encoding: 00 1011 dfff Description: The contents of register 'f' are decre- mented ...

Page 58

... PIC16C84 GOTO Unconditional Branch Syntax: [ label ] Operands Operation: k PC<10:0> PCLATH<4:3> Status Affected: None Encoding: 10 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. Words: 1 www ...

Page 59

... LOOP CONTINUE • • • address HERE CNT = CNT + 1 if CNT address CONTINUE if CNT address HERE +1 PIC16C84 IORLW Inclusive OR Literal with W Syntax: [ label ] IORLW k Operands 255 Operation: (W) .OR. k (W) Status Affected: Z Encoding: 11 1000 kkkk Description: The contents of the W register is OR’ ...

Page 60

... PIC16C84 IORWF Inclusive OR W with f [ label ] Syntax: Operands [0,1] Operation: (W) .OR. (f) Status Affected: Z Encoding: 00 Description: Inclusive OR the W register with regis- ter 'f the result is placed in the W register the result is placed back in register 'f'. Words: 1 www.DataSheet4U.com Cycles Cycle Activity: ...

Page 61

... No-Opera No-Opera No-Operat tion tion ion NOP OPTION OPTION 00 0000 0110 0010 To maintain upward compatibility with future PIC16CXX products, do not use this instruction. PIC16C84 RETFIE Return from Interrupt Syntax: [ label ] RETFIE Operands: None Operation: TOS PC, 1 GIE Status Affected: None Encoding: ...

Page 62

... PIC16C84 RETLW Return with Literal in W Syntax: [ label ] Operands Operation: k (W); TOS Status Affected: None Encoding: 11 Description: The W register is loaded with the eight bit literal 'k'. The program counter is loaded from the top of the stack (the return address). This is a two cycle instruction ...

Page 63

... RLF REG1,0 Before Instruction REG1 = 1110 0110 After Instruction REG1 = 1110 0110 W = 1100 1100 PIC16C84 RRF Rotate Right f through Carry Syntax: [ label ] RRF f,d Operands 127 d [0,1] Operation: See description below Status Affected: C Encoding: 00 1100 dfff Description: The contents of register 'f' are rotated one bit to the right through the Carry Flag ...

Page 64

... PIC16C84 SLEEP Syntax: [ label ] Operands: None Operation: 00h Status Affected: TO, PD Encoding: 00 Description: The power-down status bit cleared. Time-out status bit set. Watchdog Timer and its prescaler www.DataSheet4U.com are cleared. The processor is put into SLEEP mode with the oscillator stopped. See Section 14 ...

Page 65

... REG1 = REG1 = 0xFF result is negative PIC16C84 SWAPF Swap Nibbles label ] SWAPF f,d Syntax: Operands 127 d [0,1] Operation: (f<3:0>) (destination<7:4>), (f<7:4>) (destination<3:0>) Status Affected: None Encoding: 00 1110 dfff Description: The upper and lower nibbles of register 'f' are exchanged the result is placed in W register ...

Page 66

... PIC16C84 XORLW Exclusive OR Literal with W Syntax: [ label ] Operands Operation: (W) .XOR. k Status Affected: Z Encoding: 11 Description: The contents of the W register are XOR’ed with the eight bit literal 'k'. The result is placed in the W regis- ter. Words: 1 www.DataSheet4U.com Cycles Cycle Activity: Q1 Decode Example: ...

Page 67

... European Union (EU) countries. 1997 Microchip Technology Inc. Integrated Development Emulator System has been PIC16C84 10.3 ICEPIC: Low-Cost PICmicro™ In-Circuit Emulator ICEPIC is a low-cost in-circuit emulator solution for the Microchip PIC12CXXX, PIC16C5X and PIC16CXXX families of 8-bit OTP microcontrollers. ICEPIC is designed to operate on PC-compatible ...

Page 68

... PIC16C84 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 necessary hardware and software is included to run basic demo programs. The users can ...

Page 69

... EE OQ Microchips HCS Secure Data Products. The HCS eval- uation kit includes an LCD display to show changing codes, a decoder to decode transmissions, and a pro- gramming interface to program test transmitters. demon- PIC16C84 – Application Code and secure serials. DS30445A - page 69 ...

Page 70

... PIC16C84 TABLE 10-1: DEVELOPMENT TOOLS FROM MICROCHIP www.DataSheet4U.com Products Emulator DS30445A - page 70 Tools Software Programmers Boards Demo 1997 Microchip Technology Inc. ...

Page 71

... ELECTRICAL CHARACTERISTICS FOR PIC16C84 Absolute Maximum Ratings † Ambient temperature under bias.............................................................................................................- +125 C Storage temperature .............................................................................................................................. - +150 C Voltage on V with respect Voltage on MCLR with respect to V Voltage on all other pins with respect to V Total power dissipation Maximum current out of V ...

Page 72

... A typ. at 2.0V WDT dis PD Freq: 200 kHz max. The shaded sections indicate oscillator selections which are tested for functionality, but not for MIN/MAX specifications recommended that the user select the device type that ensures the specifications required. DS30445C-page 72 PIC16C84- 4. 2.0V to 6.0V DD ...

Page 73

... DC CHARACTERISTICS: PIC16C84-04 (Commercial, Industrial) DC Characteristics Power Supply Pins Parame- Sym ter No. D001 V Supply Voltage DD D001A D002 V RAM Data Retention DR Voltage D003 V V POR ensure internal Power-on Reset signal www.DataSheet4U.com D004 S V VDD internal Power-on Reset signal I Supply Current DD D010 D010A D013 ...

Page 74

... PIC16C84 11.2 DC CHARACTERISTICS PIC16LC84-04 (Commercial, Industrial) DC Characteristics Power Supply Pins Sym Characteristic Parameter No. D001 V Supply Voltage DD D002 V RAM Data Retention DR Voltage D003 V V POR DD ensure internal Power-on Reset signal D004 S V VDD DD www.DataSheet4U.com internal Power-on Reset signal I Supply Current DD D010 D010A D014 ...

Page 75

... Note oscillator configuration, the OSC1/CLKIN pin is a Schmitt Trigger input not recommended that the PIC16C84 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 defi ...

Page 76

... PIC16C84 11.4 DC CHARACTERISTICS: PIC16C84-04 (Commercial, Industrial) DC Characteristics All Pins Except Power Supply Pins Sym Parameter No. Capacitive Loading Specs on Output Pins D100 C OSC2/CLKOUT pin OSC2 www.DataSheet4U.com D101 C All I/O pins and OSC2 IO (RC mode) Data EEPROM Memory D120 E Endurance D D121 V V for read/write DRW ...

Page 77

... DD (Low) 0. Load Condition Pin V SS for all pins except OSC2. for OSC2 output. PIC16C84 Time OSC1 oscillator start-up timer power-up timer RBx pins T0CKI watchdog timer Period Rise Valid Hi-impedance 2.0 V (High) DD 0.2 V (Low) DD I/O Port Measurement Points ...

Page 78

... PIC16C84-10 — osc PIC16LC84-04 — osc PIC16LC84-04 — osc PIC16C84- osc PIC16LC84- osc PIC16C84- osc PIC16C84-10 — osc PIC16LC84- — osc PIC16LC84-04 — osc PIC16C84-04 — osc PIC16LC84-04 — osc PIC16C84-10 — ...

Page 79

... PIC16LC84 OSC1 (Q2 cycle) to Port input invalid (I/O in hold time) Port input valid to OSC1 (I/O in setup time) Port output rise time PIC16C84 PIC16LC84 Port output fall time PIC16C84 PIC16LC84 INT pin high PIC16C84 or low time PIC16LC84 RB7:RB4 change INT PIC16C84 high or low time PIC16LC84 ...

Page 80

... PIC16C84 FIGURE 11-5: RESET, WATCHDOG TIMER, OSCILLATOR START-UP TIMER AND POWER-UP TIMER TIMING V DD MCLR Internal POR PWRT Time-out OSC www.DataSheet4U.com Time-out Internal RESET Watchdog Timer RESET I/O Pins TABLE 11-5 RESET, WATCHDOG TIMER, OSCILLATOR START-UP TIMER AND POWER-UP TIMER REQUIREMENTS Parameter Sym Characteristic No ...

Page 81

... Typ† Max Units Conditions No Prescaler 0. — — CY With Prescaler 50 * — — — — No Prescaler 0. — — CY With Prescaler 50 * — — — — — — PIC16C84 ns ns 2. 3. 2. 3. prescale value (2, 4, ..., 256) DS30445C-page 81 ...

Page 82

... PIC16C84 NOTES: www.DataSheet4U.com DS30445C-page 82 1997 Microchip Technology Inc. ...

Page 83

... DC & AC CHARACTERISTICS GRAPHS/TABLES FOR PIC16C84 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 V range). This is for information only and devices are guaranteed to operate properly only within the specified range. ...

Page 84

... PIC16C84 FIGURE 12-2: TYPICAL RC OSCILLATOR FREQUENCY vs. V www.DataSheet4U.com DS30445C-page 84 DD 5.5 5.0 Rext = 3.3k 4.5 4.0 Rext = 5k 3.5 3 2.5 2.0 Rext = 10k 1.5 1.0 Rext = 100k 0.5 0.0 2.0 2.5 3.0 3.5 4.0 4.5 5.0 V (Volts) DD (Cext = 20 pF) 5.5 6.0 1997 Microchip Technology Inc. ...

Page 85

... FIGURE 12-3: TYPICAL RC OSCILLATOR FREQUENCY vs. V www.DataSheet4U.com FIGURE 12-4: TYPICAL RC OSCILLATOR FREQUENCY vs. V 1997 Microchip Technology Inc. DD 2.2 2.0 1.8 Rext = 3.3k 1.6 1.4 Rext = 5k 1.2 1.0 0.8 Rext = 10k 0 0.4 Rext = 100k 0.2 0.0 2.0 2.5 3.0 3.5 4.0 4.5 5.0 V (Volts 1.1 1.0 0.9 0 0.7 Rext = 3.3k 0.6 0.5 Rext = 5k 0.4 0.3 Rext = 10k 0.2 0.1 Rext = 100k 0.0 2.0 2.5 3.0 3.5 4.0 4.5 5.0 V (Volts) DD PIC16C84 (Cext = 100 pF) 5.5 6.0 (Cext = 300 pF) 5.5 6.0 DS30445C-page 85 ...

Page 86

... PIC16C84 FIGURE 12-5: TYPICAL www.DataSheet4U.com 10 0 2.0 FIGURE 12-6: TYPICAL 2.0 DS30445C-page 86 vs. V WATCHDOG DISABLED (25˚ 2.5 3.0 3.5 4.0 V (Volts) DD vs. V WATCHDOG ENABLED (25˚ 2.5 3.0 3.5 4.0 V (Volts) DD 4.5 5.0 5.5 6.0 4.5 5.0 5.5 6.0 1997 Microchip Technology Inc. ...

Page 87

... Watchdog Timer enabled, has two components: The leakage current which increases with higher temperature PD and the operating current of the Watchdog Timer logic which increases with lower temperature. At -40 C, the latter dominates explaining the apparently anomalous behavior. 1997 Microchip Technology Inc. vs. V WATCHDOG DISABLED PD DD 2.0 2.5 3.0 3.5 4 vs. V WATCHDOG ENABLED 2.0 2.5 3.0 3.5 4 PIC16C84 4.5 5.0 5.5 6.0 (Volts) 4.5 5.0 5.5 6.0 (Volts) DS30445C-page 87 ...

Page 88

... PIC16C84 FIGURE 12-9: V (INPUT THRESHOLD VOLTAGE) OF I/O PINS vs 2.0 1.8 1.6 1.4 1.2 1.0 www.DataSheet4U.com 0.8 0.6 2.5 FIGURE 12-10: V (INPUT THRESHOLD VOLTAGE) OF OSC1 INPUT (IN XT, HS, AND LP MODES 3.4 3.2 3.0 2.8 2.6 2.4 2.2 2.0 1.8 1.6 1.4 1.2 1.0 2.5 DS30445C-page 88 Max (- +85 C) 3.0 3.5 4.0 4.5 V (Volts) DD 3.0 3.5 4.0 4.5 V (Volts Typ @ 25 C Min (- +85 C) 5.0 5.5 6.0 5.0 5.5 6.0 1997 Microchip Technology Inc. ...

Page 89

... FIGURE 12-11 5.0 4.5 4.0 3.5 3.0 2.5 2.0 1.5 www.DataSheet4U.com 1.0 0.5 0.0 2.0 1997 Microchip Technology Inc MCLR, T0CKI and OSC1 (IN RC MODE) vs max (- + typ ( min (- + min (- + 2.5 3.0 3.5 4.0 V (Volts) DD PIC16C84 max (- + typ ( 4.5 5.0 5.5 6.0 DS30445C-page 89 ...

Page 90

... PIC16C84 FIGURE 12-12: TYPICAL I 10,000 1,000 www.DataSheet4U.com 100 6.0V 5.5V 5.0V 4.5V 4.0V 3.5V 3.0V 2.5V 2.0V 10 10k FIGURE 12-13: MAXIMUM I 10,000 1,000 6.0V 5.5V 5.0V 4.5V 4.0V 100 3.5V 3.0V 2.5V 2.0V 10 10k DS30445C-page 90 vs. FREQ (EXT CLOCK, 25˚C) DD 100k 1M External Clock Frequency (Hz) vs. FREQ (EXT CLOCK, -40˚ TO +85˚C) DD 100k 1M External Clock Frequency (Hz) 10M 100M 10M 100M 1997 Microchip Technology Inc. ...

Page 91

... FIGURE 12-15: TRANSCONDUCTANCE (gm OSCILLATOR vs. V 10000 9000 8000 7000 6000 5000 4000 3000 2000 1000 0 2.0 1997 Microchip Technology Inc. DD Max Max Typ Min Min. - 2.0 2.5 3.0 3.5 V Max @ -40 C 3.5 3.0 3 PIC16C84 4.0 4.5 5.0 5.5 (Volts Typ @ 25 C Min @ 85 C 4.0 4.5 5.0 (Volts) DS30445C-page 91 6.0 5.5 ...

Page 92

... PIC16C84 FIGURE 12-16: TRANSCONDUCTANCE (gm OSCILLATOR vs. V 250 225 200 175 150 125 100 75 www.DataSheet4U.com 2.0 FIGURE 12-17: TRANSCONDUCTANCE (gm OSCILLATOR vs. V 2000 1800 1600 1400 1200 1000 800 600 400 200 0 2.0 DS30445C-page 92 Max @ -40 C 2.5 3.0 3.5 4.0 V (Volts) DD 2.5 3.0 3.5 4.0 V (Volts Typ @ 25 C Min @ 85 C 4.5 5.0 5.5 DD ...

Page 93

... FIGURE 12-18 -10 -12 www.DataSheet4U.com -14 -16 -18 0.0 FIGURE 12-19 -10 -15 -20 -25 -30 -35 -40 -45 0.0 1997 Microchip Technology Inc. vs Min @ 85 C Typ @ 25 C Max @ -40 C 0.5 1.0 1.5 V (Volts Typ @ 25 C 0.5 1.0 1.5 2.0 V (Volts) OH PIC16C84 2.0 2.5 Min @ 85 C Max @ -40 C 2.5 3.0 3.5 4.0 4.5 DS30445C-page 93 3.0 5.0 ...

Page 94

... PIC16C84 FIGURE 12-20 www.DataSheet4U.com 0.0 FIGURE 12-21 0.0 DS30445C-page Max. -40 C 0.5 1.0 1.5 V (Volts Max @ -40 C 0.5 1.0 1.5 V (Volts) OL Typ Min. +85 C 2.0 2.5 3.0 Typ @ 25 C Min @ +85 C 2.0 2.5 3.0 1997 Microchip Technology Inc. ...

Page 95

... INPUT CAPACITANCE* Pin Name PORTA PORTB MCLR OSC1/CLKIN OSC2/CLKOUT T0CKI * All capacitance values are typical part to part variation of 25% (three standard deviations) should be taken into account. 1997 Microchip Technology Inc. 2.0 2.5 3.0 3.5 4.0 V (Volts) DD Typical Capacitance (pF) 18L PDIP 5.0 5.0 17.0 4.0 4.3 3.2 PIC16C84 4.5 5.0 5.5 6.0 6.5 18L SOIC 4.3 4.3 17.0 3.5 3.5 2.8 DS30445C-page 95 ...

Page 96

... PIC16C84 NOTES: www.DataSheet4U.com DS30445C-page 96 1997 Microchip Technology Inc. ...

Page 97

... Dimensions “D” and “E” do not include mold flash or protrusions. Mold flash or protrusions shall not exceed 0.010” (0.254 mm) per side or 0.020” (0.508 mm) more than dimensions “D” or “E.” PIC16C84 A1 L ...

Page 98

... PIC16C84 13.2 K04-051 18-Lead Plastic Small Outline (SO) – Wide, 300 mil p B www.DataSheet4U.com Units Dimension Limits Pitch Number of Pins Overall Pack. Height Shoulder Height Standoff Molded Package Length Molded Package Width Outside Dimension Chamfer Distance Shoulder Radius Gull Wing Radius Foot Length ...

Page 99

... SS PP PIC16C84 APPENDIX B: CODE COMPATIBILITY - FROM PIC16C5X TO PIC16C84 To convert code written for PIC16C5X to PIC16C84, the user should take the following steps: 1. Remove any program memory page select operations (PA2, PA1, PA0 bits) for CALL, GOTO. 2. Revisit any computed jump operations (write add to PC, etc ...

Page 100

... PIC16C84 APPENDIX C: WHAT’S NEW IN THIS DATA SHEET No new information has been added to this data sheet. For information on upgrade devices from the PIC16C84, please refer to the PIC16F8X data sheet. www.DataSheet4U.com DS30445C-page 100 APPENDIX D: WHAT’S CHANGED IN THIS DATA SHEET Here’s what’s changed in this data sheet: 1 ...

Page 101

... APPENDIX E: CONVERSION CONSIDERATIONS - PIC16C84 TO PIC16F83/F84 AND 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 102

... PIC16C84 NOTES: www.DataSheet4U.com DS30445C-page 102 1997 Microchip Technology Inc. ...

Page 103

... In-Circuit Serial Programming ...................................... 35, 49 INDF ................................................................................... 39 Instruction Format .............................................................. 51 Instruction Set ADDLW ...................................................................... 53 ADDWF ...................................................................... 53 ANDLW ...................................................................... 53 ANDWF ...................................................................... 53 BCF ............................................................................ 54 BSF ............................................................................ 54 BTFSC ....................................................................... 54 BTFSS ....................................................................... 55 CALL .......................................................................... 55 CLRF .......................................................................... 56 CLRW ........................................................................ 56 1997 Microchip Technology Inc. PIC16C84 CLRWDT ................................................................... 56 COMF ........................................................................ 57 DECF ......................................................................... 57 DECFSZ .................................................................... 57 GOTO ........................................................................ 58 INCF .......................................................................... 58 INCFSZ ...................................................................... 59 IORLW ....................................................................... 59 IORWF ....................................................................... 60 MOVF ........................................................................ 60 MOVLW ..................................................................... 60 MOVWF ..................................................................... 60 NOP ........................................................................... 61 OPTION ..................................................................... 61 RETFIE ...................................................................... 61 RETLW ...................................................................... 62 RETURN ...

Page 104

... PIC16C84 PCL .............................................................................. 17, 39 PCLATH ....................................................................... 17 .......................................................................... 14, 38, 43 PICDEM-1 Low-Cost PICmicro Demo Board ..................... 68 PICDEM-2 Low-Cost PIC16CXX Demo Board .................. 68 PICDEM-3 Low-Cost PIC16CXXX Demo Board ................ 68 PICMASTER In-Circuit Emulator ..................................... 67 PICSTART Plus Entry Level Development System ........ 67 Pinout Descriptions .............................................................. 9 POR ................................................................................... 40 Oscillator Start-up Timer (OST) ........................... 35, 40 Power-on Reset (POR) .................................. 35, 39, 40 Power-up Timer (PWRT) ...

Page 105

... International Business Machines Corp. Pentium is a trade- mark of Intel Corporation. Windows is a trademark and MS-DOS, Microsoft Windows are registered trademarks of Microsoft Corporation. CompuServe is a registered trademark of CompuServe Incorporated. All other trademarks mentioned herein are the property of their respective companies. Preliminary PIC16C84 DS30445C-page 105 ...

Page 106

... Telephone: (_______) _________ - _________ Application (optional): Would you like a reply? Device: PIC16C84 Questions: 1. What are the best features of this document? 2. How does this document meet your hardware and software development needs you find the organization of this data sheet easy to follow? If not, why? 4 ...

Page 107

... C to +70 C (Commercial +85 C (Industrial) = PDIP = SOIC (Gull Wing, 300 mil body) PIC16C84 Examples: a) PIC16C84 -04/P 301 = Commercial temp., PDIP package, 4MHz, normal V DD limitis, QTP pattern #301. b) PIC16LC84 - 04I/SO = Industrial temp., SOIC package, 200kHz, Extended V DD limits. Note blank ...

Page 108

... Information contained in this publication regarding device applications and the like is intended for suggestion only and may be superseded by updates. No representation or warranty is given and no liability is assumed by Microchip Technology Incorporated with respect to the accuracy or use of such information, or infringement of patents or other intellectual property rights arising from such use or otherwise. Use of Microchip’s products as critical components in life support systems is not authorized except with express written approval by Microchip ...

Related keywords