PIC16F872-I/SP Microchip Technology Inc., PIC16F872-I/SP Datasheet - Page 159
![no-image](/images/manufacturer_photos/0/4/440/microchip_technology_inc__sml.jpg)
PIC16F872-I/SP
Manufacturer Part Number
PIC16F872-I/SP
Description
28 PIN, 7 KB FLASH, 128 RAM, 22 I/O
Manufacturer
Microchip Technology Inc.
Datasheet
1.PIC16F872-ISP.pdf
(168 pages)
Specifications of PIC16F872-I/SP
A/d Inputs
5-Channel, 10-Bit
Cpu Speed
5 MIPS
Eeprom Memory
64 Bytes
Input Output
22
Interface
I2C/SPI
Memory Type
Flash
Number Of Bits
8
Package Type
28-pin SPDIP
Programmable Memory
3.5K Bytes
Ram Size
128 Bytes
Speed
20 MHz
Timers
2-8-bit, 1-16-bit
Voltage, Range
2-5.5 V
Lead Free Status / Rohs Status
RoHS Compliant part
Electrostatic Device
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Company:
Part Number:
PIC16F872-I/SP
Manufacturer:
PIC
Quantity:
270
Company:
Part Number:
PIC16F872-I/SP
Manufacturer:
PIC
Quantity:
270
Company:
Part Number:
PIC16F872-I/SP
Manufacturer:
SILICON
Quantity:
1 000
Part Number:
PIC16F872-I/SP
Manufacturer:
MIC
Quantity:
20 000
INDEX
A
A/D ..................................................................................... 79
Absolute Maximum Ratings ............................................. 117
ACK pulse .......................................................................... 59
ACKDT Bit
ACKEN Bit
Acknowledge Pulse (ACK) ................................................. 59
ACKSTAT Bit
ACKSTAT Status Flag ....................................................... 67
ADCON0 Register ............................................................... 9
ADCON1 Register ............................................................. 10
ADRESH Register ............................................................... 9
ADRESL Register .............................................................. 10
Analog-to-Digital Converter. See A/D
Application Notes
Assembler
B
Banking, Data Memory ........................................................ 7
BCLIF Bit ........................................................................... 18
BF Bit
BF Status Flag ............................................................ 67
Block Diagrams
© 2006 Microchip Technology Inc.
Acquisition Requirements .......................................... 82
ADCON0 Register ..................................................... 79
ADCON1 Register ..................................................... 79
ADIF Bit ..................................................................... 81
ADRESH Register ..................................................... 79
ADRESL Register ...................................................... 79
Associated Registers and Bits ................................... 85
Configuring Analog Port Pins .................................... 83
Configuring the Interrupt ............................................ 81
Configuring the Module ............................................. 81
Conversion Clock ...................................................... 83
Conversions ............................................................... 84
Effects of a RESET .................................................... 85
GO/DONE Bit ............................................................ 81
Internal Sampling Switch (Rss) Impedance ............... 82
Operation During SLEEP ........................................... 85
Result Registers ........................................................ 84
Source Impedance .................................................... 82
T
Acknowledge Data Bit (ACKDT) ................................ 54
Acknowledge Sequence Enable Bit (ACKEN) ........... 54
Acknowledge Status Bit (ACKSTAT) ......................... 54
AN552 (Implementing Wake-up on Key Stroke) ........ 31
AN556 (Implementing a Table Read) ........................ 20
AN578 (Use of the SSP Module in the I
MPASM Assembler ................................................. 111
Buffer Full Status Bit (BF) .......................................... 52
A/D Converter ............................................................ 81
Analog Input Model .................................................... 82
Baud Rate Generator ................................................ 64
Capture Mode ............................................................ 46
Compare Mode .......................................................... 47
I
Interrupt Logic ............................................................ 97
MSSP (SPI Mode) ..................................................... 55
On-Chip Reset Circuit ................................................ 91
Peripheral Output Override (RC 2:0, 7:5) .................. 33
Peripheral Output Override (RC 4:3) ......................... 33
PIC16F872 .................................................................. 4
2
AD
C Slave Mode ......................................................... 58
............................................................................ 83
Multi-Master Environment) ........................ 58
2
C
,
69
BOR. See Brown-out Reset
Brown-out Reset (BOR) ................................ 87
Bus Arbitration ................................................................... 73
Bus Collision
Bus Collision During a Repeated START Condition ......... 76
Bus Collision During a START Condition .......................... 74
Bus Collision During a STOP Condition ............................ 77
Bus Collision Interrupt Flag (BCLIF) .................................. 18
C
Capture Mode
Capture/Compare/PWM (CCP) ......................................... 45
CCP. See Capture/Compare/PWM
CCP1CON Register ............................................................ 9
CCP1M3:CCP1M0 bits ...................................................... 45
CCP1X bit .......................................................................... 45
CCP1Y bit .......................................................................... 45
CCPR1H Register .........................................................9
CCPR1L Register ..........................................................9
CKE Bit .............................................................................. 52
CKP Bit .............................................................................. 53
Clock Polarity Select Bit (CKP) ......................................... 53
Code Examples
Code Protected Operation
PWM Mode ............................................................... 48
RA3:RA0 and RA5 Pins ............................................ 29
RA4/T0CKI Pin .......................................................... 29
RB3:RB0 Pins ........................................................... 31
RB7:RB4 Pins ........................................................... 31
RC Oscillator Mode ................................................... 90
SSP (I
Timer0/WDT Prescaler .............................................. 35
Timer1 ....................................................................... 40
Timer2 ....................................................................... 43
Watchdog Timer ........................................................ 99
Section ...................................................................... 73
CCP Pin Configuration .............................................. 46
Software Interrupt ...................................................... 46
Timer1 Mode Selection ............................................. 46
Associated Registers ................................................ 47
Capture Mode ........................................................... 46
CCP Timer Resources .............................................. 45
Compare Mode ......................................................... 47
PWM Mode ............................................................... 48
Special Event Trigger and A/D Conversions ............. 47
Changing Between Capture Prescalers .................... 46
EEPROM Data Read ................................................ 25
EEPROM Data Write ................................................. 25
FLASH Program Read .............................................. 26
FLASH Program Write .............................................. 27
Indirect Addressing ................................................... 21
Initializing PORTA ..................................................... 29
Saving STATUS, W and PCLATH Registers ............ 98
Data EEPROM and FLASH Program Memory .......... 28
PWM and Timer2 .............................................. 49
CCP1IF ............................................................. 46
Prescaler ........................................................... 46
Software Interrupt Mode .................................... 47
Special Event Trigger ........................................ 47
Duty Cycle ......................................................... 48
Example Frequencies/
PWM Period ...................................................... 48
2
C Master Mode) ............................................ 63
Resolutions (Table) ........................... 49
PIC16F872
DS30221C-page 157
,
91
,
92
,
,
,
93
45
45