PIC16F870
PIC16F870
1.0
DEVICE OVERVIEW
PIC16F870/871
128 Bytes
64 Bytes
13
PORTA
RA0/AN0
RA1/AN1
RA2/AN2/VREFRA3/AN3/VREF+
RA4/T0CKI
RA5/AN4
RAM
File
Registers
8 Level Stack
(13-bit)
Program
Bus
Data Bus
Program Counter
FLASH
Program
Memory
14
PORTB
Addr MUX
Instruction reg
Direct Addr
Indirect
Addr
FSR reg
STATUS reg
8
3
Power-up
Timer
ALU
Power-on
Reset
Timing
Generation
Watchdog
Timer
Brown-out
Reset
In-Circuit
Debugger
OSC1/CLKI
OSC2/CLKO
RC0/T1OSO/T1CKI
RC1/T1OSI
RC2/CCP1
RC3
RC4
RC5
RC6/TX/CK
RC7/RX/DT
MUX
Oscillator
Start-up Timer
Instruction
Decode &
Control
PORTC
RB0/INT
RB1
RB2
RB3/PGM
RB4
RB5
RB6/PGC
RB7/PGD
W reg
Low-Voltage
Programming
MCLR
Timer0
Data EEPROM
TABLE 1-1:
Note 1:
Timer2
Description
Oscillator crystal input/external clock source input.
Oscillator crystal output. Connects to crystal or resonator in
Crystal Oscillator mode. In RC mode, theDS30569B-page
OSC2 pin outputs
5
CLKO, which has 1/4 the frequency of OSC1, and denotes the
instruction cycle rate.
Master Clear (Reset) input or programming voltage input or High
Voltage Test mode control. This pin is an active low RESET to the
device.
PORTA is a bi-directional I/O port.
RA0 can also be analog input 0.
RA1 can also be analog input 1.
RA2 can also be analog input 2 or negative analog reference
voltage.
10-bit A/D
CCP1
DIPbits areSOIC
I/O/P register.
Buffer
Higher order
from the STATUS
Pin Name
Pin#
Pin#
Type
Type
OSC1/CLKI
ST/CMOS(3)
OSC2/CLKO
10
10
MCLR/VPP/THV
I/P
ST
RA0/AN0
I/O
TTL
USART
I/O
TTL
RA2/AN2/VREF-
I/O
TTL
RA3/AN3/VREF+
I/O
TTL
RA4/T0CKI
I/O
ST/OD
RA4 can also be the clock input to the Timer0 module. Output
is open drain type.
RA5/AN4
I/O
TTL
RB0/INT
21
21
I/O
TTL/ST(1)
RB1
22
22
I/O
TTL
RB2
23
23
I/O
TTL
RB3/PGM
24
24
I/O
TTL/ST(1)
RB4
25
25
I/O
TTL
Interrupt-on-change pin.
RB5
26
26
I/O
TTL
Interrupt-on-change pin.
RB6/PGC
27
27
I/O
TTL/ST(2)
RB7/PGD
28
28
I/O
TTL/ST(2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
RB7/PGD
RB6/PGC
RB5
RB4
RB3/PGM
RB2
RB1
RB0/INT
VDD
VSS
RC7/RX/DT
RC6/TX/CK
RC5
RC4
28
27
26
25
24
23
22
21
20
19
18
17
16
15
Caractersticas
Gerais
PLCC
RA4/T0CKI
RA5/AN4
RE0/RD/AN5
RE1/WR/AN6
RE2/CS/AN7
VDD
VSS
OSC1/CLKI
OSC2/CLKO
RC0/T1OSO/T1CK1
NC
TQFP
- SLEEP
Mode
- Oscilador selecionvel
RB3 can also be the low voltage programming input.
11
11
I/O
ST
RC1/T1OSI
12
12
I/O
ST
RC2/CCP1
13
13
I/O
ST
RC3
14
14
I/O
ST
RC4
15
15
I/O
ST
RC5
16
16
I/O
ST
RC6/TX/CK
17
17
I/O
ST
RC7/RX/DT
18
18
I/O
ST
VSS
8, 19
8, 19
VDD
20
20
Note 1:
2:
3:
MCLR/VPP/THV
RA0/AN0
RA1/AN1
RA2/AN2/VREFRA3/AN3/VREF+
RA4/T0CKI
RA5/AN4
VSS
OSC1/CLKI
OSC2/CLKO
RC0/T1OSO/T1CKI
RC1/T1OSI
RC2/CCP1
RC3
Fonte: Microchip
PIC16F870/871
RA1/AN1
Legend:
VDD, VSS
Timer1
PIC16F870
Pin Diagrams
RC6/TX/CK
RC5
RC4
RD3/PSP3
RD2/PSP2
RD1/PSP1
RD0/PSP0
RC3
RC2/CCP1
RC1/T1OSI
NC
2K
Data EEPROM
I = input
O = output
I/O = input/output
P = power
OD = Open Drain
= Not used
TTL = TTL input
ST = Schmitt Trigger input
This buffer is a Schmitt Trigger input when configured as the external interrupt or LVP mode.
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.
PIC16F870
Data Memory
Program FLASH
PIC16F870
Device
FIGURE 1-1:
NC
RC0/T1OSO/T1C
OSC2/CLKO
OSC1/CLKI
VSS
VDD
RE2/CS/AN7
RE1/WR/AN6
RE0/RD/AN5
RA5/AN4
RA4/T0CKI