PIC16(L)F1773/6
28-Pin, 8-Bit Flash Microcontroller
Description
PIC16(L)F1773/6 microcontrollers feature a high level of integration of intelligent analog and digital peripherals for a
wide range of applications, such as lighting, power supplies, battery charging, motor control and other general purpose
applications. These devices deliver multiple op amps, 5-/10-bit DACs, high-speed comparators, 10-bit ADC, 10-/16-bit
PWMs, programmable ramp generator (PRG) and other peripherals that can be connected internally to create closedloop systems without using pins or the printed circuit board (PCB) area. The 10-/16-bit PWMs, digital signal modulators
and tri-state output op amp can be used together to create a LED dimming engine for lighting applications. The
peripheral pin select (PPS) functionality provides flexibility, eases PCB layout and peripheral utilization by allowing
digital peripheral pin mapping to an I/O.
Core Features
eXtreme Low-Power (XLP) Features
• C Compiler Optimized RISC Architecture
• Only 49 Instructions
• Operating Speed:
- DC – 32 MHz clock input
- 125 ns minimum instruction cycle
• Interrupt Capability
• 16-Level Deep Hardware Stack
• Five 8-Bit Timers
• Three 16-Bit Timers
• Low-Current Power-on Reset (POR)
• Configurable Power-up Timer (PWRT)
• Brown-out Reset (BOR) with Selectable Trip Point
• Extended Watchdog Timer (EWDT):
- Low-power 31 kHz WDT
- Software selectable prescaler
- Software selectable enable
•
•
•
•
Memory
•
•
•
•
Up to 28 Kbytes Program Flash Memory (PFM)
Up to 2 Kbytes Data RAM
Direct, Indirect and Relative Addressing modes
High-Endurance Flash (HEF):
- 128B of nonvolatile data storage
- 100K Erase/Write cycles
Operating Characteristics
• Operating Voltage Range:
- 1.8V to 3.6V (PIC16LF1773/6)
- 2.3V to 5.5V (PIC16F1773/6)
• Temperature Range:
- Industrial: -40°C to 85°C
- Extended: -40°C to 125°C
2015-2016 Microchip Technology Inc.
Sleep mode: 50 nA @ 1.8V, typical
Watchdog Timer: 500 nA @ 1.8V, typical
Secondary Oscillator: 500 nA @ 32 kHz
Operating Current:
- 8 uA @ 31 kHz, 1.8V, typical
- 32 uA/MHz @ 1.8V, typical
Intelligent Analog Peripherals
• 10-Bit Analog-to-Digital Converter (ADC):
- Up to 28 external channels
- Conversion available during Sleep
• Three Operational Amplifiers (OPA):
- Selectable internal and external channels
- Tri-state output
- Part of LED dimming engine
- Selectable internal and external channels
• Six High-Speed Comparators (HS Comp):
- Up to nine external inverting inputs
- Up to 12 external non-inverting inputs
- Fixed Voltage Reference at inverting and
non-inverting input(s)
- Comparator outputs externally accessible
• Digital-to-Analog Converters (DAC):
- Three 10-bit resolution DACs
- 10-bit resolution, rail-to-rail
- Conversion during Sleep
- Internal connections to ADCs and HS
Comparators
• Voltage Reference:
- Fixed Voltage Reference (FVR)
- 1.024V, 2.048V and 4.096V output levels
• Zero-Cross Detector (ZCD):
- Detect high-voltage AC signal
• Three Programmable Ramp Generators (PRG):
- Slope compensation
- Ramp generation
• High-Current Drive I/Os:
- Up to 100 mA sink or source @ 5V
DS40001810B-page 1
PIC16(L)F1773/6
• Peripheral Pin Select (PPS):
- I/O remapping of digital peripherals
• Serial Communications:
- Enhanced USART (EUSART)
- SPI, I2C, RS-232, RS-485, LIN compatible
- Auto-Baud Detect, auto-wake-up on start
• Up to 25 I/O Pins:
- Individually programmable pull-ups
- Slew rate control
- Interrupt-on-change with edge-select
Digital Peripherals
• Four Configurable Logic Cells (CLC):
- Integrated combinational and state logic
• Three Complementary Output Generators (COG):
- Push-pull, Full-Bridge and Steering modes
• Three Capture/Compare/PWM (CCP) Modules
• Pulse-Width Modulator (PWM):
- Three 16-bit PWMs
- Independent timers
- Multiple output modes (Edge-, CenterAligned, set and toggle on register match)
- User settings for phase, duty cycle, period,
offset and polarity
- 16-bit timer capability
- Three 10-bit PWMs
• Digital Signal Modulator (DSM):
- Modulates a carrier signal with a digital data
to create custom carrier synchronized output
waveforms
- Part of LED dimming engine
• Precision Internal Oscillator:
- ±1% at calibration
- Selectable frequency range 32 MHz to
31 kHz
• 31 kHz Low-Power Internal Oscillator
• 4x Phase-Locked Loop (PLL) for up to 32 MHz
Internal Operation
• External Oscillator Block with Three External
Clock modes up to 32 MHz
Device
Program Flash Memory
(bytes)
Program Flash Memory
(word)
High Endurance Flash (B)
Data SRAM (Bytes)
I/O Pins(1)
8-Bit/16-Bit Timers
High-Speed Comparator
10-bit ADC (ch)
5/10-bit DAC
CCP
10-bit/16-bit PWM
COG
CLC
Op Amp
Zero Cross Detect
Programmable Ramp Gen
High-Current I/Os
Peripheral Pin Select
EUSART
I2C/SPI
Debug(2)
PIC16(L)F1773/6/7/8/9 FAMILY TYPES
Data Sheet Index
TABLE 1:
Clocking Structure
PIC16(L)F1773
(A)
7K
4K
128
512
25
5/3
6
17
3/3
3
3/3
3
4
3
1
3
2
Y
1
1
I/H
PIC16(L)F1776
(A)
14K
8K
128
1K
25
5/3
6
17
3/3
3
3/3
3
4
3
1
3
2
Y
1
1
I/H
PIC16(L)F1777
(B)
14K
8K
128
1K
36
5/3
8
28
4/4
4
4/4
4
4
4
1
4
2
Y
1
1
I/H
PIC16(L)F1778
(B)
28K
16K
128
2K
25
5/3
6
17
3/3
3
3/3
3
4
3
1
3
2
Y
1
1
I/H
PIC16(L)F1779
(B)
28K
16K
128
2K
36
5/3
8
28
4/4
4
4/4
4
4
4
1
4
2
Y
1
1
I/H
Note 1:
2:
One pin is input-only.
I – Debugging integrated on chip; H – Debugging via ICD header.
Data Sheet Index:
A:
B:
Note:
DS40001810
Future Release
PIC16(L)F1773/6 Data Sheet, 28-Pin, 8-bit Flash Microcontrollers
PIC16(L)F1777/8/9 Data Sheet, 28/40/44-Pin, 8-bit Flash Microcontrollers
For other small form-factor package availability and marking information, please visit
http://www.microchip.com/packaging or contact your local sales office.
DS40001810B-page 2
2015-2016 Microchip Technology Inc.
PIC16(L)F1773/6
TABLE 2:
PACKAGES
Packages
SPDIP
PIC16(L)F1773
PIC16(L)F1776
Note:
PDIP
SOIC
SSOP
UQFN
TQFP
Pin details are subject to change.
2015-2016 Microchip Technology Inc.
DS40001810B-page 3
PIC16(L)F1773/6
PIN DIAGRAMS
28-PIN SPDIP, SOIC, SSOP
1
28
RB7/ICSPDAT
RA0
2
27
RB6/ICSPCLK
RA1
3
26
RB5
RA2
4
25
RB4
RA3
5
6
24
23
RB3
RA4
22
21
RB1
RB0
20
VDD
19
VSS
18
RC7
RC6
VPP/MCLR/RE3
RA5
VSS
7
RA7
9
RA6
10
RC0
11
RC1
12
RC2
13
16
RC5
14
15
RC4
See Table 3 for location of all peripheral functions.
28-PIN UQFN (6x6x0.5 mm)
RA1
RA0
RE3/MCLR/VPP
RB7/ICSPDAT
RB6/ICSPCLK
RB5
RB4
FIGURE 2:
RB2
17
RC3
Note:
8
PIC16(L)F1773/6
FIGURE 1:
28 27 26 25 24 23 22
Note:
21
20
19
18
17
16
15
RB3
RB2
RB1
RB0
VDD
VSS
RC7
RC1
RC2
RC3
RC4
RC5
RC6
1
2
3
PIC16(L)F1773/6
4
5
6
7
8 9 10 11 12 13 14
RC0
RA2
RA3
RA4
RA5
VSS
RA7
RA6
See Table 3 for location of all peripheral functions.
DS40001810B-page 4
2015-2016 Microchip Technology Inc.
PIC16(L)F1773/6
PIN ALLOCATION TABLES
ZCD
ADC
Voltage Reference
Op Amp
DAC
Timer
Interrupt
Basic
2
27
—
—
AN0
—
C1IN0C2IN0C3IN0C4IN0C5IN0C6IN0-
—
—
—
IOCA0
—
RA1
3
28
PRG1IN0
PRG2IN1
—
AN1
—
C1IN1C2IN1C3IN1C4IN1-
OPA1OUT
OPA2IN1+
OPA2IN1-
—
—
IOCA1
—
RA2
4
1
—
—
AN2
VREF-
DAC1REF0DAC2REF0DAC3REF0DAC4REF0DAC5REF0DAC7REF0-
C1IN0+
C2IN0+
C3IN0+
C4IN0+
C5IN0+
C6IN0+
—
DAC1OUT1
—
IOCA2
—
RA3
5
2
—
—
AN3
VREF+
DAC1REF0+
DAC2REF0+
DAC3REF0+
DAC4REF0+
DAC5REF0+
DAC7REF0+
C1IN1+
—
—
—
IOCA3
—
Comparator
PRG
RA0
I/O
28-Pin UQFN
28-PIN ALLOCATION TABLE (PIC16(L)F1773/6)
28-Pin SPDIP/SOIC/SSOP
TABLE 3:
RA4
6
3
—
—
—
—
—
OPA1IN0+
DAC4OUT1
T0CKI
IOCA4
—
RA5
7
4
—
—
AN4
—
—
OPA1IN0-
DAC2OUT1
—
IOCA5
—
RA6
10
7
—
—
—
—
CLKOUT
C6IN1+
—
—
—
IOCA6
OSC2
RA7
9
6
—
—
—
—
CLKIN
—
—
—
IOCA7
OSC1
RB0
21
18
—
ZCD
AN12
HIB0
C2IN1+
—
—
—
IOCB0
—
RB1
22
19
PRG1IN1
PRG2IN0
—
AN10
HIB1
C1IN3C2IN3C3IN3C4IN3-
OPA2OUT
OPA1IN1+
OPA1IN1-
—
—
IOCB1
—
RB2
23
20
—
—
AN8
—
—
OPA2IN0-
DAC3OUT1
—
IOCB2
—
RB3
24
21
—
—
AN9
—
C1IN2C2IN2C3IN2-
OPA2IN0+
—
—
IOCB3
—
RB4
25
22
—
—
AN11
—
C3IN1+
—
—
T5G
IOCB4
—
RB5
26
23
—
—
AN13
DAC5REF1DAC7REF1-
C4IN2-
—
—
T1G
IOCB5
—
RB6
27
24
—
—
—
DAC5REF1+
DAC7REF1+
C4IN1+
—
—
—
IOCB6
ICSPCLK
ICDCLK
RB7
28
25
—
—
—
—
C5IN1+
—
DAC1OUT2
DAC2OUT2
DAC5OUT2
DAC3OUT2
DAC4OUT2
DAC7OUT2
T6IN
IOCB7
ICSPDAT
ICDDAT
RC0
11
8
—
—
—
—
—
—
DAC5OUT1
T1CKI
T3CKI
T3G
IOCC0
—
RC1
12
9
—
—
—
—
—
—
DAC7OUT1
—
IOCC1
—
2015-2016 Microchip Technology Inc.
DS40001810B-page 5
PIC16(L)F1773/6
28-Pin UQFN
PRG
ZCD
ADC
Voltage Reference
Op Amp
DAC
Timer
Interrupt
Basic
RC2
13
10
—
—
AN14
—
C5IN2C6IN2-
—
—
T5CKI
IOCC2
—
RC3
14
11
—
—
AN15
—
C1IN4C2IN4C3IN4C4IN4C5IN4C6IN4-
—
—
T2IN
IOCC3
—
RC4
15
12
—
—
AN16
—
C5IN3C6IN3-
—
—
T8IN
IOCC4
—
RC5
16
13
—
—
AN17
—
—
OPA3IN0+
—
T4IN
IOCC5
—
RC6
17
14
PRG3IN0
—
AN18
—
C5IN1C6IN1-
OPA3OUT
—
—
IOCC6
—
RC7
18
15
—
—
AN19
—
—
OPA3IN0-
—
—
IOCC7
—
RE3
1
26
—
—
—
—
—
—
—
—
IOCE3
MCLR/VPP
VDD
20
17
—
—
VDD
—
—
—
—
—
—
—
VSS
8
5
—
—
VSS
—
—
—
—
—
—
—
VSS
19
16
—
—
—
—
—
—
—
—
—
—
DS40001810B-page 6
Comparator
28-Pin SPDIP/SOIC/SSOP
28-PIN ALLOCATION TABLE (PIC16(L)F1773/6) (CONTINUED)
I/O
TABLE 3:
2015-2016 Microchip Technology Inc.
PIC16(L)F1773/6
Table of Contents
1.0 Device Overview .......................................................................................................................................................................... 9
2.0 Enhanced Mid-Range CPU ........................................................................................................................................................ 20
3.0 Memory Organization ................................................................................................................................................................. 22
4.0 Device Configuration .................................................................................................................................................................. 70
5.0 Oscillator Module (with Fail-Safe Clock Monitor) ....................................................................................................................... 77
6.0 Resets ........................................................................................................................................................................................ 95
7.0 Interrupts .................................................................................................................................................................................. 103
8.0 Power-Down Mode (Sleep) ...................................................................................................................................................... 122
9.0 Watchdog Timer (WDT) ........................................................................................................................................................... 127
10.0 Flash Program Memory Control ............................................................................................................................................... 132
11.0 I/O Ports ................................................................................................................................................................................... 149
12.0 Peripheral Pin Select (PPS) Module ........................................................................................................................................ 170
13.0 Interrupt-On-Change ................................................................................................................................................................ 177
14.0 Fixed Voltage Reference (FVR) .............................................................................................................................................. 184
15.0 Temperature Indicator Module ................................................................................................................................................. 187
16.0 Analog-to-Digital Converter (ADC) Module .............................................................................................................................. 189
17.0 5-Bit Digital-to-Analog Converter (DAC) Module...................................................................................................................... 204
18.0 10-bit Digital-to-Analog Converter (DAC) Module .................................................................................................................... 209
19.0 Comparator Module.................................................................................................................................................................. 215
20.0 Zero-Cross Detection (ZCD) Module........................................................................................................................................ 228
21.0 Timer0 Module ......................................................................................................................................................................... 234
22.0 Timer1/3/5 Module with Gate Control....................................................................................................................................... 237
23.0 Timer2/4/6/8 Module ................................................................................................................................................................ 248
24.0 Capture/Compare/PWM Modules ............................................................................................................................................ 273
25.0 10-Bit Pulse-Width Modulation (PWM) Module ........................................................................................................................ 288
26.0 16-bit Pulse-Width Modulation (PWM) Module ........................................................................................................................ 294
27.0 Complementary Output Generator (COG) Modules................................................................................................................. 321
28.0 Configurable Logic Cell (CLC).................................................................................................................................................. 353
29.0 Operational Amplifier (OPA) Modules ...................................................................................................................................... 368
30.0 Programmable Ramp Generator (PRG) Module ...................................................................................................................... 375
31.0 Data Signal Modulator (DSM) .................................................................................................................................................. 389
32.0 Master Synchronous Serial Port (MSSP) Module .................................................................................................................... 401
33.0 Enhanced Universal Synchronous Asynchronous Receiver Transmitter (EUSART) ............................................................... 454
34.0 In-Circuit Serial Programming™ (ICSP™) ............................................................................................................................... 485
35.0 Instruction Set Summary .......................................................................................................................................................... 487
36.0 Electrical Specifications............................................................................................................................................................ 501
37.0 DC and AC Characteristics Graphs and Charts ....................................................................................................................... 535
38.0 Development Support............................................................................................................................................................... 559
39.0 Packaging Information.............................................................................................................................................................. 563
Appendix A: Data Sheet Revision History ......................................................................................................................................... 574
The Microchip Website ..................................................................................................................................................................... 575
Customer Change Notification Service ............................................................................................................................................. 575
Customer Support ............................................................................................................................................................................. 575
Product Identification System ........................................................................................................................................................... 576
2015-2016 Microchip Technology Inc.
DS40001810B-page 7
PIC16(L)F1773/6
TO OUR VALUED CUSTOMERS
It is our intention to provide our valued customers with the best documentation possible to ensure successful use of your Microchip
products. To this end, we will continue to improve our publications to better suit your needs. Our publications will be refined and
enhanced as new volumes and updates are introduced.
If you have any questions or comments regarding this publication, please contact the Marketing Communications Department via
E-mail at docerrors@microchip.com. We welcome your feedback.
Most Current Data Sheet
To obtain the most up-to-date version of this data sheet, please register at our Worldwide Website at:
http://www.microchip.com
You can determine the version of a data sheet by examining its literature number found on the bottom outside corner of any page.
The last character of the literature number is the version number, (e.g., DS30000000A is version A of document DS30000000).
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:
• Microchip’s Worldwide Website; 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.
Customer Notification System
Register on our website at www.microchip.com to receive the most current information on all of our products.
DS40001810B-page 8
2015-2016 Microchip Technology Inc.
PIC16(L)F1773/6
TABLE 1-1:
The PIC16(L)F1773/6 are described within this data
sheet. See Table 2 for available package
configurations.
DEVICE PERIPHERAL
SUMMARY
Figure 1-1 shows a block diagram of the
PIC16(L)F1773/6 devices. Table 1-2 shows the pinout
descriptions.
Peripheral
Refer to Table 1-1 for peripherals available per device.
Configurable Logic Cell (CLC)
PIC16(L)F1776
DEVICE PERIPHERAL
SUMMARY
PIC16(L)F1773
TABLE 1-1:
Analog-to-Digital Converter (ADC)
●
●
Fixed Voltage Reference (FVR)
●
●
Zero-Cross Detection (ZCD)
●
●
Temperature Indicator
●
●
Peripheral
CLC1
●
●
CLC2
●
●
CLC3
●
●
CLC4
●
●
DSM1
●
●
DSM2
●
●
DSM3
●
●
Data Signal Modulator (DSM)
Enhanced Universal Synchronous/Asynchronous
Receiver/Transmitter (EUSART)
EUSART
●
●
MSSP
●
●
Master Synchronous Serial Ports
Complementary Output Generator (COG)
COG1
●
●
COG2
●
●
Op Amp 1
●
●
COG3
●
●
Op Amp 2
●
●
Op Amp 3
●
●
Op Amps
Programmable Ramp Generator (PRG)
PRG1
●
●
PRG2
●
●
PWM3
●
●
PRG3
●
●
PWM4
●
●
PWM9
●
●
PWM5
●
●
10-bit Pulse-Width Modulator (PWM)
10-bit Digital-to-Analog Converter (DAC)
DAC1
●
●
DAC2
●
●
DAC5
●
●
16-bit Pulse-Width Modulator (PWM)
5-bit Digital-to-Analog Converter (DAC)
PWM6
●
●
PWM11
●
●
DAC3
●
●
DAC4
●
●
Timer0
●
●
DAC7
●
●
Timer2
●
●
Timer4
●
●
8-bit Timers
Capture/Compare/PWM (CCP/ECCP) Modules
CCP1
●
●
Timer6
●
●
CCP2
●
●
Timer8
●
●
CCP7
●
●
Timer1
●
●
Comparators
2015-2016 Microchip Technology Inc.
PIC16(L)F1776
DEVICE OVERVIEW
PIC16(L)F1773
1.0
16-bit Timers
C1
●
●
Timer3
●
●
C2
●
●
Timer5
●
●
C3
●
●
C4
●
●
C5
●
●
C6
●
●
DS40001810B-page 9
PIC16(L)F1773/6
1.1
1.1.1
Register and Bit naming
conventions
REGISTER NAMES
When there are multiple instances of the same
peripheral in a device, the peripheral control registers
will be depicted as the concatenation of a peripheral
identifier, peripheral instance, and control identifier.
The control registers section will show just one
instance of all the register names with an ‘x’ in the place
of the peripheral instance number. This naming
convention may also be applied to peripherals when
there is only one instance of that peripheral in the
device to maintain compatibility with other devices in
the family that contain more than one.
1.1.2
BIT NAMES
There are two variants for bit names:
• Short name: Bit function abbreviation
• Long name: Peripheral abbreviation + short name
1.1.2.1
Short Bit Names
1.1.2.3
Bit Fields
Bit fields are two or more adjacent bits in the same
register. Bit fields adhere only to the short bit naming
convention. For example, the three Least Significant
bits of the COG1CON0 register contain the mode
control bits. The short name for this field is MD. There
is no long bit name variant. Bit field access is only
possible in C programs. The following example
demonstrates a C program instruction for setting the
COG1 to the Push-Pull mode:
COG1CON0bits.MD = 0x5;
Individual bits in a bit field can also be accessed with
long and short bit names. Each bit is the field name
appended with the number of the bit position within the
field. For example, the Most Significant mode bit has
the short bit name MD2 and the long bit name is
G1MD2. The following two examples demonstrate
assembly program sequences for setting the COG1 to
the Push-Pull mode:
EXAMPLE 1-1:
MOVLW
ANDWF
MOVLW
IORWF
Short bit names are an abbreviation for the bit function.
For example, some peripherals are enabled with the
EN bit. The bit names shown in the registers are the
short name variant.
~(1