You are on page 1of 1

PIC16F870/871

1.0

DEVICE OVERVIEW

There are two devices (PIC16F870 and PIC16F871)


covered by this data sheet. The PIC16F870 device
comes in a 28-pin package and the PIC16F871 device
comes in a 40-pin package. The 28-pin device does not
have a Parallel Slave Port implemented.

This document contains device specific information.


Additional information may be found in the PICmicroTM
Mid-Range
MCU Family
Reference Manual
(DS33023), which may be obtained from your local
Microchip Sales Representative or downloaded from
the Microchip web site. The Reference Manual should
be considered a complementary document to this data
sheet, and is highly recommended reading for a better
understanding of the device architecture and operation
of the peripheral modules.

The following two figures are device block diagrams


sorted by pin number: 28-pin for Figure 1-1 and 40-pin
for Figure 1-2. The 28-pin and 40-pin pinouts are listed
in Table 1-1 and Table 1-2, respectively.

Escola de Educao Profissional SENAI Nilo Peanha

PIC16F870/871

Curso Tcnico em Eletrnica

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

RAM Addr (1)

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

PIC16F870 PINOUT DESCRIPTION

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

2003 Microchip Technology Inc.

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

RA3 can also be analog input 3 or positive analog reference


voltage.

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

RA5 can also be analog input 4.


PORTB is a bi-directional I/O port. PORTB can be software
programmed for internal weak pull-up on all inputs.

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)

Interrupt-on-change pin or In-Circuit Debugger pin. Serial


programming clock.

RB7/PGD

28

28

I/O

TTL/ST(2)

Interrupt-on-change pin or In-Circuit Debugger pin. Serial


programming data.

RB0 can also be the external interrupt pin.

1
2
3
4
5
6
7
8
9
10
11
12
13
14

- RISC CPU (35 instrues)


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

- Clock: De 0 20 Mhz ( 200 ns por instruo)


- FLASH Program Memory: 2K
- EEPROM Data Memory: 64 bytes
- Data Memory (RAM): 128 bytes
- Pinagem compatvel com a famlia PIC16
- Interrupes (11 fontes)
- Power-on Reset (POR)
- Power-up Timer (PWRT)
- Watchdog Timer (WDT)

RA4/T0CKI
RA5/AN4
RE0/RD/AN5
RE1/WR/AN6
RE2/CS/AN7
VDD
VSS
OSC1/CLKI
OSC2/CLKO
RC0/T1OSO/T1CK1
NC

- Brown-out Reset (BOR)


- Code Protection
- Data Protection

TQFP
- SLEEP
Mode

- Oscilador selecionvel
RB3 can also be the low voltage programming input.

PORTC is a bi-directional I/O port.


RC0/T1OSO/T1CKI

11

11

I/O

ST

RC0 can also be the Timer1 oscillator output or Timer1 clock


input.

RC1/T1OSI

12

12

I/O

ST

RC1 can also be the Timer1 oscillator input.

RC2/CCP1

13

13

I/O

ST

RC2 can also be the Capture1 input/Compare1 output/


PWM1 output.

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

RC6 can also be the USART Asynchronous Transmit or


Synchronous Clock.

RC7/RX/DT

18

18

I/O

ST

RC7 can also be the USART Asynchronous Receive or


Synchronous Data.

VSS

8, 19

8, 19

Ground reference for logic and I/O pins.

VDD

20

20

Positive supply for logic and I/O pins.

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:

Prof. Diego Volpini

DIP, SOIC, SSOP

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.

- In-Circuit-Serial Programming (ICSP) via dois pinos


- Tenso de operao: 2 5,5 Volts
- Corrente de sada: 25 mA
44
43
42
41
40
39
38
37
36
35
34

PIC16F870

Data Memory

- Baixo consumo de potncia:


33
1
RC7/RX/DT
- < 1,6mA @ 5V,
32
RD4/PSP4
2 4 MHz
- 20uA @ 3V,332KHz
31
RD5/PSP5
- < 1uA em SLEEP
Mode
30
RD6/PSP6
4
29
5
RD7/PSP7
28
VSS
6
PIC16F871
27
7
VDD
26
8
- RB0/INT
Trs Timers (TIMER0,
TIMER1 e TIMER2)
9
25
RB1
- Compare,
Capture
24
RB2
10 e PWM mdulo (CCP)
23
11 mltiplos canais
-RB3/PGM
Conversor A/D de
12
13
14
15
16
17
18
19
20
21
22

Program FLASH

PIC16F870

PIC16F870 BLOCK DIAGRAM

Device

- Universal Synchronous Asynchronous Receiver


Transmitter (USART/SCI)
NC
NC
RB4
RB5
RB6/PGC
RB7/PGD
/VPP/THV
RA0/AN0
RA1/AN1
AN2/VREFN3/VREF+

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

You might also like