16-bit microcontrollers and digital signal controllers with high-speed pwm, op amps and advanced analog (546 pages)
Summary of Contents for Microchip Technology PIC16F87XA
Page 1
PIC16F87XA Data Sheet 28/40/44-Pin Enhanced Flash Microcontrollers 2003 Microchip Technology Inc. DS39582B http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 2
PRO MATE and PowerSmart are registered trademarks of No representation or warranty is given and no liability is Microchip Technology Incorporated in the U.S.A. and other assumed by Microchip Technology Incorporated with respect countries.
Page 6
Systems Information and Upgrade Hot Line ............................. 229 Reader Response ..................................... 230 PIC16F87XA Product Identification System............................231 TO OUR VALUED CUSTOMERS It is our intention to provide our valued customers with the best documentation possible to ensure successful use of your Microchip products.
40-pin and 44-pin packages. All devices in the mended reading for a better understanding of the device PIC16F87XA family share common architecture with architecture and operation of the peripheral modules. the following differences: •...
Program Flash Data Memory Data EEPROM PIC16F873A 4K words 192 Bytes 128 Bytes PIC16F876A 8K words 368 Bytes 256 Bytes Note 1: Higher order bits are from the Status register. 2003 Microchip Technology Inc. DS39582B-page 6 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Program Flash Data Memory Data EEPROM PIC16F874A 4K words 192 Bytes 128 Bytes PIC16F877A 8K words 368 Bytes 256 Bytes Note 1: Higher order bits are from the Status register. 2003 Microchip Technology Inc. DS39582B-page 7 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 10
This buffer is a Schmitt Trigger input when configured as the external interrupt. This buffer is a Schmitt Trigger input when used in Serial Programming mode. This buffer is a Schmitt Trigger input when configured in RC Oscillator mode and a CMOS input otherwise. 2003 Microchip Technology Inc. DS39582B-page 8 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
This buffer is a Schmitt Trigger input when configured as the external interrupt. This buffer is a Schmitt Trigger input when used in Serial Programming mode. This buffer is a Schmitt Trigger input when configured in RC Oscillator mode and a CMOS input otherwise. 2003 Microchip Technology Inc. DS39582B-page 9 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
Page 12
This buffer is a Schmitt Trigger input when configured as the external interrupt. This buffer is a Schmitt Trigger input when used in Serial Programming mode. This buffer is a Schmitt Trigger input when configured in RC Oscillator mode and a CMOS input otherwise. 2003 Microchip Technology Inc. DS39582B-page 10 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
This buffer is a Schmitt Trigger input when configured as the external interrupt. This buffer is a Schmitt Trigger input when used in Serial Programming mode. This buffer is a Schmitt Trigger input when configured in RC Oscillator mode and a CMOS input otherwise. 2003 Microchip Technology Inc. DS39582B-page 11 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
This buffer is a Schmitt Trigger input when configured as the external interrupt. This buffer is a Schmitt Trigger input when used in Serial Programming mode. This buffer is a Schmitt Trigger input when configured in RC Oscillator mode and a CMOS input otherwise. 2003 Microchip Technology Inc. DS39582B-page 12 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
This buffer is a Schmitt Trigger input when configured as the external interrupt. This buffer is a Schmitt Trigger input when used in Serial Programming mode. This buffer is a Schmitt Trigger input when configured in RC Oscillator mode and a CMOS input otherwise. 2003 Microchip Technology Inc. DS39582B-page 13 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
PIC16F87XA MEMORY ORGANIZATION Program Memory Organization The PIC16F87XA devices have a 13-bit program There are three memory blocks in each of the counter capable of addressing an 8K word x 14 bit PIC16F87XA devices. The program memory and data program memory space. The PIC16F876A/877A...
Flash Program Memory” of this data sheet. 2.2.1 GENERAL PURPOSE REGISTER FILE The register file can be accessed either directly, or indirectly, through the File Select Register (FSR). 2003 Microchip Technology Inc. DS39582B-page 16 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Unimplemented data memory locations, read as ‘0’. Not a physical register. Note 1: These registers are not implemented on the PIC16F876A. These registers are reserved; maintain these registers clear. 2003 Microchip Technology Inc. DS39582B-page 17 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Unimplemented data memory locations, read as ‘0’. Not a physical register. Note 1: These registers are not implemented on the PIC16F873A. These registers are reserved; maintain these registers clear. 2003 Microchip Technology Inc. DS39582B-page 18 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
These registers can be addressed from any bank. PORTD, PORTE, TRISD and TRISE are not implemented on PIC16F873A/876A devices, read as ‘0’. Bit 4 of EEADRH implemented only on the PIC16F876A/877A devices. 2003 Microchip Technology Inc. DS39582B-page 19 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
These registers can be addressed from any bank. PORTD, PORTE, TRISD and TRISE are not implemented on PIC16F873A/876A devices, read as ‘0’. Bit 4 of EEADRH implemented only on the PIC16F876A/877A devices. 2003 Microchip Technology Inc. DS39582B-page 20 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
These registers can be addressed from any bank. PORTD, PORTE, TRISD and TRISE are not implemented on PIC16F873A/876A devices, read as ‘0’. Bit 4 of EEADRH implemented only on the PIC16F876A/877A devices. 2003 Microchip Technology Inc. DS39582B-page 21 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
W = Writable bit U = Unimplemented bit, read as ‘0’ - n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown 2003 Microchip Technology Inc. DS39582B-page 22 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
When using Low-Voltage ICSP Programming (LVP) and the pull-ups on PORTB are enabled, bit 3 in the TRISB register must be cleared to disable the pull-up on RB3 and ensure the proper operation of the device 2003 Microchip Technology Inc. DS39582B-page 23 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
W = Writable bit U = Unimplemented bit, read as ‘0’ - n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown 2003 Microchip Technology Inc. DS39582B-page 24 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
W = Writable bit U = Unimplemented bit, read as ‘0’ - n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown 2003 Microchip Technology Inc. DS39582B-page 25 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
W = Writable bit U = Unimplemented bit, read as ‘0’ - n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown 2003 Microchip Technology Inc. DS39582B-page 26 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
W = Writable bit U = Unimplemented bit, read as ‘0’ - n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown 2003 Microchip Technology Inc. DS39582B-page 27 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
W = Writable bit U = Unimplemented bit, read as ‘0’ - n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown 2003 Microchip Technology Inc. DS39582B-page 28 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 31
W = Writable bit U = Unimplemented bit, read as ‘0’ - n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown 2003 Microchip Technology Inc. DS39582B-page 29 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 32
CALL SUB1_P1 ;Call subroutine in 2.3.2 STACK ;page 1 (800h-FFFh) The PIC16F87XA family has an 8-level deep x 13-bit ORG 0x900 ;page 1 (800h-FFFh) wide hardware stack. The stack space is not part of SUB1_P1 either program or data space and the stack pointer is not ;called subroutine...
Page 33
Location Select Bank Select Location Select 100h 180h Data Memory 17Fh 1FFh Bank 0 Bank 1 Bank 2 Bank 3 Note 1: For register file map detail, see Figure 2-3. 2003 Microchip Technology Inc. DS39582B-page 31 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
When code-protected, the device programmer can no longer access data or program memory; this does NOT inhibit internal reads or writes. 2003 Microchip Technology Inc. DS39582B-page 33 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
Page 36
W = Writable bit U = Unimplemented bit, read as ‘0’ - n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown 2003 Microchip Technology Inc. DS39582B-page 34 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 37
EE Write Complete Interrupt Flag bit (EEIF) is set. The user can either enable this interrupt or poll this bit. EEIF must be cleared by software. 2003 Microchip Technology Inc. DS39582B-page 35 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
Page 38
; Bank 2 MOVF EEDATA, W ; W = LS Byte of Program EEDATA MOVWF DATAL MOVF EEDATH, W ; W = MS Byte of Program EEDATA MOVWF DATAH 2003 Microchip Technology Inc. DS39582B-page 36 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 40
0x03 ; Indicates when four words have been programmed XORLW 0x03 BTFSC STATUS,Z ; Exit if more than four words, GOTO LOOP ; Continue if less than four words 2003 Microchip Technology Inc. DS39582B-page 38 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 41
Legend: x = unknown, u = unchanged, - = unimplemented, read as ‘0’, q = value depends upon condition. Shaded cells are not used by data EEPROM or Flash program memory. 2003 Microchip Technology Inc. DS39582B-page 39 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
The user must ensure the bits in the TRISA register are RD PORTA maintained set when using them as analog inputs. To A/D Converter or Comparator Note 1: I/O pins have protection diodes to V and V 2003 Microchip Technology Inc. DS39582B-page 41 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 44
TRIS Latch I/O pin Analog Mode WR TRISA Input Buffer RD TRISA RD PORTA A/D Converter or SS Input Note 1: I/O pin has protection diodes to V and V 2003 Microchip Technology Inc. DS39582B-page 42 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 45
When using the SSP module in SPI Slave mode and SS enabled, the A/D converter must be set to one of the following modes, where PCFG3:PCFG0 = 0100, 0101, 011x, 1101, 1110, 1111. 2003 Microchip Technology Inc. DS39582B-page 43 http://www.xinpian.net...
Page 46
2: To enable weak pull-ups, set the appropriate TRIS are OR’ed together to generate the RB port change bit(s) and clear the RBPU bit (OPTION_REG<7>). interrupt with flag bit RBIF (INTCON<0>). 2003 Microchip Technology Inc. DS39582B-page 44 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
Page 47
1111 1111 1111 1111 81h, 181h OPTION_REG RBPU INTEDG T0CS T0SE PS0 1111 1111 1111 1111 Legend: x = unknown, u = unchanged. Shaded cells are not used by PORTB. 2003 Microchip Technology Inc. DS39582B-page 45 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566...
Page 48
Note 1: I/O pins have diode protection to V and V 2: Port/Peripheral Select signal selects between port data and peripheral output. 3: Peripheral OE (Output Enable) is only activated if Peripheral Select is active. 2003 Microchip Technology Inc. DS39582B-page 46 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Bit 1 Bit 0 all other POR, BOR Resets PORTC xxxx xxxx uuuu uuuu TRISC PORTC Data Direction Register 1111 1111 1111 1111 Legend: x = unknown, u = unchanged 2003 Microchip Technology Inc. DS39582B-page 47 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 50
OBF IBOV PSPMODE — PORTE Data Direction Bits 0000 -111 0000 -111 Legend: x = unknown, u = unchanged, - = unimplemented, read as ‘0’. Shaded cells are not used by PORTD. 2003 Microchip Technology Inc. DS39582B-page 48 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
Page 51
0 = Device is selected Legend: ST = Schmitt Trigger input, TTL = TTL input Note 1: Input buffers are Schmitt Triggers when in I/O mode and TTL buffers when in Parallel Slave Port mode. 2003 Microchip Technology Inc. DS39582B-page 49 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
Page 52
W = Writable bit U = Unimplemented bit, read as ‘0’ - n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown 2003 Microchip Technology Inc. DS39582B-page 50 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 53
PSPIF is set on the Q4 clock cycle, following the next Q2 cycle, indicating that the read is complete. OBF remains low until data is written to PORTD by the user firmware. 2003 Microchip Technology Inc. DS39582B-page 51 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
Page 54
= unknown, u = unchanged, - = unimplemented, read as ‘0’. Shaded cells are not used by the Parallel Slave Port. Note 1: Bits PSPIE and PSPIF are reserved on the PIC16F873A/876A; always maintain these bits clear. 2003 Microchip Technology Inc. DS39582B-page 52 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
TMR0 Reg Cycles T0SE T0CS Set Flag bit TMR0IF on Overflow PRESCALER 8-bit Prescaler Watchdog Timer 8-to-1 MUX PS2:PS0 WDT Enable bit Time-out Note: T0CS, T0SE, PSA, PS2:PS0 are (OPTION_REG<5:0>). 2003 Microchip Technology Inc. DS39582B-page 53 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 56
Mid-Range MCU Family Reference Manual (DS33023) must be exe- cuted when changing the prescaler assignment from Timer0 to the WDT. This sequence must be followed even if the WDT is disabled. 2003 Microchip Technology Inc. DS39582B-page 54 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
Page 57
RBPU INTEDG T0CS T0SE 1111 1111 1111 1111 Legend: x = unknown, u = unchanged, - = unimplemented locations read as ‘0’. Shaded cells are not used by Timer0. 2003 Microchip Technology Inc. DS39582B-page 55 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
W = Writable bit U = Unimplemented bit, read as ‘0’ - n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown 2003 Microchip Technology Inc. DS39582B-page 57 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 60
1, 2, 4, 8 T1OSCEN Enable Internal Oscillator RC1/T1OSI/CCP2 Clock Q Clock T1CKPS1:T1CKPS0 TMR1CS Note 1: When the T1OSCEN bit is cleared, the inverter is turned off. This eliminates power drain. 2003 Microchip Technology Inc. DS39582B-page 58 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 61
In this mode of operation, the CCPRxH:CCPRxL regis- The user must provide a software time delay to ensure ter pair effectively becomes the period register for proper oscillator start-up. Timer1. 2003 Microchip Technology Inc. DS39582B-page 59 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566...
Page 62
= unknown, u = unchanged, - = unimplemented, read as ‘0’. Shaded cells are not used by the Timer1 module. Note 1: Bits PSPIE and PSPIF are reserved on the 28-pin devices; always maintain these bits clear. 2003 Microchip Technology Inc. DS39582B-page 60 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
W = Writable bit U = Unimplemented bit, read as ‘0’ - n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown 2003 Microchip Technology Inc. DS39582B-page 61 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 64
= unknown, u = unchanged, - = unimplemented, read as ‘0’. Shaded cells are not used by the Timer2 module. Note 1: Bits PSPIE and PSPIF are reserved on 28-pin devices; always maintain these bits clear. 2003 Microchip Technology Inc. DS39582B-page 62 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
The compare(s) should be configured for the special event trigger which clears TMR1 The PWMs will have the same frequency and update rate (TMR2 interrupt) Capture None Compare None 2003 Microchip Technology Inc. DS39582B-page 63 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 66
W = Writable bit U = Unimplemented bit, read as ‘0’ - n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown 2003 Microchip Technology Inc. DS39582B-page 64 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
÷ 1, 4, 16 ; move value and CCP ON RC2/CCP1 CCPR1H CCPR1L MOVWF CCP1CON ; Load CCP1CON with this ; value Capture Enable Edge Detect TMR1H TMR1L CCP1CON<3:0> 2003 Microchip Technology Inc. DS39582B-page 65 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 68
TRISC<2> bit. Note: Clearing the CCP1CON register will force the RC2/CCP1 compare output latch to the default low level. This is not the PORTC I/O data latch. 2003 Microchip Technology Inc. DS39582B-page 66 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 69
TMR2 = PR2 log(2) TMR2 = Duty Cycle Note: If the PWM duty cycle value is longer than TMR2 = PR2 the PWM period, the CCP1 pin will not be cleared. 2003 Microchip Technology Inc. DS39582B-page 67 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 70
= unknown, u = unchanged, - = unimplemented, read as ‘0’. Shaded cells are not used by Capture and Timer1. Note 1: The PSP is not implemented on 28-pin devices; always maintain these bits clear. 2003 Microchip Technology Inc. DS39582B-page 68 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
Page 71
= unknown, u = unchanged, - = unimplemented, read as ‘0’. Shaded cells are not used by PWM and Timer2. Note 1: Bits PSPIE and PSPIF are reserved on 28-pin devices; always maintain these bits clear. 2003 Microchip Technology Inc. DS39582B-page 69 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
TRISC<5> bit to be set, thus disabling the SDO output. • Slave Select (SS) – RA5/AN4/SS/C2OUT Figure 9-1 shows the block diagram of the MSSP module when operating in SPI mode. 2003 Microchip Technology Inc. DS39582B-page 71 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566...
Page 74
W = Writable bit U = Unimplemented bit, read as ‘0’ - n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown 2003 Microchip Technology Inc. DS39582B-page 72 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 75
W = Writable bit U = Unimplemented bit, read as ‘0’ - n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown 2003 Microchip Technology Inc. DS39582B-page 73 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 76
;WREG reg = contents of SSPBUF MOVWF RXDATA ;Save in user RAM, if data is meaningful MOVF TXDATA, W ;W reg = contents of TXDATA MOVWF SSPBUF ;New data to xmit 2003 Microchip Technology Inc. DS39582B-page 74 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 78
0 bit 7 Input Sample (SMP = 0) (SMP = 1) bit 0 bit 7 Input Sample (SMP = 1) SSPIF Next Q4 Cycle SSPSR to after Q2↓ SSPBUF 2003 Microchip Technology Inc. DS39582B-page 76 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 79
0 bit 7 bit 0 (SMP = 0) bit 7 bit 7 Input Sample (SMP = 0) SSPIF Interrupt Flag Next Q4 Cycle SSPSR to after Q2↓ SSPBUF 2003 Microchip Technology Inc. DS39582B-page 77 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 80
3 bit 1 bit 0 (SMP = 0) bit 0 bit 7 Input Sample (SMP = 0) SSPIF Interrupt Flag Next Q4 Cycle after Q2↓ SSPSR to SSPBUF 2003 Microchip Technology Inc. DS39582B-page 78 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 81
Legend: x = unknown, u = unchanged, - = unimplemented, read as ‘0’. Shaded cells are not used by the MSSP in SPI mode. Note 1: The PSPIF, PSPIE and PSPIP bits are reserved on 28-pin devices; always maintain these bits clear. 2003 Microchip Technology Inc. DS39582B-page 79 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
Page 82
During transmission, the SSPBUF is not double- buffered. A write to SSPBUF will write to both SSPBUF SSPADD reg and SSPSR. Set, Reset Start and S, P bits Stop bit Detect (SSPSTAT reg) 2003 Microchip Technology Inc. DS39582B-page 80 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 83
W = Writable bit U = Unimplemented bit, read as ‘0’ - n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown 2003 Microchip Technology Inc. DS39582B-page 81 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 84
W = Writable bit U = Unimplemented bit, read as ‘0’ - n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown 2003 Microchip Technology Inc. DS39582B-page 82 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 85
For bits ACKEN, RCEN, PEN, RSEN, SEN: If the I C module is not in the Idle mode, this bit may not be set (no spooling) and the SSPBUF may not be written (or writes to the SSPBUF are disabled). 2003 Microchip Technology Inc. DS39582B-page 83 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
Page 86
The high and low times of the C specification, as well as the requirement of the MSSP module, are shown in timing parameter #100 and parameter #101. 2003 Microchip Technology Inc. DS39582B-page 84 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
Page 87
The SSPIF bit must be cleared in software and the SSPSTAT register is used to determine the status of the byte. The SSPIF bit is set on the falling edge of the ninth clock pulse. 2003 Microchip Technology Inc. DS39582B-page 85 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
Page 88
PIC16F87XA FIGURE 9-8: C SLAVE MODE TIMING WITH SEN = 0 (RECEPTION, 7-BIT ADDRESS) 2003 Microchip Technology Inc. DS39582B-page 86 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 92
CKP bit will still NOT be asserted low. Clock stretching, on the basis of the state of the BF bit, only occurs during a data sequence, not an address sequence. 2003 Microchip Technology Inc. DS39582B-page 90 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
Page 94
PIC16F87XA FIGURE 9-13: C SLAVE MODE TIMING WITH SEN = 1 (RECEPTION, 7-BIT ADDRESS) 2003 Microchip Technology Inc. DS39582B-page 92 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 95
PIC16F87XA FIGURE 9-14: C SLAVE MODE TIMING SEN = 1 (RECEPTION, 10-BIT ADDRESS) 2003 Microchip Technology Inc. DS39582B-page 93 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 96
Address is compared to general call address. After ACK, set interrupt. Receiving Data R/W = 0 General Call Address SSPIF BF (SSPSTAT<0>) Cleared in software SSPBUF is read SSPOV (SSPCON<6>) ‘0’ ‘1’ GCEN (SSPCON2<7>) 2003 Microchip Technology Inc. DS39582B-page 94 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 97
Stop bit Detect SCL In Set/Reset, S, P, WCOL (SSPSTAT) Write Collision Detect Clock Arbitration Set SSPIF, BCLIF State Counter for Bus Collision Reset ACKSTAT, PEN (SSPCON2) end of XMIT/RCV 2003 Microchip Technology Inc. DS39582B-page 95 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 98
100 kHz, 400 kHz or 1 MHz I C operation. See 12. Interrupt is generated once the Stop condition is Section 9.4.7 “Baud Rate Generator” for more detail. complete. 2003 Microchip Technology Inc. DS39582B-page 96 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 99
C interface does not conform to the 400 kHz I C specification (which applies to rates greater than 100 kHz) in all details, but may be used with care where higher rates are required by the application. 2003 Microchip Technology Inc. DS39582B-page 97 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
Page 100
SCL allowed to transition high SCL low (clock arbitration) BRG decrements on Q2 and Q4 cycles 00h (hold off) Value SCL is sampled high, reload takes place and BRG starts its count Reload 2003 Microchip Technology Inc. DS39582B-page 98 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 101
Write to SEN bit occurs here SDA = 1, At completion of Start bit, SCL = 1 hardware clears SEN bit and sets SSPIF bit Write to SSPBUF occurs here 1st Bit 2nd Bit 2003 Microchip Technology Inc. DS39582B-page 99 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 102
RSEN bit SCL (no change) and sets SSPIF 1st Bit Write to SSPBUF occurs here Falling edge of ninth clock, end of Xmit Sr = Repeated Start 2003 Microchip Technology Inc. DS39582B-page 100 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 103
(i.e., SSPSR is still shifting out a data byte), the WCOL is set and the contents of the buffer are unchanged (the write doesn’t occur). WCOL must be cleared in software. 2003 Microchip Technology Inc. DS39582B-page 101 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
Page 104
PIC16F87XA FIGURE 9-21: C MASTER MODE WAVEFORM (TRANSMISSION, 7 OR 10-BIT ADDRESS) 2003 Microchip Technology Inc. DS39582B-page 102 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 106
SSPIF bit is set SCL brought high after T SDA asserted low before rising edge of clock to setup Stop condition Note: T = one Baud Rate Generator period. 2003 Microchip Technology Inc. DS39582B-page 104 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 107
SCL = 0 data doesn’t match what is driven by the master. Bus collision has occurred. SDA released by master Set bus collision interrupt (BCLIF) BCLIF 2003 Microchip Technology Inc. DS39582B-page 105 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 108
Start condition. Set BCLIF. S bit and SSPIF set because BCLIF SDA = 0, SCL = 1. SSPIF and BCLIF are cleared in software SSPIF SSPIF and BCLIF are cleared in software 2003 Microchip Technology Inc. DS39582B-page 106 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 109
SCL pulled low after BRG time-out Set SEN, enable Start sequence if SDA = 1, SCL = 1 BCLIF ‘0’ SSPIF SDA = 0, SCL = 1, Interrupts cleared set SSPIF in software 2003 Microchip Technology Inc. DS39582B-page 107 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 110
FIGURE 9-30: BUS COLLISION DURING REPEATED START CONDITION (CASE 2) SCL goes low before SDA, BCLIF set BCLIF. Release SDA and SCL. Interrupt cleared in software RSEN ‘0’ SSPIF 2003 Microchip Technology Inc. DS39582B-page 108 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 111
BCLIF ‘0’ ‘0’ SSPIF FIGURE 9-32: BUS COLLISION DURING A STOP CONDITION (CASE 2) SCL goes low before SDA goes high, Assert SDA set BCLIF BCLIF ‘0’ ‘0’ SSPIF 2003 Microchip Technology Inc. DS39582B-page 109 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
W = Writable bit U = Unimplemented bit, read as ‘0’ - n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown 2003 Microchip Technology Inc. DS39582B-page 111 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 114
W = Writable bit U = Unimplemented bit, read as ‘0’ - n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown 2003 Microchip Technology Inc. DS39582B-page 112 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 115
FERR OERR RX9D 0000 000x 0000 000x SPBRG Baud Rate Generator Register 0000 0000 0000 0000 Legend: x = unknown, - = unimplemented, read as ‘0’. Shaded cells are not used by the BRG. 2003 Microchip Technology Inc. DS39582B-page 113 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
Page 117
Data Bus TXIF TXREG Register TXIE Pin Buffer • • • and Control TSR Register RC6/TX/CK pin Interrupt TXEN Baud Rate CLK TRMT SPEN SPBRG Baud Rate Generator TX9D 2003 Microchip Technology Inc. DS39582B-page 115 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 118
= unknown, - = unimplemented locations read as ‘0’. Shaded cells are not used for asynchronous transmission. Note 1: Bits PSPIE and PSPIF are reserved on 28-pin devices; always maintain these bits clear. 2003 Microchip Technology Inc. DS39582B-page 116 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
Page 119
RSR Register ÷16 Stop Baud Rate Generator • • • Start (8) 7 RC7/RX/DT Pin Buffer Data and Control Recovery RX9D RCREG Register SPEN FIFO RCIF Interrupt Data Bus RCIE 2003 Microchip Technology Inc. DS39582B-page 117 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 120
= unknown, - = unimplemented locations read as ‘0’. Shaded cells are not used for asynchronous reception. Note 1: Bits PSPIE and PSPIF are reserved on 28-pin devices; always maintain these bits clear. 2003 Microchip Technology Inc. DS39582B-page 118 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
Page 121
Baud Rate Generator Stop Start RC7/RX/DT Pin Buffer Data and Control Recovery SPEN Enable ADDEN Load of Receive Buffer ADDEN RSR<8> RX9D RCREG Register FIFO RCIF Interrupt Data Bus RCIE 2003 Microchip Technology Inc. DS39582B-page 119 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 122
= unknown, - = unimplemented locations read as ‘0’. Shaded cells are not used for asynchronous reception. Note 1: Bits PSPIE and PSPIF are reserved on 28-pin devices; always maintain these bits clear. 2003 Microchip Technology Inc. DS39582B-page 120 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
Page 123
TSR register is empty so a transfer to the TXREG register will result in an immediate transfer to TSR, resulting in an empty TXREG. Back-to-back transfers are possible. 2003 Microchip Technology Inc. DS39582B-page 121 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566...
Page 124
FIGURE 10-10: SYNCHRONOUS TRANSMISSION (THROUGH TXEN) RC7/RX/DT pin bit 0 bit 2 bit 1 bit 6 bit 7 RC6/TX/CK pin Write to TXREG Reg TXIF bit TRMT bit TXEN bit 2003 Microchip Technology Inc. DS39582B-page 122 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 125
= unknown, - = unimplemented, read as ‘0’. Shaded cells are not used for synchronous master reception. Note 1: Bits PSPIE and PSPIF are reserved on 28-pin devices; always maintain these bits clear. 2003 Microchip Technology Inc. DS39582B-page 123 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
Page 126
If enable bit TXIE is set, the interrupt will wake the chip from Sleep and if the global interrupt is enabled, the program will branch to the interrupt vector (0004h). 2003 Microchip Technology Inc. DS39582B-page 124 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566...
Page 127
= unknown, - = unimplemented, read as ‘0’. Shaded cells are not used for synchronous slave reception. Note 1: Bits PSPIE and PSPIF are reserved on 28-pin devices, always maintain these bits clear. 2003 Microchip Technology Inc. DS39582B-page 125 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
W = Writable bit U = Unimplemented bit, read as ‘0’ - n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown 2003 Microchip Technology Inc. DS39582B-page 127 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 130
‘0’ = Bit is cleared x = Bit is unknown Note: On any device Reset, the port pins that are multiplexed with analog functions (ANx) are forced to be an analog input. 2003 Microchip Technology Inc. DS39582B-page 128 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566...
Page 132
= leakage current at the pin due to LEAKAGE various junctions = interconnect resistance = sampling switch = sample/hold capacitance (from DAC) HOLD 5 6 7 8 9 10 11 Sampling Switch (kΩ) 2003 Microchip Technology Inc. DS39582B-page 130 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 133
When the device frequencies are greater than 1 MHz, the RC A/D conversion clock source is only recommended for Sleep operation. For extended voltage devices (LF), please refer to Section 17.0 “Electrical Characteristics”. 2003 Microchip Technology Inc. DS39582B-page 131 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
Page 134
ADFM = 0 ADFM = 1 2 1 0 7 0 7 6 5 0000 00 0000 00 ADRESH ADRESL ADRESH ADRESL 10-bit Result 10-bit Result Right Justified Left Justified 2003 Microchip Technology Inc. DS39582B-page 132 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 135
Legend: x = unknown, u = unchanged, - = unimplemented, read as ‘0’. Shaded cells are not used for A/D conversion. Note 1: These registers are not available on 28-pin devices. 2003 Microchip Technology Inc. DS39582B-page 133 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
W = Writable bit U = Unimplemented bit, read as ‘0’ - n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown 2003 Microchip Technology Inc. DS39582B-page 135 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 138
C2OUT RA1/AN1 Off (Read as ‘0’) RA2/AN2 From Comparator Module A = Analog Input, port reads zeros always. D = Digital Input. CIS (CMCON<3>) is the Comparator Input Switch. 2003 Microchip Technology Inc. DS39582B-page 136 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 139
3: RA4 is an open collector I/O pin. When used as an output, a pull-up resistor is required. 2003 Microchip Technology Inc. DS39582B-page 137 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 140
GIE bit must also be set. If any of these bits are allow flag bit CMIF to be cleared. clear, the interrupt is not enabled, though the CMIF bit will still be set if an interrupt condition occurs. 2003 Microchip Technology Inc. DS39582B-page 138 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
Page 141
5 pF Legend: = Input Capacitance = Threshold Voltage = Leakage Current at the pin due to various junctions LEAKAGE = Interconnect Resistance = Source Impedance = Analog Voltage 2003 Microchip Technology Inc. DS39582B-page 139 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 142
— PORTA Data Direction Register --11 1111 --11 1111 Legend: x = unknown, u = unchanged, - = unimplemented, read as ‘0’. Shaded cells are unused by the comparator module. 2003 Microchip Technology Inc. DS39582B-page 140 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566...
W = Writable bit U = Unimplemented bit, read as ‘0’ -n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown 2003 Microchip Technology Inc. DS39582B-page 141 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 144
CMCON C2OUT C1OUT C2INV C1INV 0000 0111 0000 0111 Legend: x = unknown, u = unchanged, - = unimplemented, read as ‘0’. Shaded cells are not used with the comparator voltage reference. 2003 Microchip Technology Inc. DS39582B-page 142 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
The user can wake-up from Sleep through external Reset, Watchdog Timer wake-up or through an interrupt. All PIC16F87XA devices have a host of features intended to maximize system reliability, minimize cost Several oscillator options are also made available to through elimination of external components, provide allow the part to fit the application.
Page 146
U = Unimplemented bit, read as ‘0’ - n = Value when device is unprogrammed u = Unchanged from programmed state Note 1: The erased (unprogrammed) value of the Configuration Word is 3FFFh. 2003 Microchip Technology Inc. DS39582B-page 144 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566...
Page 147
EXTERNAL CLOCK INPUT OPERATION (HS, XT OR 14.2.1 OSCILLATOR TYPES LP OSC CONFIGURATION) The PIC16F87XA can be operated in four different oscillator modes. The user can program two configura- tion bits (F 1 and F 0) to select one of these four...
Page 148
15 pF 15 pF components used. Figure 14-3 shows how the R/C 8 MHz 15-33 pF 15-33 pF combination is connected to the PIC16F87XA. 20 MHz 15-33 pF 15-33 pF These values are for design guidance only. FIGURE 14-3: RC OSCILLATOR MODE See notes following this table.
Page 149
Reset state” on Power-on Reset (POR), on the MCLR and WDT Reset, on MCLR Reset during Sleep and Brown- The PIC16F87XA differentiates between various kinds out Reset (BOR). They are not affected by a WDT of Reset: wake-up which is viewed as the resumption of normal operation.
Page 150
MCLR 14.6 Power-up Timer (PWRT) PIC16F87XA devices have a noise filter in the MCLR The Power-up Timer provides a fixed 72 ms nominal Reset path. The filter will detect and ignore small time-out on power-up only from the POR. The Power- pulses.
Page 151
Legend: u = unchanged, x = unknown, - = unimplemented bit, read as ‘0’ Note 1: When the wake-up is due to an interrupt and the GIE bit is set, the PC is loaded with the interrupt vector (0004h). 2003 Microchip Technology Inc. DS39582B-page 149 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
Page 152
When the wake-up is due to an interrupt and the GIE bit is set, the PC is loaded with the interrupt vector (0004h). See Table 14-5 for Reset value for specific condition. 2003 Microchip Technology Inc. DS39582B-page 150 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
Page 153
See Table 14-5 for Reset value for specific condition. FIGURE 14-6: TIME-OUT SEQUENCE ON POWER-UP (MCLR TIED TO V VIA RC NETWORK) MCLR Internal POR PWRT PWRT Time-out OST Time-out Internal Reset 2003 Microchip Technology Inc. DS39582B-page 151 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 154
PWRT PWRT Time-out OST Time-out Internal Reset FIGURE 14-9: SLOW RISE TIME (MCLR TIED TO V VIA RC NETWORK) MCLR Internal POR PWRT PWRT Time-out OST Time-out Internal Reset 2003 Microchip Technology Inc. DS39582B-page 152 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 155
14.11 Interrupts The RB0/INT pin interrupt, the RB port change interrupt and the TMR0 overflow interrupt flags are contained in The PIC16F87XA family has up to 15 sources of the INTCON register. interrupt. The Interrupt Control register (INTCON) The peripheral interrupt flags are contained in the records individual interrupt requests in flag bits.
Page 156
SWAPF STATUS_TEMP,W ;Swap STATUS_TEMP register into W ;(sets bank to original state) MOVWF STATUS ;Move W into STATUS register SWAPF W_TEMP,F ;Swap W_TEMP SWAPF W_TEMP,W ;Swap W_TEMP into W 2003 Microchip Technology Inc. DS39582B-page 154 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 157
PWRTE WDTE 81h, 181h OPTION_REG RBPU INTEDG T0CS T0SE Legend: Shaded cells are not used by the Watchdog Timer. Note 1: See Register 14-1 for operation of these bits. 2003 Microchip Technology Inc. DS39582B-page 155 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 158
A/D conversion (when A/D clock source is RC). EEPROM write operation completion. 10. Comparator output changes state. Other peripherals cannot generate interrupts since during Sleep, no on-chip clocks are present. 2003 Microchip Technology Inc. DS39582B-page 156 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566...
Page 159
MCLR/V , GND, RB7 and RB6. This will interface to the in-circuit debugger module available from Microchip or one of the third party development tool companies. 2003 Microchip Technology Inc. DS39582B-page 157 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 160
If RB3 floats For complete details of serial programming, please high, the PIC16F87XA device will enter refer to the “PIC16F87XA Flash Memory Programming Programming mode. Specification” (DS39589). 5: LVP mode is enabled by default on all devices shipped from Microchip.
NOP. f = 7-bit file register address Note: To maintain upward compatibility with future PIC16F87XA products, do not use Literal and control operations the OPTION and TRIS instructions. General All instruction examples use the format ‘0xhh’ to represent a hexadecimal number, where ‘h’...
Page 162
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 PICmicro Mid-Range MCU Family Reference Manual (DS33023). 2003 Microchip Technology Inc. DS39582B-page 160 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 163
If bit ‘b’ in register ‘f’ is ‘0’, the next the W register. If ‘d’ is ‘1’, the instruction is discarded and a NOP result is stored back in register ‘f’. is executed instead, making this a instruction. 2003 Microchip Technology Inc. DS39582B-page 161 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 164
W register is cleared. Zero bit (Z) the result is stored in the W is set. register. If ‘d’ is ‘1’, the result is stored back in register ‘f’. 2003 Microchip Technology Inc. DS39582B-page 162 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 165
W register. If ‘d’ is is placed in the W register. If ‘d’ is ‘1’, the result is placed back in ‘1’, the result is placed back in register ‘f’. register ‘f’. 2003 Microchip Technology Inc. DS39582B-page 163 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 166
‘0’, the result is stored in the W If ‘d’ is ‘1’, the result is placed register. If ‘d’ is ‘1’, the result is back in register ‘f’. stored back in register ‘f’. Register f 2003 Microchip Technology Inc. DS39582B-page 164 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 167
(W) .XOR. k → (W) Operation: Status Affected: Description: The contents of the W register are XOR’ed with the eight-bit literal ‘k’. The result is placed in the W register. 2003 Microchip Technology Inc. DS39582B-page 165 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
• 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 2003 Microchip Technology Inc. DS39582B-page167 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 170
(trigonometric, exponen- tial and hyperbolic). The compiler provides symbolic information for high level source debugging with the MPLAB IDE. 2003 Microchip Technology Inc. DS39582B-page 168 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 171
The PC platform and Microsoft Windows 32-bit operating system were cho- sen to best make these features available in a simple, unified application. 2003 Microchip Technology Inc. DS39582B-page169 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566...
Page 172
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. 2003 Microchip Technology Inc. DS39582B-page 170 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566...
Page 173
“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. 2003 Microchip Technology Inc. DS39582B-page171 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
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. 2003 Microchip Technology Inc. DS39582B-page 173 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
Page 177
The ∆ current is the additional current consumed when this peripheral is enabled. This current should be added to the base I or I measurement. When BOR is enabled, the device will operate correctly until the V voltage trip point is reached. 2003 Microchip Technology Inc. DS39582B-page 175 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 178
The ∆ current is the additional current consumed when this peripheral is enabled. This current should be added to the base I or I measurement. When BOR is enabled, the device will operate correctly until the V voltage trip point is reached. 2003 Microchip Technology Inc. DS39582B-page 176 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 179
The ∆ current is the additional current consumed when this peripheral is enabled. This current should be added to the base I or I measurement. When BOR is enabled, the device will operate correctly until the V voltage trip point is reached. 2003 Microchip Technology Inc. DS39582B-page 177 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 180
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. The leakage current on the MCLR pin is strongly dependent on the applied voltage level. The specified levels represent normal operating conditions.
Page 181
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. The leakage current on the MCLR pin is strongly dependent on the applied voltage level. The specified levels represent normal operating conditions.
Page 182
— µs Settling Time* — — These parameters are characterized but not tested. Note 1: Settling time measured while VRR = 1 and VR<3:0> transitions from ‘0000’ to ‘1111’. 2003 Microchip Technology Inc. DS39582B-page 180 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 183
= 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. 2003 Microchip Technology Inc. DS39582B-page 181 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
Page 184
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. 2003 Microchip Technology Inc. DS39582B-page 182 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
Page 185
†† 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 T 2003 Microchip Technology Inc. DS39582B-page 183 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566...
Page 186
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. 2003 Microchip Technology Inc. DS39582B-page 184 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566...
Page 187
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. 2003 Microchip Technology Inc. DS39582B-page 185 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566...
Page 188
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. 2003 Microchip Technology Inc. DS39582B-page 186 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566...
Page 189
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. 2003 Microchip Technology Inc. DS39582B-page 187 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566...
Page 190
(CKP = 1) Bit 6 - - - - - -1 75, 76 MSb In Bit 6 - - - -1 LSb In Note: Refer to Figure 17-3 for load conditions. 2003 Microchip Technology Inc. DS39582B-page 188 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 191
(CKP = 1) Bit 6 - - - - - -1 75, 76 MSb In Bit 6 - - - -1 LSb In Note: Refer to Figure 17-3 for load conditions. 2003 Microchip Technology Inc. DS39582B-page 189 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 192
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: C BUS START/STOP BITS TIMING Stop Start Condition Condition Note: Refer to Figure 17-3 for load conditions. 2003 Microchip Technology Inc. DS39582B-page 190 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 193
Stop condition 100 kHz mode 4000 — — Hold time 400 kHz mode — — FIGURE 17-16: C BUS DATA TIMING Note: Refer to Figure 17-3 for load conditions. 2003 Microchip Technology Inc. DS39582B-page 191 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 194
SDA line, T . + T = 1000 + 250 = 1250 ns (according to the standard mode I C bus specification), R MAX before the SCL line is released. 2003 Microchip Technology Inc. DS39582B-page 192 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 195
Data Hold after CK ↓ (DT hold time) — — † Data in “Typ” column is at 5V, 25°C unless otherwise stated. These parameters are for design guidance only and are not tested. 2003 Microchip Technology Inc. DS39582B-page 193 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566...
Page 196
The A/D conversion result never decreases with an increase in the input voltage and has no missing codes. Maximum allowed impedance for analog voltage source is 10 kΩ. This requires higher acquisition time. 2003 Microchip Technology Inc. DS39582B-page 194 http://www.xinpian.net...
Page 197
§ This specification ensured by design. Note 1: ADRES register may be read on the following T cycle. See Section 11.1 “A/D Acquisition Requirements” for minimum conditions. 2003 Microchip Technology Inc. DS39582B-page 195 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
(HS MODE) Typical: statistical mean @ 25°C Maximum: mean + 3σ (-40°C to +125°C) Minimum: mean – 3σ (-40°C to +125°C) 5.5V 5.0V 4.5V 4.0V 3.5V 3.0V 2.5V 2.0V (MHz) 2003 Microchip Technology Inc. DS39582B-page 197 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 200
Maximum: mean + 3σ (-40°C to +125°C) Minimum: mean – 3σ (-40°C to +125°C) 5.5V 5.0V 4.5V 4.0V 3.5V 3.0V 2.5V 2.0V 1000 1500 2000 2500 3000 3500 4000 (MHz) 2003 Microchip Technology Inc. DS39582B-page 198 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 201
(LP MODE) Typical: statistical mean @ 25°C 5.5V Maximum: mean + 3σ (-40°C to +125°C) Minimum: mean – 3σ (-40°C to +125°C) 5.0V 4.5V 4.0V 3.5V 3.0V 2.5V 2.0V (kHz) 2003 Microchip Technology Inc. DS39582B-page 199 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 202
10 kOhm 100 kOhm FIGURE 18-8: AVERAGE F vs. V FOR VARIOUS VALUES OF R (RC MODE, C = 100 pF, +25°C) 3.3 kOhm 5.1 kOhm 10 kOhm 100 kOhm 2003 Microchip Technology Inc. DS39582B-page 200 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 203
, -40°C TO +125°C (SLEEP MODE, ALL PERIPHERALS DISABLED) Max (125°C) Max (85°C) 0.01 Typ (25°C) Typical: statistical mean @ 25°C Maximum: mean + 3σ (-40°C to +125°C) Minimum: mean – 3σ (-40°C to +125°C) 0.001 2003 Microchip Technology Inc. DS39582B-page 201 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 204
OVER TEMPERATURE (WDT ENABLED) Typical: statistical mean @ 25°C Maximum: mean + 3σ (-40°C to +125°C) Minimum: mean – 3σ (-40°C to +125°C) Max (+125°C) Max (+85°C) Typ (+25°C) 2003 Microchip Technology Inc. DS39582B-page 202 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 205
TYPICAL, MINIMUM AND MAXIMUM WDT PERIOD vs. V (-40°C TO +125°C) Typical: statistical mean @ 25°C Maximum: mean + 3σ (-40°C to +125°C) Minimum: mean – 3σ (-40°C to +125°C) (125°C) (25°C) (-40°C) 2003 Microchip Technology Inc. DS39582B-page 203 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 206
I = 5V, -40°C TO +125°C) Typ (25°C) Typical: statistical mean @ 25°C Maximum: mean + 3σ (-40°C to +125°C) Minimum: mean – 3σ (-40°C to +125°C) (-mA) 2003 Microchip Technology Inc. DS39582B-page 204 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 207
= 5V, -40°C TO +125°C) Max (125°C) Typical: statistical mean @ 25°C Maximum: mean + 3σ (-40°C to +125°C) Minimum: mean – 3σ (-40°C to +125°C) Max (85°C) Typ (25°C) Min (-40°C) (-mA) 2003 Microchip Technology Inc. DS39582B-page 205 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 208
(TTL INPUT, -40°C TO +125°C) Typical: statistical mean @ 25°C Maximum: mean + 3σ (-40°C to +125°C) Minimum: mean – 3σ (-40°C to +125°C) Max (-40°C) Typ (25°C) Min (125°C) 2003 Microchip Technology Inc. DS39582B-page 206 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 209
MINIMUM AND MAXIMUM V vs. V C INPUT, -40°C TO +125°C) Typical: statistical mean @ 25°C Maximum: mean + 3σ (-40°C to +125°C) Minimum: mean – 3σ (-40°C to +125°C) 2003 Microchip Technology Inc. DS39582B-page 207 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 210
125C and V REFH FIGURE 18-24: A/D NONLINEARITY vs. V = 5V, -40°C TO +125°C) REFH Max (-40°C to +125°C) Max (-40C to 125C) Typ (+25°C) Typ (25C) REFH 2003 Microchip Technology Inc. DS39582B-page 208 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
For PICmicro device 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. 2003 Microchip Technology Inc. DS39582B-page 209 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
Page 213
Notes: Dimensions D and E1 do not include mold flash or protrusions. Mold flash or protrusions shall not exceed .010” (0.254mm) per side. JEDEC Equivalent: MO-011 Drawing No. C04-016 2003 Microchip Technology Inc. DS39582B-page 211 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 214
Notes: Dimensions D1 and E1 do not include mold flash or protrusions. Mold flash or protrusions shall not exceed .010” (0.254mm) per side. JEDEC Equivalent: MS-026 Drawing No. C04-076 2003 Microchip Technology Inc. DS39582B-page 212 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 215
Notes: Dimensions D and E1 do not include mold flash or protrusions. Mold flash or protrusions shall not exceed .010” (0.254mm) per side. JEDEC Equivalent: MO-047 Drawing No. C04-048 2003 Microchip Technology Inc. DS39582B-page 213 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 216
Notes: Dimensions D and E1 do not include mold flash or protrusions. Mold flash or protrusions shall not exceed .010" (0.254mm) per side. JEDEC equivalent: M0-220 Drawing No. C04-103 2003 Microchip Technology Inc. DS39582B-page 214 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 217
Notes: Dimension D and E1 do not include mold flash or protrusions. Mold flash or protrusions shall not exceed .010” (0.254mm) per side. JEDEC Equivalent: MO-095 Drawing No. C04-070 2003 Microchip Technology Inc. DS39582B-page 215 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 218
Notes: Dimensions D and E1 do not include mold flash or protrusions. Mold flash or protrusions shall not exceed .010” (0.254mm) per side. JEDEC Equivalent: MS-013 Drawing No. C04-052 2003 Microchip Technology Inc. DS39582B-page 216 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 219
Notes: Dimensions D and E1 do not include mold flash or protrusions. Mold flash or protrusions shall not exceed .010” (0.254mm) per side. JEDEC Equivalent: MS-150 Drawing No. C04-073 2003 Microchip Technology Inc. DS39582B-page 217 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
Page 220
Notes: Dimensions D and E1 do not include mold flash or protrusions. Mold flash or protrusions shall not exceed .010" (0.254mm) per side. JEDEC equivalent: mMO-220 Drawing No. C04-114 2003 Microchip Technology Inc. DS39582B-page 218 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
REVISION HISTORY APPENDIX B: DEVICE DIFFERENCES Revision A (November 2001) The differences between the devices in this data sheet Original data sheet for PIC16F87XA devices. The are listed in Table B-1. devices presented are enhanced versions of the PIC16F87X microcontrollers discussed “PIC16F87X Data Sheet”...
Segmented, starting at end On/Off of program memory Program Memory — On/Off Segmented, starting at Write Protection beginning of program memory Other In-Circuit Debugger, In-Circuit Debugger, Low-Voltage Programming Low-Voltage Programming 2003 Microchip Technology Inc. DS39582B-page 220 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
• Microchip Consultant Program Member Listing • Links to other useful web sites related to Microchip Products • Conferences for products, Development Systems, technical information and more • Listing of seminars and events 2003 Microchip Technology Inc. DS39582B-page 229 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务 010-62245566 13810019655...
5. What deletions from the document could be made without affecting the overall usefulness? 6. Is there any incorrect or misleading information (what and where)? 7. How would you improve this document? 2003 Microchip Technology Inc. DS39582B-page 230 http://www.xinpian.net 提供单片机解密、IC解密、芯片解密业务...
PIC16F87XA PIC16F87XA PRODUCT IDENTIFICATION SYSTEM To order or obtain information, e.g., on pricing or delivery, refer to the factory or the listed sales office. PART NO. Examples: Device Temperature Package Pattern PIC16F873A-I/P 301 = Industrial temp., PDIP Range package, normal V limits, QTP pattern #301.
Need help?
Do you have a question about the PIC16F87XA and is the answer not in the manual?
Questions and answers