Академический Документы
Профессиональный Документы
Культура Документы
Data Sheet
8-bit Flash-based Microcontroller
with A/D Converter and
Enhanced Capture/Compare/PWM
Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the
intended manner and under normal conditions.
There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our
knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchips Data
Sheets. Most likely, the person doing so is engaged in theft of intellectual property.
Microchip is willing to work with the customer who is concerned about the integrity of their code.
Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not
mean that we are guaranteeing the product as unbreakable.
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our
products. Attempts to break Microchips code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts
allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.
RA2/AN2 1 18 RA1/AN1
RA3/AN3/VREF 2 17 RA0/AN0
RA4/T0CKI 3 16 OSC1/CLKIN
OSC2/CLKOUT
PIC16F716
MCLR/VPP 4 15
VSS 5 14 VDD
RB0/INT/ECCPAS2 6 13 RB7/P1D
RB1/T1OSO/T1CKI 7 12 RB6/P1C
RB2/T1OSI 8 11 RB5/P1B
RB3/CCP1/P1A 9 10 RB4/ECCPAS0
20-pin SSOP
RA2/AN2 1 20 RA1/AN1
RA3/AN3/VREF 2 19 RA0/AN0
RA4/T0CKI 3 18 OSC1/CLKIN
MCLR/VPP 4 17 OSC2/CLKOUT
PIC16F716
VSS 5 16 VDD
VSS 6 15 VDD
RB0/INT/ECCPAS2 7 14 RB7/P1D
RB1/T1OSO/T1CKI 8 13 RB6/P1C
RB2/T1OSI 9 12 RB5/P1B
RB3/CCP1/P1A 10 11 RB4/ECCPAS0
Errata
An errata sheet, describing minor operational differences from the data sheet and recommended workarounds, may exist for current
devices. As device/documentation issues become known to us, we will publish an errata sheet. The errata will specify the revision
of silicon and revision of document to which it applies.
To determine if an errata sheet exists for a particular device, please check with one of the following:
Microchips Worldwide Web site; http://www.microchip.com
Your local Microchip sales office (see last page)
When contacting a sales office, please specify which device, revision of silicon and data sheet (include literature number) you are
using.
3
Power-up MUX
Timer
Instruction Oscillator
Decode and Start-up Timer
ALU
Control
Power-on
Reset 8
OSC1/CLKIN Timing Watchdog
Generation Timer W Reg
OSC2/CLKOUT
Brown-out
Reset
Enhanced CCP
(ECCP) A/D
MCLR/VPP MCLR ST Master clear (Reset) input. This pin is an active-low Reset to
the device.
VPP P Programming voltage input
OSC1/CLKIN OSC1 XTAL Oscillator crystal input
CLKIN CMOS External clock source input
CLKIN ST RC Oscillator mode
OSC2/CLKOUT OSC2 XTAL Oscillator crystal output. Connects to crystal or resonator in
Crystal Oscillator mode.
CLKOUT CMOS In RC mode, OSC2 pin outputs CLKOUT which has 1/4 the
frequency of OSC1, and denotes the instruction cycle rate.
RA0/AN0 RA0 TTL CMOS Bidirectional I/O
AN0 AN Analog Channel 0 input
RA1/AN1 RA1 TTL CMOS Bidirectional I/O
AN1 AN Analog Channel 1 input
RA2/AN2 RA2 TTL CMOS Bidirectional I/O
AN2 AN Analog Channel 2 input
RA3/AN3/VREF RA3 TTL CMOS Bidirectional I/O
AN3 AN Analog Channel 3 input
VREF AN A/D reference voltage input
RA4/T0CKI RA4 ST OD Bidirectional I/O. Open drain when configured as output.
T0CKI ST Timer0 external clock input
RB0/INT/ECCPAS2 RB0 TTL CMOS Bidirectional I/O. Programmable weak pull-up.
INT ST External Interrupt
ECCPAS2 ST ECCP Auto-Shutdown pin
RB1/T1OSO/T1CKI RB1 TTL CMOS Bidirectional I/O. Programmable weak pull-up.
T1OSO XTAL Timer1 oscillator output. Connects to crystal in Oscillator
mode.
T1CKI ST Timer1 external clock input
RB2/T1OSI RB2 TTL CMOS Bidirectional I/O. Programmable weak pull-up.
T1OSI XTAL Timer1 oscillator input. Connects to crystal in Oscillator mode.
RB3/CCP1/P1A RB3 TTL CMOS Bidirectional I/O. Programmable weak pull-up.
CCP1 ST CMOS Capture1 input, Compare1 output, PWM1 output.
P1A CMOS PWM P1A output
RB4/ECCPAS0 RB4 TTL CMOS Bidirectional I/O. Programmable weak pull-up. Interrupt-on-
change.
ECCPAS0 ST ECCP Auto-Shutdown pin
RB5/P1B RB5 TTL CMOS Bidirectional I/O. Programmable weak pull-up. Interrupt-on-
change.
P1B CMOS PWM P1B output
RB6/P1C RB6 TTL CMOS Bidirectional I/O. Programmable weak pull-up. Interrupt-on-
change. ST input when used as ICSP programming clock.
P1C CMOS PWM P1C output
RB7/P1D RB7 TTL CMOS Bidirectional I/O. Programmable weak pull-up. Interrupt-on-
change. ST input when used as ICSP programming data.
P1D CMOS PWM P1D output
VSS VSS P Ground reference for logic and I/O pins.
VDD VDD P Positive supply for logic and I/O pins.
Legend: I = Input AN = Analog input or output OD = Open drain
O = Output TTL = TTL compatible input ST = Schmitt Trigger input with CMOS levels
P = Power XTAL = Crystal CMOS = CMOS compatible input or output
Stack Level 8
0005h
Space
On-chip Program
Memory
07FFh
0800h
1FFFh
00h INDF(1) Addressing this location uses contents of FSR to address data memory (not a physical register) 0000 0000 18
01h TMR0 Timer0 modules register xxxx xxxx 27
02h PCL(1) Program Counters (PC) Least Significant Byte 0000 0000 17
80h INDF(1) Addressing this location uses contents of FSR to address data memory (not a physical register) 0000 0000 18
81h OPTION_REG RBPU INTEDG T0CS T0SE PSA PS2 PS1 PS0 1111 1111 12
82h PCL(1) Program Counters (PC) Least Significant Byte 0000 0000 17
Legend:
R = Readable bit 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
Note 1: For Borrow, the polarity is reversed. A subtraction is executed by adding the twos complement of the sec-
ond operand. For rotate (RRF, RLF) instructions, this bit is loaded with either the high-order or low-order bit
of the source register.
Legend:
R = Readable bit 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
Legend:
R = Readable bit 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
Legend:
R = Readable bit 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
Legend:
R = Readable bit 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
Legend:
R = Readable bit 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
Data Latch
DATA
BUS D Q RA4/T0CKI
WR
CK Q
PORT
N
TRIS Latch
D Q VSS
VSS
WR
TRIS CK Schmitt
Q Trigger
Input
Buffer
RD TRIS
Q D
ENEN
RD PORT
PORTA RA4 RA3 RA2 RA1 RA0 ---x 0000 ---u uuuu
TRISA TRISA4 TRISA3 TRISA2 TRISA1 TRISA0 ---1 1111 ---1 1111
ADCON1 PCFG2 PCFG1 PCFG0 ---- -000 ---- -000
Legend: x = unknown, u = unchanged, = unimplemented locations read as 0. Shaded cells are not used by
PORTA.
Each of the PORTB pins has a weak internal pull-up. A 1. Perform a read of PORTB to end the mismatch
single control bit can turn on all the pull-ups. This is condition.
performed by clearing bit RBPU of the OPTION regis- 2. Clear flag bit RBIF.
ter. The weak pull-up is automatically turned off when A mismatch condition will continue to set flag bit RBIF.
the port pin is configured as an output. The pull-ups are Reading PORTB will end the mismatch condition and
disabled on a Power-on Reset. allow flag bit RBIF to be cleared.
The interrupt-on-change feature is recommended for
FIGURE 3-3: BLOCK DIAGRAM OF wake-up on key depression operation and operations
RB0/INT/ECCPAS2 PIN where PORTB is only used for the interrupt-on-change
VDD VDD feature. Polling of PORTB is not recommended while
RBPU(1) weak using the interrupt-on-change feature.
P pull-up
RD PORT EN
Schmitt Trigger
RB0/INT Buffer
RD PORT
ECCPAS2: ECCP Auto-shutdown input
VDD
RBPU(1)
T1OSCEN weak
P pull-up
VDD
Data Latch
DATA BUS
D Q RB1/T1OSO/T1CKI
WR PORTB
CK Q
TRIS Latch
D Q VSS
WR TRISB
CK Q
RD TRISB
T1OSCEN
TTL Buffer
Q D
EN
RD PORTB
TMR1 oscillator
To Timer1 clock input
ST Buffer
Note 1: To enable weak pull-ups, set the appropriate TRIS bit(s) and clear the RBPU bit (OPTION register).
VDD
RBPU(1)
T1OSCEN weak
P pull-up VDD
Data Latch
DATA BUS
D Q RB2/T1OSI
WR PORTB Q
CK
TRIS Latch
D Q VSS
WR TRISB
CK Q
RD TRIS
T1OSCEN
TTL Buffer
Q D
EN
RD PORTB
TMR1
T1OSO (To RB1) Oscillator
Note 1: To enable weak pull-ups, set the appropriate TRIS bit(s) and clear the RBPU bit (OPTION register).
VDD
[PWMA(P1A) / CCP1 Compare] Output Enable RBPU(1) weak
P pull-up VDD
TRIS Latch
D Q
WR TRISB
CK Q
RD TRIS
TTL Buffer
Q D
EN
RD PORTB
Note 1: To enable weak pull-ups, set the appropriate TRIS bit(s) and clear the RBPU bit (OPTION register).
VDD
RBPU(1) weak VDD
P pull-up
Data Latch
DATA BUS
D Q RB4/ECCPAS0
WR PORTB
CK
TRIS Latch
D Q VSS
WR TRISB TTL
CK Buffer
ST
Buffer
RD TRIS Latch
Q D
RD PORT EN Q1
Set RBIF
From other Q D
RB<7:4> pins RD PORT Note 1: To enable weak pull-ups, set
the appropriate TRIS bit(s)
EN and clear the RBPU bit of the
Q3
OPTION register.
ECCPAS0: ECCP Auto-Shutdown input
WR PORTB
CK
WR TRISB Q TTL
CK
Buffer
RD TRISB Latch
Q D
RD PORTB EN Q1
Set RBIF
From other Q D
RB<7:4> pins
RD PORTB
EN
Q3
Note 1: To enable weak pull-ups, set the appropriate TRIS bit(s) and clear the RBPU bit (OPTION register).
WR PORTB
CK
WR TRISB Q TTL
CK ST
Buffer Buffer
RD TRISB Latch
Q D
RD PORTB EN Q1
Set RBIF
From other Q D
RB<7:4> pins
RD PORTB
EN
Q3
ICSPC In-Circuit Serial Programming Clock Input
Note 1: To enable weak pull-ups, set the appropriate TRIS bit(s) and clear the RBPU bit (OPTION register).
WR PORTB
CK
WR TRISB Q ST TTL
CK
Buffer Buffer
RD TRISB Latch
Q D
RD PORTB EN Q1
Set RBIF
From other Q D
Note 1: To enable weak pull-ups,
RB<7:4> pins
RD PORTB set the appropriate TRIS
EN bit(s) and clear the RBPU
Q3
bit of the OPTION register.
ICSPD In-Circuit Serial Programming Data Input
PORTB RB7 RB6 RB5 RB4 RB3 RB2 RB1 RB0 xxxx xxxx uuuu uuuu
TRISB TRISB7 TRISB6 TRISB5 TRISB4 TRISB3 TRISB2 TRISB1 TRISB0 1111 1111 1111 1111
OPTION_REG RBPU INTEDG T0CS T0SE PSA PS2 PS1 PS0 1111 1111 1111 1111
Legend: x = unknown, u = unchanged. Shaded cells are not used by PORTB.
FOSC/4
Data Bus
0
8
1
Sync
1 2 TCY TMR0
T0CKI 0
pin 0
T0SE T0CS Set Flag bit T0IF
8-bit
on Overflow
Prescaler PSA
1
8
PSA
WDTE
PS<2:0> 1
WDT
Time-out
0
31 kHz Watchdog
INTOSC Timer PSA
Note 1: T0SE, T0CS, PSA, PS<2:0> are bits in the OPTION register.
2: WDTE bit is in the Configuration Word register.
Note 1: ST Buffer is low power type when using LP oscillator, or high speed type when using T1CKI.
2: Timer1 register increments on rising edge.
3: Synchronize does not operate while in Sleep.
T1CKI = 1
when TMR1
Enabled
T1CKI = 0
when TMR1
Enabled
Legend:
R = Readable bit 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
Sets Flag
TMR2
bit TMR2IF
Output
Prescaler Reset
FOSC/4 TMR2
1:1, 1:4, 1:16
2 Postscaler
Comparator
EQ 1:1 to 1:16
T2CKPS<1:0>
PR2 4
TOUTPS<3:0>
Legend:
R = Readable bit 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
INTCON GIE PEIE T0IE INTE RBIE T0IF INTF RBIF 0000 000x 0000 000x
PIE1 ADIE CCP1IE TMR2IE TMR1IE -0-- -000 -0-- -000
PIR1 ADIF CCP1IF TMR2IF TMR1IF -0-- -000 -0-- -000
PR2 Timer2 Module Period Register 1111 1111 1111 1111
TMR2 Holding Register for the 8-bit TMR2 Register 0000 0000 0000 0000
T2CON TOUTPS3 TOUTPS2 TOUTPS1 TOUTPS0 TMR2ON T2CKPS1 T2CKPS0 -000 0000 -000 0000
Legend: x = unknown, u = unchanged, - = unimplemented read as 0. Shaded cells are not used for Timer2 module.
VDD
PFCG<2:0>
VREF (ADCON1 register)
RA0/AN0 000
RA1/AN1 001
ADC
RA2/AN2 010
RA3/VREF/AN3 011 GO/DONE 8
CHS ADRES
ADON
VSS
Legend:
R = Readable bit 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
Legend:
R = Readable bit 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
T ACQ = Amplifier Settling Time + Hold Capacitor Charging Time + Temperature Coefficient
= T AMP + T C + T COFF
= 2s + T C + [ ( Temperature - 25C ) ( 0.05s/C ) ]
1
V AP PLIE D 1 ------------ = V CHOLD ;[1] VCHOLD charged to within 1/2 lsb
2047
TC
----------
RC ;[2] VCHOLD charge response to VAPPLIED
V AP P LI ED 1 e = V CHOLD
Tc
---------
1
V AP P LIED 1 e = V A P PLIE D 1 ------------
RC
;combining [1] and [2]
2047
T C = C HOLD ( R IC + R SS + R S ) ln(1/2047)
= 10pF ( 1k + 7k + 10k ) ln(0.0004885)
= 1.37 s
Therefore:
T ACQ = 2 S + 1.37 S + [ ( 50C- 25C ) ( 0.05 S /C ) ]
= 4.67 S
Note 1: The reference voltage (VREF) has no effect on the equation, since it cancels itself out.
2: The charge holding capacitor (CHOLD) is not discharged after each conversion.
3: The maximum recommended impedance for analog sources is 10 k. This is required to meet the pin
leakage specification.
VDD
Sampling
Switch
VT = 0.6V
Rs ANx RIC 1k SS Rss
VA CPIN ILEAKAGE(1)
VT = 0.6V CHOLD = 10 pF
5 pF
VSS
6V
5V RSS
Legend: CPIN = Input Capacitance VDD 4V
VT = Threshold Voltage 3V
I LEAKAGE = Leakage current at the pin due to 2V
various junctions
RIC = Interconnect Resistance 5 6 7 8 9 10 11
SS = Sampling Switch Sampling Switch
CHOLD = Sample/Hold Capacitance (k)
Full-Scale Range
FFh
FEh
FDh
FCh
ADC Output Code
1 LSB ideal
FBh
Full-Scale
04h Transition
03h
02h
01h
00h Analog Input Voltage
1 LSB ideal
Table 8-1 shows the timer resources required by the Compare Timer1
ECCP module. PWM Timer2
Legend:
R = Readable bit 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
CCPR1L
CCPR1H(2) (Slave)
CCP1
Comparator R Q
(1) S
TMR2
TRIS
Comparator
Clear Timer2,
toggle CCP1 pin and
latch duty cycle
PR2
( CCPR1L:CCP1CON<5:4> )
Duty Cycle Ratio = -----------------------------------------------------------------------
4 ( PR2 + 1 )
ECCPAS<2:0>
PSSAC<0>
1
P1A_DRV
111 0
110
101 PSSAC<1>
P1A
100 TRISx
INT
011
From Comparator C2 010
PSSBD<0>
1
From Comparator C1 001 P1B_DRV
0
000 PRSEN
PSSBD<1>
R S P1B
TRISx
From Data Bus ECCPASE
D Q
Write to ECCPASE
PSSAC<0>
1
P1C_DRV
0
PSSAC<1>
P1C
TRISx
PSSBD<0>
1
P1D_DRV
0
PSSBD<1>
P1D
TRISx
Legend:
R = Readable bit 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
Shutdown Event
ECCPASE bit
PWM Activity
PWM Period
ECCPASE
Cleared by
Start of Shutdown Shutdown Firmware PWM
PWM Period Event Occurs Event Clears Resumes
Shutdown Event
ECCPASE bit
PWM Activity
PWM Period
FET
Driver +
P1A V
-
Load
FET
Driver
+
P1B V
-
V-
Legend:
R = Readable bit 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
CP(2)
bit 15 bit 8
Legend:
R = Readable bit W = Writable bit P = Programmable U = Unimplemented bit,
read as 0
-n = Value at POR 1 = Bit is set 0 = Bit is cleared x = Bit is unknown
Note 1: Enabling Brown-out Reset does not automatically enable Power-up Timer.
2: The entire program memory will be erased when the code protection is turned off.
R
9.3 Reset
R1
The PIC16F716 differentiates between various kinds of MCLR
Reset: C PIC16F716
Power-on Reset (POR)
MCLR Reset during normal operation
Note 1: External Power-on Reset circuit is required
MCLR Reset during Sleep only if VDD power-up slope is too slow. The
WDT Reset (during normal operation) diode D helps discharge the capacitor quickly
WDT Wake-up (during Sleep) when VDD powers down.
2: R < 40 k is recommended to make sure that
Brown-out Reset (BOR)
voltage drop across R does not violate the
Some registers are not affected in any Reset condition; devices electrical specification.
their status is unknown on POR and unchanged in any 3: R1 = 100 to 1 k will limit any current
other Reset. Most other registers are reset to a Reset flowing into MCLR from external capacitor C
state on Power-on Reset (POR), on the MCLR and in the event of MCLR/VPP pin breakdown due
WDT Reset, on MCLR Reset during Sleep and to Electrostatic Discharge (ESD) or Electrical
Brown-out Reset (BOR). They are not affected by a Overstress (EOS).
WDT Wake-up, which is viewed as the resumption of
normal operation. The TO and PD bits are set or
cleared differently in different Reset situations as indi-
cated in Table 9-4. These bits are used in software to
determine the nature of the Reset. See Table 9-6 for a
full description of Reset states of all registers.
MCLR
Sleep
WDT WDT
Module Time-out
Reset
VDD rise
detect
Power-on Reset
VDD
Brown-out
Reset S
BOREN
OST/PWRT
OST
Chip_Reset
10-bit Ripple counter R Q
OSC1
(1) PWRT
On-chip
RC OSC 10-bit Ripple counter
Enable OST
Note 1: This is a separate oscillator from the RC oscillator of the CLKIN pin.
VDD
VBOR
Internal
72 ms
Reset
VDD
VBOR
Internal <72 ms
Reset 72 ms
VDD
VBOR
Internal
72 ms
Reset
PIC16F716
Note 1: This circuit will activate Reset when VDD goes Note 1: This brown-out protection circuit employs
below (Vz + 0.7V) where Vz = Zener voltage. Microchip Technologys MCP809
2: Internal Brown-out Reset circuitry should be microcontroller supervisor. The MCP8XX and
disabled when using this circuit. MCP1XX families of supervisors provide
push-pull and open collector outputs with
both high and low active Reset pins. There
are 7 different trip point selections to
accommodate 5V and 3V systems.
FIGURE 9-8: EXTERNAL BROWN-OUT
PROTECTION CIRCUIT 2
VDD
VDD
R1
Q1
MCLR
R2 40k PIC16F716
VDD
MCLR
INTERNAL POR
TPWRT
OST TIME-OUT
INTERNAL RESET
FIGURE 9-11: TIME-OUT SEQUENCE ON POWER-UP (MCLR NOT TIED TO VDD): CASE 1
VDD
MCLR
INTERNAL POR
TPWRT
OST TIME-OUT
INTERNAL RESET
FIGURE 9-12: TIME-OUT SEQUENCE ON POWER-UP (MCLR NOT TIED TO VDD): CASE 2
VDD
MCLR
INTERNAL POR
TPWRT
OST TIME-OUT
INTERNAL RESET
PEIE
CCP1IF
CCP1IE GIE
TMR2IF
TMR2IE
TMR1IF
TMR1IE
0
M Postscaler
1 U
WDT Timer
X 8
0 1
MUX PSA
WDT
Time-out
Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4
OSC1
CLKOUT(4) TOST(2)
INT pin
INTF flag
(INTCON Reg.) Interrupt Latency
(Note 3)
GIE bit Processor in
(INTCON Reg.)
Sleep
INSTRUCTION FLOW
PC PC PC+1 PC+2 PC+2 PC + 2 0004h 0005h
Instruction Inst(PC + 1) Inst(PC + 2) Inst(0004h) Inst(0005h)
fetched Inst(PC) = Sleep
Instruction Sleep Inst(PC + 1) Dummy cycle Dummy cycle
executed Inst(PC - 1) Inst(0004h)
Before Instruction
W = 0x07
After Instruction
W = value of k8
C=0 W>f
C=1 Wf
DC = 0 W<3:0> > f<3:0>
DC = 1 W<3:0> f<3:0>
6.0
5.5
5.0
4.5
VDD
(Volts)
4.0
3.5
3.0
2.5
2.0
0 4 10 20 25
Frequency (MHz)
Note 1: The shaded region indicates the permissible combinations of voltage and frequency.
5.5
5.0
4.5
VDD
(Volts)
4.0
3.5
3.0
2.5
2.0
0 4 10 20 25
Frequency (MHz)
Note 1: The shaded region indicates the permissible combinations of voltage and frequency.
1. TppS2ppS
2. TppS
T
F Frequency T Time
Lowercase letters (pp) and their meanings:
pp
cc CCP1 osc OSC1
ck CLKOUT rd RD
cs CS rw RD or WR
di SDI sc SCK
do SDO ss SS
dt Data in t0 T0CKI
io I/O port t1 T1CKI
mc MCLR wr WR
Uppercase letters and their meanings:
S
F Fall P Period
H High R Rise
I Invalid (High-impedance) V Valid
L Low Z High-impedance
VDD/2
Rl Pin Cl
VSS
Cl
Pin Legend:
RL = 464
VSS
CL = 50 pF for all pins except OSC2/CLKOUT
15 pF for OSC2 output
OSC1
1 3 3
4 4
2
CLKOUT
OSC1
10 11
CLKOUT
13 12
14 19 18
16
I/O Pin
(input)
17 15
20, 21
Note 1: Refer to Figure 12-3 for load conditions.
VDD
MCLR
30
Internal
POR
33
PWRT
Time-out
32
OSC
Time-out
Internal
Reset
Watchdog
Timer
Reset
31
34 34
I/O Pins
BVDD
VDD
35
TABLE 12-4: RESET, WATCHDOG TIMER, OSCILLATOR START-UP TIMER, POWER-UP TIMER,
AND BROWN-OUT RESET REQUIREMENTS
Param
Sym Characteristic Min Typ Max Units Conditions
No.
T0CKI
40 41
42
T1OSO/T1CKI
45 46
47 48
TMR0 or
TMR1
CCP1
(Capture Mode)
50 51
52
CCP1
(Compare or PWM Mode)
53 54
A/D DATA 7 6 5 4 3 2 1 0
ADIF
GO DONE
SAMPLING STOPPED
SAMPLE
Note 1: If the A/D clock source is selected as RC, a time of TCY is added before the A/D clock starts. This allows the SLEEP instruction
to be executed.
Note: The graphs and tables provided following this note are a statistical summary based on a limited number of
samples and are provided for informational purposes only. The performance characteristics listed herein are
not tested or guaranteed. In some graphs or tables, the data presented may be outside the specified
operating range (e.g., outside specified power supply range) and therefore, outside the warranted range.
Typical represents the mean of the distribution at 25C. Maximum or minimum represents
(mean + 3) or (mean - 3) respectively, where is a standard deviation, over each temperature range.
FIGURE 13-1: TYPICAL IDD vs. FOSC OVER VDD (EC MODE)
3.5
2.0 4.0V
IDD (mA)
1.5
3.0V
1.0
2.0V
0.5
0.0
1 MHz 2 MHz 4 MHz 6 MHz 8 MHz 10 MHz 12 MHz 14 MHz 16 MHz 18 MHz 20 MHz
FOSC
4.0
Typical: Statistical Mean @25C
5.5V
3.5 Maximum: Mean (Worst-case Temp) + 3
(-40C to 125C)
5.0V
3.0
2.5
4.0V
IDD (mA)
2.0
3.0V
1.5
2.0V
1.0
0.5
0.0
1 MHz 2 MHz 4 MHz 6 MHz 8 MHz 10 MHz 12 MHz 14 MHz 16 MHz 18 MHz 20 MHz
FOSC
FIGURE 13-3: TYPICAL IDD vs. FOSC OVER VDD (HS MODE)
Typical IDD vs. FOSC Over Vdd
HS Mode
4.0
Typical: Statistical Mean @25C
3.5 Maximum: Mean (Worst-case Temp) + 3
(-40C to 125C)
5.5V
3.0
5.0V
2.5
4.5V
IDD (mA)
2.0
1.5
4.0V
1.0 3.5V
3.0V
0.5
0.0
4 MHz 10 MHz 16 MHz 20 MHz
FOSC
3.5 5.5V
5.0V
3.0
IDD (mA)
4.5V
2.5
2.0
1.5
4.0V
3.5V
1.0 3.0V
0.5
0.0
4 MHz 10 MHz 16 MHz 20 MHz
FOSC
FIGURE 13-5: TYPICAL IDD vs. VDD OVER FOSC (XT MODE)
XT Mode
900
Typical: Statistical Mean @25C
800 Maximum: Mean (Worst-case Temp) + 3
(-40C to 125C)
700
600
500
IDD (A)
4 MHz
400
300
1 MHz
200
100
0
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5
VDD (V)
1,400
1,000
800
IDD (A)
4 MHz
600
400
1 MHz
200
0
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5
VDD (V)
FIGURE 13-7: TYPICAL IDD vs. VDD OVER FOSC (EXTRC MODE)
EXTRC Mode
800
Typical: Statistical Mean @25C
700 Maximum: Mean (Worst-case Temp) + 3
(-40C to 125C)
600
500
4 MHz
IDD (A)
400
300
1 MHz
200
100
0
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5
VDD (V)
1,400
1,000
4 MHz
800
IDD (A)
600
400 1 MHz
200
0
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5
VDD (V)
70
50
32 kHz Maximum
40
IDD (A)
30
20 32 kHz Typical
10
0
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5
VDD (V)
0.30
0.25
IPD (A)
0.20
0.15
0.10
0.05
0.0
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5
VDD (V)
FIGURE 13-11: MAXIMUM IPD vs. VDD (SLEEP MODE, ALL PERIPHERALS DISABLED)
Maximum
(Sleep Mode all Peripherals Disabled)
18.0
Typical: Statistical Mean @25C
16.0 Maximum: Mean +
Maximum: Mean 3
(Worst-case Temp) + 3
(-40C to 125C)
14.0
Max. 125C
12.0
10.0
IPD (A)
8.0
6.0
4.0
Max. 85C
2.0
0.0
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5
VDD (V)
160
120
100
IPD (A)
80
Maximum
60
40
Typical
20
0
2.5 3.0 3.5 4.0 4.5 5.0 5.5
VDD (V)
3.0
Typical: Statistical
Typical: StatisticalMean
Mean @25C
@25C
2.5 Maximum: Mean (Worst-case Temp) + 3
(-40C to 125C)
2.0
IPD (A)
1.5
1.0
0.5
0.0
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5
VDD (V)
25.0
20.0
Max. 125C
15.0
Maximum: Mean (Worst-case Temp) + 3
IPD (A)
(-40C to 125C)
10.0
Max. 85C
5.0
0.0
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5
VDD (V)
30
Typical: Statistical Mean @25C
28 Maximum: Mean (Worst-case Temp) + 3
(-40C to 125C)
Max. (125C)
26
Max. (85C)
24
22
Time (ms)
20
Typical
18
16
14
Minimum
12
10
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5
VDD (V)
30
Typical: Statistical Mean @25C
28 Maximum: Mean (Worst-case Temp) + 3
(-40C to 125C)
26
Maximum
24
22
Time (ms)
20
Typical
18
16
Minimum
14
12
10
-40C 25C 85C 125C
Temperature (C)
0.8
0.4
0.2
Min. -40C
0.1
0.0
5.0 5.5 6.0 6.5 7.0 7.5 8.0 8.5 9.0 9.5 10.0
IOL (mA)
0.45
0.25
VOL (V)
Typ. 25C
0.20
0.10
0.05
0.00
5.0 5.5 6.0 6.5 7.0 7.5 8.0 8.5 9.0 9.5 10.0
IOL (mA)
3.5
3.0
Max. -40C
Typ. 25C
2.5
Min. 125C
2.0
VOH (V)
1.5
0.5
0.0
0.0 -0.5 -1.0 -1.5 -2.0 -2.5 -3.0 -3.5 -4.0
IOH (mA)
5.5
5.0
Max. -40C
Typ. 25C
4.5
VOH (V)
Min. 125C
4.0
3.0
0.0 -0.5 -1.0 -1.5 -2.0 -2.5 -3.0 -3.5 -4.0 -4.5 -5.0
IOH (mA)
1.7
Max. -40C
1.3
Typ. 25C
VIN (V)
1.1
Min. 125C
0.9
0.7
0.5
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5
VDD (V)
FIGURE 13-22: SCHMITT TRIGGER INPUT THRESHOLD VIN vs. VDD OVER TEMPERATURE
(ST Input, -40C TO 125C)
4.0
VIH Max. 125C
Typical: Statistical Mean @25C
3.5 Maximum: Mean (Worst-case Temp) + 3
(-40C to 125C)
VIH Min. -40C
3.0
2.5
VIN (V)
2.0
VIL Max. -40C
1.0
0.5
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5
VDD (V)
45.0
Typical: Statistical Mean @25C
40.0 Maximum: Mean
Maximum: Mean (Worst-case
(-40C
+ Temp) + 3
3 to 125C)
(-40C to 125C)
35.0
Max. 125C
30.0
25.0
IPD (mA)
20.0
15.0
Max. 85C
10.0
5.0
Typ. 25C
0.0
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5
VDD (V)
6
85C
Time (s)
25C
4
-40C
0
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5
VDD (V)
XXXXXXXXXXXXXXXXX PIC16F716-04/P e3
XXXXXXXXXXXXXXXXX
YYWWNNN 0610017
XXXXXXXXXXXX PIC16F716-20
XXXXXXXXXXXX /SO e3
XXXXXXXXXXXX 0610017
YYWWNNN
XXXXXXXXXXX PIC16F716
XXXXXXXXXXX -20I/SS025
YYWWNNN 0610017
Note: In the event the full Microchip part number cannot be marked on one line, it will
be carried over to the next line, thus limiting the number of available
characters for customer-specific information.
* Standard PIC device marking consists of Microchip part number, year code, week code, and traceability
code. For PIC 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.
NOTE 1
E1
1 2 3
D
A A2
L c
A1
b1
b e eB
Units INCHES
Dimension Limits MIN NOM MAX
Number of Pins N 18
Pitch e .100 BSC
Top to Seating Plane A .210
Molded Package Thickness A2 .115 .130 .195
Base to Seating Plane A1 .015
Shoulder to Shoulder Width E .300 .310 .325
Molded Package Width E1 .240 .250 .280
Overall Length D .880 .900 .920
Tip to Seating Plane L .115 .130 .150
Lead Thickness c .008 .010 .014
Upper Lead Width b1 .045 .060 .070
Lower Lead Width b .014 .018 .022
Overall Row Spacing eB .430
Notes:
1. Pin 1 visual index feature may vary, but must be located within the hatched area.
2. Significant Characteristic.
3. Dimensions D and E1 do not include mold flash or protrusions. Mold flash or protrusions shall not exceed .010" per side.
4. Dimensioning and tolerancing per ASME Y14.5M.
BSC: Basic Dimension. Theoretically exact value shown without tolerances.
E
E1
NOTE 1
1 2 3
e
b
h
h
c
A A2
A1 L
L1
Units MILLIMETERS
Dimension Limits MIN NOM MAX
Number of Pins N 18
Pitch e 1.27 BSC
Overall Height A 2.65
Molded Package Thickness A2 2.05
Standoff A1 0.10 0.30
Overall Width E 10.30 BSC
Molded Package Width E1 7.50 BSC
Overall Length D 11.55 BSC
Chamfer (optional) h 0.25 0.75
Foot Length L 0.40 1.27
Footprint L1 1.40 REF
Foot Angle 0 8
Lead Thickness c 0.20 0.33
Lead Width b 0.31 0.51
Mold Draft Angle Top 5 15
Mold Draft Angle Bottom 5 15
Notes:
1. Pin 1 visual index feature may vary, but must be located within the hatched area.
2. Significant Characteristic.
3. Dimensions D and E1 do not include mold flash or protrusions. Mold flash or protrusions shall not exceed 0.15 mm per side.
4. Dimensioning and tolerancing per ASME Y14.5M.
BSC: Basic Dimension. Theoretically exact value shown without tolerances.
REF: Reference Dimension, usually without tolerance, for information purposes only.
Microchip Technology Drawing C04-051B
D
N
E1
NOTE 1
1 2
e
b
c
A A2
A1
L1 L
Units MILLIMETERS
Dimension Limits MIN NOM MAX
Number of Pins N 20
Pitch e 0.65 BSC
Overall Height A 2.00
Molded Package Thickness A2 1.65 1.75 1.85
Standoff A1 0.05
Overall Width E 7.40 7.80 8.20
Molded Package Width E1 5.00 5.30 5.60
Overall Length D 6.90 7.20 7.50
Foot Length L 0.55 0.75 0.95
Footprint L1 1.25 REF
Lead Thickness c 0.09 0.25
Foot Angle 0 4 8
Lead Width b 0.22 0.38
Notes:
1. Pin 1 visual index feature may vary, but must be located within the hatched area.
2. Dimensions D and E1 do not include mold flash or protrusions. Mold flash or protrusions shall not exceed 0.20 mm per side.
3. Dimensioning and tolerancing per ASME Y14.5M.
BSC: Basic Dimension. Theoretically exact value shown without tolerances.
REF: Reference Dimension, usually without tolerance, for information purposes only.
Microchip Technology Drawing C04-072B
From: Name
Company
Address
City / State / ZIP / Country
Telephone: (_______) _________ - _________ FAX: (______) _________ - _________
Application (optional):
Would you like a reply? Y N
Questions:
2. How does this document meet your hardware and software development needs?
3. Do you find the organization of this document easy to follow? If not, why?
4. What additions to the document do you think would enhance the structure and subject?
5. What deletions from the document could be made without affecting the overall usefulness?
I M
I/O Ports .............................................................................. 19 Master Clear (MCLR)
ID Locations .................................................................. 61, 76 MCLR Reset, Normal Operation..................... 64, 69, 70
In-Circuit Serial Programming (ICSP) ........................... 61, 76 MCLR Reset, Sleep ........................................ 64, 69, 70
Indirect Addressing ............................................................. 18 Memory Organization
FSR Register ...................................................... 8, 9, 18 Data Memory ................................................................ 7
INDF Register ............................................................... 9 Program Memory .......................................................... 7
Instruction Format ............................................................... 77 Microchip Internet Web Site.............................................. 127
Instruction Set ..................................................................... 77 Migration from Base-Line to Mid-Range Devices ............. 126
ADDLW ....................................................................... 79 MPLAB ASM30 Assembler, Linker, Librarian ..................... 88
ADDWF ....................................................................... 79 MPLAB ICD 2 In-Circuit Debugger ..................................... 89
ANDLW ....................................................................... 79 MPLAB ICE 2000 High-Performance Universal
ANDWF ....................................................................... 79 In-Circuit Emulator ...................................................... 89
BCF ............................................................................. 79 MPLAB Integrated Development Environment Software.... 87
BSF ............................................................................. 79 MPLAB PM3 Device Programmer ...................................... 89
BTFSC ........................................................................ 79 MPLAB REAL ICE In-Circuit Emulator System .................. 89
BTFSS ........................................................................ 80 MPLINK Object Linker/MPLIB Object Librarian .................. 88
CALL ........................................................................... 80 O
CLRF........................................................................... 80
OPCODE Field Descriptions............................................... 77
CLRW ......................................................................... 80
OPTION Register................................................................ 12
CLRWDT..................................................................... 80
OPTION_REG Register................................................ 10, 12
COMF ......................................................................... 80
Oscillator
DECF .......................................................................... 80
Associated registers ................................................... 33
DECFSZ...................................................................... 81
Oscillator Configuration ................................................ 61, 63
GOTO ......................................................................... 81
HS......................................................................... 63, 68
INCF............................................................................ 81
LP ......................................................................... 63, 68
INCFSZ ....................................................................... 81
RC .................................................................. 63, 64, 68
IORLW ........................................................................ 81
XT ......................................................................... 63, 68
IORWF ........................................................................ 81
Oscillator, WDT................................................................... 74
MOVF.......................................................................... 82
MOVLW ...................................................................... 82 P
MOVWF ...................................................................... 82
Packaging ......................................................................... 121
NOP ............................................................................ 82
PDIP Details ............................................................. 122
RETFIE ....................................................................... 83
Paging, Program Memory............................................... 7, 17
RETLW ....................................................................... 83
PCON Register ............................................................. 16, 68
RETURN ..................................................................... 83
PICSTART Plus Development Programmer....................... 90
RLF ............................................................................. 84
PIE1 Register................................................................ 10, 14
RRF............................................................................. 84
PIR1 Register ................................................................. 9, 15
SLEEP ........................................................................ 84
CCP1IF Bit.................................................................. 15
SUBLW ....................................................................... 84
Pointer, FSR ....................................................................... 18
SUBWF ....................................................................... 85
POR. See Power-on Reset
SWAPF ....................................................................... 85
PORTA
XORLW ....................................................................... 85
Associated Registers .................................................. 20
V
VREF. SEE ADC Reference Voltage
W
W Register .......................................................................... 73
Wake-up from Sleep ..................................................... 61, 75
Interrupts ............................................................... 69, 70
MCLR Reset ............................................................... 70
Timing Diagram........................................................... 76
WDT Reset ................................................................. 70
Watchdog Timer (WDT) ................................................ 61, 74
Enable (WDTE Bit)...................................................... 74
Postscaler. See Postscaler, WDT
Programming Considerations ..................................... 74
RC Oscillator ............................................................... 74
Time-out Period .......................................................... 74
Timing Diagram......................................................... 101
WDT Reset, Normal Operation ....................... 64, 69, 70
WDT Reset, Sleep .......................................... 64, 69, 70
WWW Address.................................................................. 127
WWW, On-Line Support........................................................ 4
Package: SO = SOIC
P = PDIP
SS = SSOP
Pattern: QTP, SQTP, Code or Special Requirements Note 1: F = Standard Voltage Range
(blank otherwise) LF = Wide Voltage Range
2: T = in tape and reel SOIC and SSOP
packages only.
12/08/06