PIC16(L)F1704/8
14/20-Pin 8-Bit Advanced Analog Flash Microcontrollers
High-Performance RISC CPU
• C Compiler Optimized Architecture
• Only 49 Instructions
• Up to 14 Kbytes Linear Program Memory
Addressing
• Operating Speed:
- DC – 32 MHz
- DC – 125 ns instruction cycle
• Interrupt Capability with Automatic Context
Saving
• 16-Level Deep Hardware Stack with Optional
Overflow/Underflow Reset
• Direct, Indirect and Relative Addressing modes:
- Two full 16-bit File Select Registers (FSRs)
- FSRs can read program and data memory
• High-Endurance Flash Data Memory (HEF)
- 128 bytes of nonvolatile data storage
- 100k erase/write cycles
Special Microcontroller Features
• Operating Voltage Range:
- 1.8V-3.6V (PIC16LF1704/8)
- 2.3V-5.5V (PIC16F1704/8)
• Temperature Range:
- Industrial: -40°C to 85°C
- Extended: -40°C to 125°C
• Power-on Reset (POR)
• Low Power Brown-Out Reset (LPBOR)
• Extended Watch-Dog Timer (WDT):
- Programmable period from 1 ms to 256s
• Programmable Code Protection
• In-Circuit Serial Programming™ (ICSP™) via
Two Pins
• In-Circuit Debug (ICD) via Two Pins
• Enhanced Low-Voltage Programming (LVP)
• Power-Saving Sleep mode
Digital Peripheral Features
• Up to 17 I/O Pins and one Input-only Pin:
- High current sink/source for LED drivers
- Individually programmable weak pull-ups
- Interrupt-on-change pin option with edge
selectable option
• Timer0: 8-Bit Timer/Counter with 8-Bit
Programmable Prescaler
• Enhanced Timer1:
- 16-bit timer/counter with prescaler
- External Gate Input mode
- Dedicated low-power 32 kHz oscillator driver
• Timer2:
- Up to three (TMR2/4/6)
- 8-Bit Timer/Counter
- 8-Bit Period Register
- Prescaler and Postscaler
• Capture, Compare, PWM (CCP) Module
• Master Synchronous Serial Port (SSP) with SPI
and I
2
C with:
- 7-bit address masking
- SMBus/PMBus
TM
compatibility
• Enhanced Universal Synchronous Asynchronous
Receiver Transmitter (EUSART):
- RS-232, RS-485 and LIN compatible
- Auto-Baud Detect
- Auto-wake-up on Start
Flexible Oscillator Structure
• 16 MHz Internal Oscillator Block:
- Accurate to ±1%, typical
- Software selectable frequency range from
16 MHz to 250 kHz
- PLL multiplier to 32 MHz
• 31 kHz Low-Power Internal Oscillator
• External Oscillator Block with:
- Three crystal/resonator modes up to 20 MHz
- Three external clock modes up to 20 MHz
• Fail-Safe Clock Monitor:
- Allows for safe shutdown if peripheral clock
stops
• Two-Speed Oscillator Start-up
• Oscillator Start-up Timer (OST)
eXtreme Low-Power (XLP) Features
•
•
•
•
Sleep mode: 50 nA @ 1.8V, typical
Watchdog Timer: 500 nA @ 1.8V, typical
Secondary Oscillator: 500 nA @ 32 kHz
Operating Current:
- 8 µA @ 32 kHz, 1.8V, typical
- 32 µA/MHz @ 1.8V, typical
2013-2015 Microchip Technology Inc.
DS40001715D-page 1
PIC16(L)F1704/8
Digital Peripheral Features (Continued)
• Complementary Output Generator (COG):
- Push-Pull, Full Bridge, and Steering modes
- Dedicated Rise/Fall Input Triggers
- Dedicated Deadtime Delay Counters
- Dedicated Phase Delay Counters
- Dedicated Blanking Delay Counters
- Concurrent Auto-Shutdown Selection
• Two Pulse Width Modulation (PWM) modules:
- 10-bit Duty-Cycle Control
• Three Configurable Logic Cell (CLC) modules:
- Generate a selected function of up to four
inputs
- Combinational and State Logic
- External or Internal input/output pins
- Operation in Sleep
• Peripheral Pin Select (PPS):
- Digital outputs mapped to any GPIO pin
- Digital inputs from any GPIO pin
- CLC input multiplexing
Analog Peripheral Features
• Operational Amplifiers:
- Up to two configurable op amps
- Selectable internal and external channels
- High/Low selectable Gain Bandwidth Product
• Two High-Speed Comparators:
- 60 ns response time
- Low-power/High-power mode
- Comparator outputs externally accessible
- Software hysteresis enable
• Analog-to-Digital Converter (ADC) module
- 10-bit resolution, 12 channels
- Auto conversion start capability
- Conversion available during Sleep
• 8-Bit Digital-to-Analog Converter (DAC):
- Output available externally
- Positive and negative reference selection
- Internal connections to comparators,
op amps, Fixed Voltage Reference (FVR)
and ADC
• Zero-Cross Detection Circuit:
- Constant Voltage Output
- Current Source/Sink
- Interrupt on Edge Detect
• Voltage Reference module:
- Fixed Voltage Reference (FVR) with 1.024V,
2.048V and 4.096V output levels
PIC16(L)F170x Family Types
Program Memory
Flash (words)
Data Sheet Index
High-Endurance
Flash (bytes)
10-bit ADC (ch)
MSSP (I
2
C/SPI)
High-Speed/
Comparators
Data SRAM
(bytes)
Zero Cross
8-bit DAC
Debug
(1)
I/E
I/E
I/E
I/E
I/E
I/E
EUSART
Timers
(8/16-bit)
Op Amp
I/O’s
(2)
PWM
COG
CCP
CLC
PPS
Device
PIC16(L)F1703
PIC16(L)F1704
PIC16(L)F1705
PIC16(L)F1707
PIC16(L)F1708
PIC16(L)F1709
Note 1:
2:
(3)
(1)
(2)
(3)
(1)
(2)
2048
4096
8192
2048
4096
8192
256
512
1024
256
512
1024
128
128
128
128
128
128
12
12
12
18
18
18
8
8
8
12
12
12
0
1
1
0
1
1
0
2
2
0
2
2
2
2
2
2
2
2
1
1
1
1
1
1
2/1
4/1
4/1
2/1
4/1
4/1
2
2
2
2
2
2
0
2
2
0
2
2
0
1
1
0
1
1
0
1
1
0
1
1
1
1
1
1
1
1
0
3
3
0
3
3
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Debugging Methods: (I) – Integrated on Chip; (H) – using Debug Header; E – using Emulation Header.
One pin is input-only.
Data Sheet Index:
(Unshaded devices are described in this document.)
1:
DS40001715
PIC16(L)F1704/8 Data Sheet, 14/20-Pin Flash, 8-bit Microcontrollers.
2:
DS40001729
PIC16(L)F1705/9 Data Sheet, 14/20-Pin Flash, 8-bit Microcontrollers.
3:
DS40001722
PIC16(L)F1703/7 Data Sheet, 14/20-Pin Flash, 8-bit Microcontrollers
Note:
For other small form-factor package availability and marking information, please visit
http://www.microchip.com/packaging
or contact your local sales office.
DS40001715D-page 2
2013-2015 Microchip Technology Inc.
XLP
PIC16(L)F1704/8
PIN DIAGRAMS
FIGURE 1:
14-PIN PDIP, SOIC, TSSOP DIAGRAM FOR PIC16(L)F1704
V
DD
RA5
RA4
V
PP
/MCLR/RA3
RC5
RC4
RC3
1
2
3
4
5
6
7
14
13
12
11
10
9
8
V
SS
RA0/ICSPDAT
RA1/ICSPCLK
RA2
RC0
RC1
RC2
Note:
See
Table 1
for the pin allocation table.
FIGURE 2:
16-PIN QFN
V
DD
NC
RA5
RA4
RA3/MCLR/V
PP
RC5
Note:
See
Table 1
for the pin allocation table.
1
12 RA0/ICSPDAT
2
11 RA1/ICSPCLK
3
PIC16(L)F1704
10 RA2
4
9 RC0
5
6
7
8
2013-2015 Microchip Technology Inc.
RC4
RC3
RC2
RC1
16
15
14
13
NC
V
SS
PIC16(L)F1704
DS40001715D-page 3
PIC16(L)F1704/8
FIGURE 3:
20-PIN PDIP, SOIC,SSOP
V
DD
1
RA5 2
RA4 3
V
PP
/MCLR/RA3 4
RC5 5
RC4 6
RC3 7
RC6 8
RC7 9
RB7 10
Note:
See
Table 2
for the pin allocation table.
20
19
18
17
16
15
14
13
12
11
V
SS
ICSPDAT/RA0
ICSPCLK/RA1
RA2
RC0
RC1
RC2
RB4
RB5
RB6
FIGURE 4:
20-PIN QFN
V
PP
/MCLR/RA3
RC5
RC4
RC3
RC6
1
15 RA1/ICSPCLK
2
14 RA2
3
PIC16(L)F1708
13 RC0
4
12 RC1
5
11 RC2
RC7
RB7
RB6
RB5
RB4
6
7
8
9
10
Note:
See
Table 2
for the pin allocation table.
20
19
18
17
16
RA4
RA5
V
DD
V
SS
RA0/ICSPDAT
PIC16(L)F1708
DS40001715D-page 4
2013-2015 Microchip Technology Inc.
Pin Allocation Tables
TABLE 1:
PDIP/SOIC/SSOP
2013-2015 Microchip Technology Inc.
DS40001715D-page 5
14/16-PIN ALLOCATION TABLE (PIC16(L)F1704)
Comparator
Zero Cross
Reference
Interrupt
EUSART
Op Amp
Pull-up
Timers
MSSP
Basic
ICSPDAT
ICSPCLK
—
MCLR
V
PP
CLKOUT
OSC2
CLKIN
OSC1
—
—
—
—
—
—
V
DD
V
SS
—
—
—
—
PWM
I/O
(2)
COG
ADC
DAC
QFN
CCP
RA0
RA1
RA2
RA3
RA4
RA5
RC0
RC1
RC2
RC3
RC4
RC5
V
DD
V
SS
13
12
11
4
3
2
10
9
8
7
6
5
1
14
—
—
—
—
12
11
10
3
2
1
9
8
7
6
5
4
16
13
—
—
—
—
AN0
AN1
AN2
—
AN3
—
AN4
AN5
AN6
AN7
—
—
—
—
—
—
—
—
V
REF
-
V
REF
+
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
C1IN+
C1IN0-
C2IN0-
—
—
—
—
C2IN+
C1IN1-
C2IN1-
C1IN2-
C2IN2-
C1IN3-
C2IN3-
—
—
—
—
C1OUT
C2OUT
—
—
—
—
—
—
—
—
OPA1IN+
OPA1IN-
OPA1OUT
OPA2OUT
OPA2IN-
OPA2IN+
—
—
—
—
—
—
DAC1OUT1
—
DAC1OUT2
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
ZCD
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
T0CKI
(1)
—
T1G
(1)
SOSCO
T1CKI
(1)
SOSCI
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
CCP2
(1)
—
CCP1
(1)
—
—
CPP1
CPP2
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
PWM3OUT
PWM4OUT
—
—
—
—
COGIN
(1)
—
—
—
—
—
—
—
—
—
—
—
COGA
COGB
COGC
COGD
—
—
—
—
—
—
SCK
(1)
SCL
(3)
SDI
(1)
SDA
(3)
—
SS
(1)
—
—
—
—
SDA
(3)
—
—
—
—
—
—
—
—
—
—
CK
(1)
RX
(1,3)
—
—
CK
DT
(3)
TX
—
—
—
—
—
—
CLCIN3
(1)
—
CLCIN2
(1)
—
CLCIN0
(1)
CLCIN1
(1)
—
—
—
CLC1OUT
CLC2OUT
CLC3OUT
—
CLC
IOC
IOC
INT
(1)
IOC
IOC
IOC
IOC
IOC
IOC
IOC
IOC
IOC
IOC
—
—
—
—
—
—
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
—
—
—
—
—
—
PIC16(L)F1704/8
OUT
(2)
SCL
(3)
SDO
SCK
Note
1:
2:
3:
Default peripheral input. Input can be moved to any other pin with the PPS input selection registers. See
Register 12-1.
All pin outputs default to PORT latch data. Any pin can be selected as a digital peripheral output with the PPS output selection registers. See
Register 12-3.
These peripheral functions are bidirectional. The output pin selections must be the same as the input pin selections.