PIC16LF15376 Data Sheet
PIC16LF15376 Data Sheet
PIC16LF15376 Data Sheet
Description
PIC16(L)F15356/75/76/85/86 microcontrollers feature Analog, Core Independent Peripherals and Communication
Peripherals, combined with eXtreme Low-Power (XLP) technology for a wide range of general purpose and low-power
applications.
The devices feature multiple PWMs, multiple communication, temperature sensor, and memory features like Memory
Access Partition (MAP) to support customers in data protection and bootloader applications, and Device Information
Area (DIA) which stores factory calibration values to help improve temperature sensor accuracy.
Temperature Indicator
8-bit/ (with HLT) Timer
EUSART/ I2C-SPI
Data Sheet Index
CCP/10-bit PWM
16-bit Timer
Comparator
Data SRAM
10-bit ADC
5-bit DAC
Debug (1)
I/OPins
(bytes)
CWG
NCO
CLC
Device
Note: For other small form-factor package availability and marking information, visit www.microchip.com/
packaging or contact your local sales office.
PIC16(L)F15356
RA4 6 23 RB2
RA5 7 22 RB1
VSS 8 21 RB0
RA7 9 20 VDD
RA6 10 19 VSS
RC0 11 18 RC7
RC1 12 17 RC6
RC2 13 16 RC5
RC3 14 15 RC4
40-PIN PDIP
VPP/MCLR/RE3 1 40 RB7/ICSPDAT
RA0 2 39 RB6/ICSPCLK
RA1 3 38 RB5
RA2 4 37 RB4
RA3 5 36 RB3
RA4 6 35 RB2
RA5 7 34 RB1
RE0 8 33 RB0
PIC16(L)F15375
PIC16(L)F15376
RE1 9 32 VDD
RE2 10 31 VSS
VDD 11 30 RD7
VSS 12 29 RD6
RA7 13 28 RD5
RA6 14 27 RD4
RC0 15 26 RC7
RC1 16 25 RC6
RC2 17 24 RC5
RC3 18 23 RC4
RD0 19 22 RD3
RD1 20 21 RD2
RE3/MCLR/VPP
RB6/ICSPCLK
RB7/ICSPDAT
RA1
RA0
RB5
RB4
28
27
26
24
23
22
25
RA2 1 21 RB3
RA3 2 20 RB2
RA4 3 19 RB1
RA5 4 18 RB0
PIC16(L)F15356
VSS 5 17 VDD
RA7 6 16 VSS
RA6 7 15 RC7
10
12
13
14
11
8
9 RC1
RC2
RC3
RC6
RC0
RC4
RC5
Note 1: See Table 3 for location of all peripheral functions.
2: All VDD and all VSS pins must be connected at the circuit board level. Allowing one or more VSS or VDD pins to
float may result in degraded electrical performance or non-functionality.
3: The bottom pad of the QFN/UQFN package should be connected to VSS at the circuit board level.
RC5
RC4
RD3
RD2
RD1
RD0
RC3
RC2
RC1
34
40
39
37
36
35
31
33
32
38
RC7 1
RD4 2 30 RC0
RD5 3 29 RA6
RD6 4 28 RA7
RD7 5 27 VSS
PIC16(L)F15375
VSS 6 PIC16(L)F15376 26 VDD
VDD 7 25 RE2
RB0 8 24 RE1
9 23 RE0
RB1
10 22 RA5
RB2
21 RA4
12
13
14
15
16
17
18
19
20
11 RB3
RB4
RB5
RA0
RA2
RA3
RA1
ICSPDAT/RB7
VPP/MCLR/RE3
ICSPCLK/RB6
RC5
RC6
RC4
RD3
RD2
RD1
RD0
RC3
RC2
RC1
44-PIN TQFP (10x10)
NC
41
40
39
37
36
35
34
42
44
43
38
RC7 1 33 NC
RD4 2 32 RC0
RD5 3 31 RA6
4 30 RA7
RD6
5 29 VSS
RD7 PIC16(L)F15375
6 PIC16(L)F15376 28 VDD
VSS
27 RE2
VDD 7
RB0 8 26 RE1
25 RE0
RB1 9
24 RA5
RB2 10
23 RA4
RB3 11 12
13
14
15
16
17
18
19
20
21
22
NC
NC
ICSPCLK/RB6
ICSPDAT/RB7
RA2
RA3
RB4
RB5
VPP/MCLR/RE3
AN0/RA0
RA1
Note 1: See Table 4 for location of all peripheral functions.
2: All VDD and all VSS pins must be connected at the circuit board level. Allowing one or more VSS or VDD pins to float
may result in degraded electrical performance or non-functionality.
RC7 1 33 RA6
RD4 2 32 RA7
RD5 3 31 NC
RD6 4 30 VSS
RD7 5 29 NC
VSS 6 PIC16(L)F15375 28
PIC16(L)F15376 VDD
VDD 7 27 RE2
NC 8 26 RE1
RB0 9 25 RE0
RB1 10 24 RA5
RB2 11 23 RA4
22
12
13
14
15
16
17
18
19
20
21
RA1
RA2
RA3
ICSPDAT/RB7
RB3
RB4
RB5
RA0
NC
ICSPCLK/RB6
VPP/MCLR/RE3
RC6
RC5
RC4
RD3
RD2
RD1
RD0
RC3
RC2
RF3
RF2
RF1
48 47 46 45 44 43 42 41 40 39 38 37
RC7 1 36 RF0
RD4 2 35 RC1
RD5 3 34 RC0
RD6 4 33 RA6
RD7 5 32 RA7
PIC16(L)F15385 31 VSS
VSS 6
PIC16(L)F15386
VDD 7 30 VDD
RB0 8 29 RE2
RB1 9 28 RE1
RB2 10 27 RE0
RB3 11 26 RA5
RF4 12 25 RA4
13 14 15 16 17 18 19 20 21 22 23 24
RF5
RF6
RF7
RB4
RB5
ICSPCLK/RB6
ICSPDAT/RB7
VPP/MCLR/RE3
RA0
RA1
RA2
RA3
Note 1: See Table 5 for location of all peripheral functions.
2: The bottom pad of the QFN/UQFN package should be connected to Vss as the circuit board level.
RC4
RD3
RD2
RD1
RD0
RC3
RC2
RF3
RF2
RF1
45
44
43
41
40
39
37
46
48
47
38
42
RC7 1 36 RF0
RD4 2 35 RC1
RD5 3
34 RC0
RD6 4 RA6
33
RD7 5 32 RA7
VSS 6 PIC16(L)F15385 31 VSS
VDD 7 PIC16(L)F15386 30 VDD
RB0 8 29 RE2
RB1 9 28 RE1
RB2 10 27 RE0
RB3 11 26 RA5
RF4 12 25 RA4
13
14
15
16
17
18
19
20
21
22
23
24
RF5
RF6
RF7
ICSPDAT/RB7
VPP/MCLR/RE3
RB4
RB5
ICSPCLK/RB6
RA0
RA1
RA2
RA3
28-Pin UQFN
Comparator
Reference
EUSART
Interrupt
Pull-up
Timers
MSSP
CLKR
Basic
CWG
PWM
I/O(2)
NCO
ADC
DAC
CCP
ZCD
CLC
C1IN0-
RA0 2 27 ANA0 ― ― ― ― ― ― ― ― ― ― CLCIN0(1) ― IOCA0 Y ―
C2IN0-
C1IN1-
RA1 3 28 ANA1 ― ― ― ― ― ― ― ― ― ― CLCIN1(1) ― IOCA1 Y ―
C2IN1-
C1IN0+
RA2 4 1 ANA2 — ― DAC1OUT1 ― ― ― ― ― ― ― ― ― IOCA2 Y ―
C2IN0+
PIC16(L)F15356/75/76/85/86
RA3 5 2 ANA3 VREF+ C1IN1+ ― DAC1REF+ ― ― ― ― ― ― ― ― ― IOCA3 Y ―
RA4 6 3 ANA4 ― ― ― ― T0CKI ― ― ― ― ― ― ― ― IOCA4 Y ―
RA5 7 4 ANA5 ― ― ― ― — ― ― ― SS1(1) ― ― ― ― IOCA5 Y ―
CLKOUT
RA6 10 7 ANA6 ― ― ― ― ― ― ― ― ― ― ― ― ― IOCA6 Y
OSC2
CLKIN
RA7 9 6 ANA7 ― ― ― ― ― ― ― ― ― ― ― ― ― IOCA7 Y
OSC1
INT(1)
RB0 21 18 ANB0 ― C2IN1+ ― ― ― ― ― CWG1IN(1) SS2(1) ZCD1 ― ― ― Y ―
IOCB0
C1IN3- SCK2,
RB1 22 19 ANB1 ― ― ― ― ― ― ― ― ― ― ― IOCB1 Y ―
C2IN3- SCL2(1,4)
SDA2,
RB2 23 20 ANB2 ― ― ― ― ― ― ― ― ― ― ― ― IOCB2 Y ―
SDI2(1,4)
C1IN2-
RB3 24 21 ANB3 ― ― ― ― ― ― ― ― ― ― ― ― IOCB3 Y ―
C2IN2-
ANB4
RB4 25 22 ― ― ― ― ― ― ― ― ― ― ― ― ― IOCB4 Y ―
ADACT(1)
(1)
RB5 26 23 ANB5 ― ― ― ― T1G ― ― ― ― ― ― ― ― IOCB5 Y ―
TX2
RB6 27 24 ANB6 ― ― ― ― ― ― ― ― ― ― CLCIN2(1) ― IOCB6 Y ICSPCLK
CK2(1)
DS40001866B-page 9
RX2
RB7 28 25 ANB7 ― ― ― DAC1OUT2 ― ― ― ― ― ― CLCIN3(1) ― IOCB7 Y ICSPDAT
DT2(1)
Note 1: This is a PPS remappable input signal. The input function may be moved from the default location shown to one of several other PORTx pins.
2: All digital output signals shown in this row are PPS remappable. These signals may be mapped to output onto one or more PORTx pin options.
3: This is a bidirectional signal. For normal module operation, the firmware should map this signal to the same pin in both the PPS input and PPS output registers.
4: These pins are configured for I2C logic levels. PPS assignments to the other pins will operate, but input logic levels will be standard TTL/ST as selected by the INLVL register, instead of the I2C specific or
SMBus input buffer thresholds.
TABLE 3: 28-PIN ALLOCATION TABLE (PIC16(L)F15356) (CONTINUED)
2016-2018 Microchip Technology Inc.
28-Pin PDIP/SOIC/SSOP
28-Pin UQFN
Comparator
Reference
EUSART
Interrupt
Pull-up
Timers
MSSP
CLKR
Basic
CWG
PWM
I/O(2)
NCO
ADC
DAC
CCP
ZCD
CLC
SOSCO
RC0 11 8 ANC0 ― ― ― ― ― ― ― ― ― ― ― ― IOCC0 Y ―
T1CKI
RC1 12 9 ANC1 ― ― ― ― SOSCI CCP2(1) ― ― ― ― ― ― ― IOCC1 Y ―
RC2 13 10 ANC2 ― ― ― ― ― CCP1(1) ― ― ― ― ― ― ― IOCC2 Y ―
SCL1,
RC3 14 11 ANC3 ― ― ― ― T2IN(1) ― ― ― ― ― ― ― IOCC3 Y ―
SCK1(1,4)
SDA1,
RC4 15 12 ANC4 ― ― ― ― ― ― ― ― ― ― ― ― IOCC4 Y ―
SDI1(1,4)
RC5 16 13 ANC5 ― ― ― ― ― ― ― ― ― ― ― ― ― IOCC5 Y ―
PIC16(L)F15356/75/76/85/86
TX1
RC6 17 14 ANC6 ― ― ― ― ― ― ― ― ― ― ― ― IOCC6 Y ―
CK1(1)
RX1
RC7 18 15 ANC7 ― ― ― ― ― ― ― ― ― ― ― ― IOCC7 Y ―
DT1(1)
MCLR
RE3 1 26 — ― ― ― ― ― ― ― ― ― ― ― ― ― IOCE3 Y
VPP
VDD 20 17 ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― VDD
VSS 8 16 ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― VSS
VSS 19 5 ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― VSS
OUT(2) CWG1A
― ― ― ― C1OUT NCO1OUT ― TMR0 CCP1 PWM3OUT SDO1/2 ― DT(1,2) CLC1OUT CLKR ― ― ―
CWG2A
CWG1B
― ― ― ― C2OUT ― ― ― CCP2 PWM4OUT SCK1/2 ― CK(1,2) CLC2OUT ― ― ― ―
CWG2B
CWG1C SCL1(3,4)
― ― ― ― ― ― ― ― ― PWM5OUT ― TX(1,2) CLC3OUT ― ― ― ―
CWG2C SCL2(3,4)
CWG1D SDA1(3,4)
― ― ― ― ― ― ― ― ― PWM6OUT ― ― CLC4OUT ― ― ― ―
CWG2D SDA2(3,4)
Note 1: This is a PPS remappable input signal. The input function may be moved from the default location shown to one of several other PORTx pins.
2: All digital output signals shown in this row are PPS remappable. These signals may be mapped to output onto one or more PORTx pin options.
DS40001866B-page 10
3: This is a bidirectional signal. For normal module operation, the firmware should map this signal to the same pin in both the PPS input and PPS output registers.
4: These pins are configured for I2C logic levels. PPS assignments to the other pins will operate, but input logic levels will be standard TTL/ST as selected by the INLVL register, instead of the I2C specific or
SMBus input buffer thresholds.
2016-2018 Microchip Technology Inc.
44-Pin TQFP
Comparator
40-Pin PDIP
44-Pin QFN
Reference
EUSART
Interrupt
Pull-up
Timers
MSSP
CLKR
Basic
CWG
PWM
I/O(2)
NCO
ADC
DAC
CCP
ZCD
CLC
RA0 2 17 19 19 ANA0 ― C1IN0- ― ― ― ― ― ― ― ― ― CLCIN0(1) ― IOCA0 Y ―
C2IN0-
RA1 3 18 20 20 ANA1 ― C1IN1- ― ― ― ― ― ― ― ― ― CLCIN1(1) ― IOCA1 Y ―
C2IN1-
RA2 4 19 21 21 ANA2 ― C1IN0+ ― DAC1OUT1 ― ― ― ― ― ― ― ― ― IOCA2 Y ―
C2IN0+
RA3 5 20 22 22 ANA3 VREF+ C1IN1+ ― DACREF+ ― ― ― ― ― ― ― ― ― IOCA3 Y ―
RA4 6 21 23 23 ANA4 ― ― ― ― T0CKI(1) ― ― ― ― ― ― ― ― IOCA4 Y ―
RA5 7 22 24 24 ANA5 ― ― ― ― T1G(1) ― ― ― SS1(1) ― ― ― ― IOCA5 Y ―
RA6 14 29 33 31 ANA6 ― ― ― ― ― ― ― ― ― ― ― ― ― IOCA6 Y CLKOUT/
OSC1
PIC16(L)F15356/75/76/85/86
RA7 13 28 32 30 ANA7 ― ― ― ― ― ― ― ― ― ― ― ― ― IOCA7 Y CLKIN/
OSC2
RB0 33 8 9 8 ANB0 ― C2IN1+ ― ― ― ― ― CWG1(1) SS2(1) ZCD1 ― ― ― INT(1) Y ―
IOCB0
RB1 34 9 10 9 ANB1 ― C1IN3- ― ― ― ― ― ― SCL1 ― ― ― ― IOCB1 Y ―
C2IN3- SCK1(1,4)
RB2 35 10 11 10 ANB2 ― ― ― ― ― ― ― ― SDA1 ― ― ― ― IOCB2 Y ―
SDI1(1,4)
RB3 36 11 12 11 ANB3 ― C1IN2- ― ― ― ― ― ― ― ― ― ― ― IOCB3 Y ―
C2IN2-
RB4 37 12 14 14 ANB4 ― ― ― ― ― ― ― ― ― ― ― ― ― IOCB4 Y ―
ADACT
(1)
40-Pin UQFN
44-Pin TQFP
Comparator
40-Pin PDIP
44-Pin QFN
Reference
EUSART
Interrupt
Pull-up
Timers
MSSP
CLKR
Basic
PWM
CWG
I/O(2)
NCO
ADC
DAC
CCP
ZCD
CLC
RC3 18 33 37 37 ANC3 ― ― ― ― T2IN(1) ― ― ― SCL1 ― ― ― ― IOCC3 Y ―
SCK1(1,4)
RC4 23 38 42 42 ANC4 ― ― ― ― ― ― ― ― SDA1 ― ― ― ― IOCC4 Y ―
SDI1(1,4)
RC5 24 39 43 43 ANC5 ― ― ― ― ― ― ― ― ― ― ― ― ― IOCC5 Y ―
RC6 25 40 44 44 ANC6 ― ― ― ― ― ― ― ― ― ― TX1 ― ― IOCC6 Y ―
CK1(1)
RC7 26 1 1 1 ANC7 ― ― ― ― ― ― ― ― ― ― RX1 ― ― IOCC7 Y ―
DT1(1)
RD0 19 34 38 38 AND0 ― ― ― ― ― ― ― ― SCK2, ― ― ― ― ― ― ―
SCL2(1,4)
RD1 20 35 39 39 AND1 ― ― ― ― ― ― ― ― SDA2, ― ― ― ― ― ― ―
SDI2(1,4)
PIC16(L)F15356/75/76/85/86
RD2 21 36 40 40 AND2 ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― ―
RD3 22 37 41 41 AND3 ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― ―
RD4 27 2 2 2 AND4 ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― ―
RD5 28 3 3 3 AND5 ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― ―
RD6 29 4 4 4 AND6 ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― ―
RD7 30 5 5 5 AND7 ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― ―
RE0 8 23 25 25 ANE0 ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― ―
RE1 9 24 26 26 ANE1 ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― ―
RE2 10 25 27 27 ANE2 ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― ―
RE3 1 16 18 18 ― ― ― ― ― ― ― ― ― ― ― ― ― ― IOCE3 Y MCLR
VPP
VDD 11 26 7 7 ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― VDD
VDD 32 7 28 28 ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― VDD
VSS 12 27 6 6 ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― VSS
VSS 31 6 30 29 ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― VSS
Note 1: This is a PPS re-mappable input signal. The input function may be moved from the default location shown to one of several other PORTx pins.
2: All digital output signals shown in this row are PPS remappable. These signals may be mapped to output onto one of several PORTx pin options.
DS40001866B-page 12
3: This is a bidirectional signal. For normal module operation, the firmware should map this signal to the same pin in both the PPS input and PPS output registers.
4: These pins are configured for I2C logic levels. PPS assignments to the other pins will operate, but input logic levels will be standard TTL/ST as selected by the INLVL register, instead of the I2C specific or
SMBUS input buffer thresholds.
TABLE 4: 40/44-PIN ALLOCATION TABLE (PIC16(L)F15375, PIC16(L)F15376) (CONTINUED)
2016-2018 Microchip Technology Inc.
40-Pin UQFN
44-Pin TQFP
Comparator
40-Pin PDIP
44-Pin QFN
Reference
EUSART
Interrupt
Pull-up
Timers
MSSP
CLKR
Basic
PWM
CWG
I/O(2)
NCO
ADC
DAC
CCP
ZCD
CLC
OUT(2) ― ― ― ― ― ― C1OUT NCO1OUT ― TMR0 CCP1 PWM3OUT CWG1A SDO1 ― DT(3) CLC1OUT CLKR ― ― ―
CWG2A SDO2
― ― ― ― ― ― C2OUT ― ― ― CCP2 PWM4OUT CWG1B SCK1 ― CK1 CLC2OUT ― ― ― ―
CWG2B SCK2 CK2
― ― ― ― ― ― ― ― ― ― ― PWM5OUT CWG1C SCL1(3,4) ― TX1 CLC3OUT ― ― ― ―
CWG2C SCL2(3,4) TX2
― ― ― ― ― ― ― ― ― ― ― PWM6OUT CWG1D SDA1(3,4) ― ― CLC4OUT ― ― ― ―
CWG2D SDA2(3,4)
Note 1: This is a PPS re-mappable input signal. The input function may be moved from the default location shown to one of several other PORTx pins.
2: All digital output signals shown in this row are PPS remappable. These signals may be mapped to output onto one of several PORTx pin options.
3: This is a bidirectional signal. For normal module operation, the firmware should map this signal to the same pin in both the PPS input and PPS output registers.
4: These pins are configured for I2C logic levels. PPS assignments to the other pins will operate, but input logic levels will be standard TTL/ST as selected by the INLVL register, instead of the I2C specific or
SMBUS input buffer thresholds.
PIC16(L)F15356/75/76/85/86
DS40001866B-page 13
2016-2018 Microchip Technology Inc.
Comparator
Reference
EUSART
Interrupt
Pull-up
Timers
MSSP
CLKR
Basic
PWM
CWG
I/O(2)
NCO
ADC
DAC
CCP
ZCD
CLC
RA0 21 ANA0 ― C1IN0- ― ― ― ― ― ― ― ― ― CLCIN0(1) ― IOCA0 Y ―
C2IN0-
RA1 22 ANA1 ― C1IN1- ― ― ― ― ― ― ― ― ― CLCIN1(1) ― IOCA1 Y ―
C2IN1-
RA2 23 ANA2 ― C1IN0+ ― DAC1OUT1 ― ― ― ― ― ― ― ― ― IOCA2 Y ―
C2IN0+
RA3 24 ANA3 VREF+ C1IN1+ ― DACREF+ ― ― ― ― ― ― ― ― ― IOCA3 Y ―
RA4 25 ANA4 ― C1IN1- ― ― T0CKI(1) ― ― ― ― ― ― ― ― IOCA4 Y ―
RA5 26 ANA5 ― ― ― ― T1G(1) ― ― ― SS1(1) ― ― ― ― IOCA5 Y ―
PIC16(L)F15356/75/76/85/86
ADACT
RA6 33 ANA6 ― ― ― ― ― ― ― ― ― ― ― ― ― IOCA6 Y CLKOUT/
OSC1
RA7 32 ANA7 ― ― ― ― ― ― ― ― ― ― ― ― ― IOCA7 Y CLKIN/
OSC2
RB0 8 ANB0 ― C2IN1+ ― ― ― ― ― CWG1(1) SS2(1) ZCD1 ― ― ― INT(1) Y ―
IOCB0
RB1 9 ANB1 ― C1IN3- ― ― ― ― ― ― SCL1 ― ― ― ― IOCB1 Y ―
C2IN3- SCK1(1,4)
RB2 10 ANB2 ― ― ― ― ― ― ― ― SDA1 ― ― ― ― IOCB2 Y ―
SDI1(1,4)
RB3 11 ANB3 ― C1IN2- ― ― ― ― ― ― ― ― ― ― ― IOCB3 Y ―
C2IN2-
RB4 16 ANB4 ― ― ― ― ― ― ― ― ― ― ― ― ― IOCB4 Y ―
ADACT(1)
RB5 17 ANB5 ― ― ― ― ― ― ― ― ― ― ― ― ― IOCB5 Y ―
RB6 18 ANB6 ― ― ― ― ― ― ― ― ― ― TX2 CLCIN2(1) ― IOCB6 Y ICSPCLK
CK2(1)
RB7 19 ANB7 ― ― ― DAC1OUT2 ― ― ― ― ― ― RX2 CLCIN3(1) ― IOCB7 Y ICSPDAT
DT2(1)
DS40001866B-page 14
48-Pin UQFN/TQFP
Comparator
Reference
EUSART
Interrupt
Pull-up
Timers
MSSP
CLKR
Basic
PWM
CWG
I/O(2)
NCO
ADC
DAC
CCP
ZCD
CLC
RC2 40 ANC2 ― ― ― ― ― CCP1(1) ― ― ― ― ― ― ― IOCC2 Y ―
RC3 41 ANC3 ― ― ― ― T2IN(1) ― ― ― SCL1 ― ― ― ― IOCC3 Y ―
SCL2(1,4)
RC4 46 ANC4 ― ― ― ― ― ― ― ― SDA1 ― ― ― ― IOCC4 Y ―
SDI1(1,4)
RC5 47 ANC5 ― ― ― ― ― ― ― ― ― ― ― ― ― IOCC5 Y ―
RC6 48 ANC6 ― ― ― ― ― ― ― ― ― ― TX1 ― ― IOCC6 Y ―
CK1(1)
RC7 1 ANC7 ― ― ― ― ― ― ― ― ― ― RX1 ― ― IOCC7 Y ―
DT1(1)
PIC16(L)F15356/75/76/85/86
RD0 42 AND0 ― ― ― ― ― ― ― ― SCK2 ― ― ― ― ― Y ―
SCL2(1,4)
RD1 43 AND1 ― ― ― ― ― ― ― ― SDA2 ― ― ― ― ― Y ―
SDI2(1,4)
RD2 44 AND2 ― ― ― ― ― ― ― ― ― ― ― ― ― ― Y ―
RD3 45 AND3 ― ― ― ― ― ― ― ― ― ― ― ― ― ― Y ―
RD4 2 AND4 ― ― ― ― ― ― ― ― ― ― ― ― ― ― Y ―
RD5 3 AND5 ― ― ― ― ― ― ― ― ― ― ― ― ― ― Y ―
RD6 4 AND6 ― ― ― ― ― ― ― ― ― ― ― ― ― ― Y ―
RD7 5 AND7 ― ― ― ― ― ― ― ― ― ― ― ― ― ― Y ―
RE0 27 ANE0 ― ― ― ― ― ― ― ― ― ― ― ― ― ― Y ―
RE1 28 ANE1 ― ― ― ― ― ― ― ― ― ― ― ― ― ― Y ―
RE2 29 ANE2 ― ― ― ― ― ― ― ― ― ― ― ― ― ― Y ―
RE3 20 ― ― ― ― ― ― ― ― ― ― ― ― ― ― IOCE3 Y MCLR
VPP
RF0 36 ANF0 ― ― ― ― ― ― ― ― ― ― ― ― ― ― Y ―
RF1 37 ANF1 ― ― ― ― ― ― ― ― ― ― ― ― ― ― Y ―
RF2 38 ANF2 ― ― ― ― ― ― ― ― ― ― ― ― ― ― Y ―
DS40001866B-page 15
RF3 39 ANF3 ― ― ― ― ― ― ― ― ― ― ― ― ― ― Y ―
RF4 12 ANF4 ― ― ― ― ― ― ― ― ― ― ― ― ― ― Y ―
Note 1: This is a PPS re-mappable input signal. The input function may be moved from the default location shown to one of several other PORTx pins.
2: All digital output signals shown in this row are PPS re-mappable. These signals may be mapped to output onto one of several PORTx pin options.
3: This is a bidirectional signal. For normal module operation, the firmware should map this signal to the same pin in both the PPS input and PPS output registers.
4: These pins are configured for I2C logic levels. PPS assignments to the other pins will operate, but input logic levels will be standard TTL/ST as selected by the INLVL register, instead of the I2C specific or
SMBUS input buffer thresholds.
TABLE 5: 48-PIN ALLOCATION TABLE (PIC16(L)F15385, PIC16(L)F15386) (CONTINUED)
2016-2018 Microchip Technology Inc.
48-Pin UQFN/TQFP
Comparator
Reference
EUSART
Interrupt
Pull-up
Timers
MSSP
CLKR
Basic
PWM
CWG
I/O(2)
NCO
ADC
DAC
CCP
ZCD
CLC
RF5 13 ANF5 ― ― ― ― ― ― ― ― ― ― ― ― ― ― Y ―
RF6 14 ANF6 ― ― ― ― ― ― ― ― ― ― ― ― ― ― Y ―
RF7 15 ANF7 ― ― ― ― ― ― ― ― ― ― ― ― ― ― Y ―
VDD 30 ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― Y VDD
VDD 7 ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― VDD
VSS 6 ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― VSS
VSS 31 ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― VSS
OUT(2) ― ― ― C1OUT NCO1OUT ― TMR0 CCP1 PWM3OUT CWG1A SDO1 ― DT(3) CLC1OUT CLKR ― ― ―
CWG2A SDO2
PIC16(L)F15356/75/76/85/86
― ― ― C2OUT ― ― ― CCP2 PWM4OUT CWG1B SCK1 ― CK1 CLC2OUT ― ― ― ―
CWG2B SCK2 CK2
― ― ― ― ― ― ― ― PWM5OUT CWG1C SCK1(3,4) ― TX1 CLC3OUT ― ― ― ―
CWG2C SCL2(3,4) TX2
― ― ― ― ― ― ― ― PWM6OUT CWG1D SDA1(3,4) ― ― CLC4OUT ― ― ― ―
CWG2D SDA2(3,4)
Note 1: This is a PPS re-mappable input signal. The input function may be moved from the default location shown to one of several other PORTx pins.
2: All digital output signals shown in this row are PPS re-mappable. These signals may be mapped to output onto one of several PORTx pin options.
3: This is a bidirectional signal. For normal module operation, the firmware should map this signal to the same pin in both the PPS input and PPS output registers.
4: These pins are configured for I2C logic levels. PPS assignments to the other pins will operate, but input logic levels will be standard TTL/ST as selected by the INLVL register, instead of the I2C specific or
SMBUS input buffer thresholds.
DS40001866B-page 16
PIC16(L)F15356/75/76/85/86
Table of Contents
1.0 Device Overview ........................................................................................................................................................................... 19
2.0 Guidelines for Getting Started with PIC16(L)F15354/55 Microcontrollers .................................................................................... 43
3.0 Enhanced Mid-Range CPU........................................................................................................................................................... 46
4.0 Memory Organization .................................................................................................................................................................... 48
5.0 Device Configuration ................................................................................................................................................................... 101
6.0 Device Information Area ............................................................................................................................................................. 112
7.0 Device Configuration Information ................................................................................................................................................ 114
8.0 Resets ......................................................................................................................................................................................... 115
9.0 Oscillator Module (with Fail-Safe Clock Monitor) ........................................................................................................................ 126
10.0 Interrupts ................................................................................................................................................................................... 143
11.0 Power-Saving Operation Modes ............................................................................................................................................... 165
12.0 Windowed Watchdog Timer (WWDT) ....................................................................................................................................... 172
13.0 Nonvolatile Memory (NVM) Control .......................................................................................................................................... 180
14.0 /O Ports ..................................................................................................................................................................................... 198
15.0 Peripheral Pin Select (PPS) Module ......................................................................................................................................... 233
16.0 Peripheral Module Disable ........................................................................................................................................................ 246
17.0 Interrupt-On-Change ................................................................................................................................................................. 254
18.0 Fixed Voltage Reference (FVR) ................................................................................................................................................ 264
19.0 Temperature Indicator Module .................................................................................................................................................. 267
20.0 Analog-to-Digital Converter (ADC) Module ............................................................................................................................... 269
21.0 5-Bit Digital-to-Analog Converter (DAC1) Module ..................................................................................................................... 285
22.0 Numerically Controlled Oscillator (NCO) Module ...................................................................................................................... 290
23.0 Comparator Module .................................................................................................................................................................. 300
24.0 Zero-Cross Detection (ZCD) Module ........................................................................................................................................ 310
25.0 Timer0 Module .......................................................................................................................................................................... 316
26.0 Timer1 Module with Gate Control ............................................................................................................................................. 322
27.0 Timer2 Module With Hardware Limit Timer (HLT) .................................................................................................................... 336
28.0 Capture/Compare/PWM Modules ............................................................................................................................................. 357
29.0 Pulse-Width Modulation (PWM) ................................................................................................................................................ 368
30.0 Complementary Waveform Generator (CWG) Module ............................................................................................................. 375
31.0 Configurable Logic Cell (CLC) .................................................................................................................................................. 400
32.0 Master Synchronous Serial Port (MSSPx) Modules ................................................................................................................. 417
33.0 Enhanced Universal Synchronous Asynchronous Receiver Transmitter (EUSART) ................................................................ 468
34.0 Reference Clock Output Module ............................................................................................................................................... 496
35.0 In-Circuit Serial Programming™ (ICSP™) ................................................................................................................................ 500
36.0 Instruction Set Summary........................................................................................................................................................... 502
37.0 Electrical Specifications ............................................................................................................................................................ 515
38.0 DC and AC Characteristics Graphs and Charts ........................................................................................................................ 544
39.0 Development Support ............................................................................................................................................................... 564
40.0 Packaging Information .............................................................................................................................................................. 568
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.
PIC16(L)F15356/75/76/85/86
devices are available in 28/40/44/48-pin SPDIP, SSOP,
SOIC, TQFP, QFN and UQFN packages. Figure 1-1,
Figure 1-2 and Figure 1-3 shows the block diagrams of
the PIC16(L)F15356/75/76/85/86 devices. Table 1-2
through Table 1-4 shows the pinout descriptions. Peripheral
Reference Table 1-1 for peripherals available per device.
Analog-to-Digital Converter ●
Digital-to-Analog Converter (DAC1) ●
Fixed Voltage Reference (FVR) ●
Numerically Controlled Oscillator (NCO1) ●
Temperature Indicator Module (TIM) ●
Zero-Cross Detect (ZCD1) ●
Capture/Compare/PWM Modules (CCP)
CCP1 ●
CCP2 ●
Comparator Module (Cx)
C1 ●
C2 ●
Configurable Logic Cell (CLC)
CLC1 ●
CLC2 ●
CLC3 ●
CLC4 ●
Complementary Waveform Generator (CWG)
CWG1 ●
Enhanced Universal Synchronous/Asynchronous
Receiver/Transmitter (EUSART)
EUSART1 ●
EUSART2 ●
Master Synchronous Serial Ports (MSSP)
MSSP1 ●
MSSP2 ●
Pulse-Width Modulator (PWM)
PWM3 ●
PWM4 ●
PWM5 ●
PWM6 ●
Timers
Timer0 ●
Timer1 ●
Timer2 ●
Rev. 10-000039L
Program 1/13/2017
Flash Memory
RAM
PORTA
Timing
Generation
PORTB
CLKOUT
EXTOSC
Oscillator
CPU
CLKIN
PORTC
(Note 3)
PIC16(L)F15356/75/76/85/86
SOSCIN/ Secondary
SOSCI Oscillator
(SOSC)
SOSCO
PORTE
MCLR
ADC
PWM6 PWM5 PWM4 PWM3 Timer2 Timer1 Timer0 C2 C1 TIM DAC FVR
10-bit
CWG1 NCO1 EUSART1 EUSART2 MSSP2 MSSP1 CLC4 CLC3 CLC2 CLC1 ZCD1 CCP1 CCP2
DS40001866B-page 21
Rev. 10-000039M
Program 1/13/2017
Flash Memory
RAM
PORTA
Timing
Generation
PORTB
CLKOUT
EXTOSC
Oscillator
CPU
CLKIN
PORTC
(Note 3)
PIC16(L)F15356/75/76/85/86
SOSCIN/ Secondary PORTD
SOSCI Oscillator
(SOSC)
SOSCO
PORTE
MCLR
ADC
PWM6 PWM5 PWM4 PWM3 Timer2 Timer1 Timer0 C2 C1 TIM DAC FVR
10-bit
CWG1 NCO1 EUSART1 EUSART2 MSSP2 MSSP1 CLC4 CLC3 CLC2 CLC1 ZCD1 CCP1 CCP2
DS40001866B-page 22
Rev. 10-000039N
Program 1/13/2017
Flash Memory
RAM
PORTA
Timing
Generation
PORTB
CLKOUT
EXTOSC
Oscillator
CPU
CLKIN
PORTC
PIC16(L)F15356/75/76/85/86
(Note 3)
SOSCIN/ Secondary PORTD
SOSCI Oscillator
(SOSC)
SOSCO
PORTE
MCLR
PORTF
ADC
PWM6 PWM5 PWM4 PWM3 Timer2 Timer1 Timer0 C2 C1 TIM DAC FVR
10-bit
CWG1 NCO1 EUSART1 EUSART2 MSSP2 MSSP1 CLC4 CLC3 CLC2 CLC1 ZCD1 CCP1 CCP2
DS40001866B-page 23
VSS
R1
R2
MCLR
JP PIC16(L)F153xx
C1
Use a grounded copper pour around the oscillator cir- DEVICE PINS
cuit to isolate it from surrounding circuits. The
grounded copper pour should be routed directly to the
MCU ground. Do not run any signal traces or power
Primary OSC1
traces inside the ground pour. Also, if using a two-sided Oscillator
board, avoid any traces on the other side of the board C1 ` OSC2
where the crystal is placed.
C2 GND
Layout suggestions are shown in Figure 2-3. In-line `
packages may be handled with a single-sided layout
SOSCO
that completely encompasses the oscillator pins. With
fine-pitch packages, it is not always possible to com- SOSCI
Secondary Oscillator
pletely surround the pins and components. A suitable (SOSC)
solution is to tie the broken guard sections to a mirrored Crystal `
ground layer. In all cases, the guard trace(s) must be
returned to ground.
SOSC: C1 SOSC: C2
In planning the application’s routing and I/O assign-
ments, ensure that adjacent port pins, and other
signals in close proximity to the oscillator, are benign
(i.e., free of high frequencies, short rise and fall times, Fine-Pitch (Dual-Sided) Layouts:
and other similar noise). Top Layer Copper Pour
(tied to ground)
For additional information and design guidance on
oscillator circuits, refer to these Microchip Application
Notes, available at the corporate website Bottom Layer
Copper Pour
(www.microchip.com): (tied to ground)
• AN826, “Crystal Oscillator Basics and Crystal
Selection for rfPIC™ and PICmicro® Devices” OSCO
OSCI
DEVICE PINS
Rev. 10-000055C
11/30/2016
15 Configuration
15 Data Bus 8
Program Counter
Flash
MUX
Program
Memory
16-Level Stack
RAM
(15-bit)
14
Program 12
Program Memory RAM Addr
Bus
Read (PMR)
BSR Reg
15
FSR0 Reg
15
FSR1 Reg
STATUS Reg
8
3 MUX
Power-up
Instruction Timer
Decode and
Control Power-on
Reset ALU
8
Watchdog
CLKIN Timer
Brown-out
CLKOUT Timing Reset W Reg
SOSCI Generation
SOSCO
VDD VSS
Internal
Oscillator
Block
FIGURE 4-1: PROGRAM MEMORY MAP FIGURE 4-2: PROGRAM MEMORY MAP
AND STACK FOR AND STACK FOR
PIC16(L)F15375/85 PIC16(L)F15356/76/86
PC<14:0> PC<14:0>
CALL, CALLW CALL, CALLW
RETURN, RETLW 15 RETURN, RETLW 15
Interrupt, RETFIE Interrupt, RETFIE
0FFFh 0FFFh
1000h 1000h
Page 0 17FFh
1800h
1FFFh 1FFFh
2000h 2000h
3FFFh 3FFFh
4000h 4000h
Unimplemented
Unimplemented
7FFFh 7FFFh
my_function
;… LOTS OF CODE…
MOVLW DATA_INDEX
call constants
;… THE CONSTANT IS IN W
6Fh
70h
Common RAM
(16 bytes)
7Fh
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared q = Value depends on condition
Note 1: For Borrow, the polarity is reversed. A subtraction is executed by adding the two’s complement of the
second operand. For rotate (RRF, RLF) instructions, this bit is loaded with either the high-order or low-order
bit of the source register.
PIC16(L)F15356/75/76/85/86
01Ah LATC 09Ah — 11Ah TX1REG1 19Ah SSP2CON1 21Ah — 29Ah — 31Ah PWM4CON 39Ah —
01Bh LATD(2) 09Bh ADRESL 11Bh SP1BRG1L 19Bh SSP2CON2 21Bh — 29Bh — 31Bh — 39Bh —
01Ch LATE 09Ch ADRESH 11Ch SP1BRG1H 19Ch SSP2CON3 21Ch — 29Ch — 31Ch PWM5DCL 39Ch —
01Dh LATF(3) 09Dh ADCON0 11Dh RC1STA1 19Dh — 21Dh — 29Dh — 31Dh PWM5DCH 39Dh —
01Eh — 09Eh ADCON1 11Eh TX1STA1 19Eh — 21Eh — 29Eh — 31Eh PWM5CON 39Eh —
01Fh — 09Fh ADACT 11Fh BAUD1CON1 19Fh — 21Fh — 29Fh — 31Fh — 39Fh —
020h 0A0h 120h 1A0h 220h 2A0h 320h 3A0h
PIC16(L)F15356/75/76/85/86
419h — 499h — 519h — 599h — 619h — 699h — 719h PIE3 799h PMD3
41Ah — 49Ah — 51Ah — 59Ah — 61Ah — 69Ah — 71Ah PIE4 79Ah PMD4
41Bh — 49Bh — 51Bh — 59Bh — 61Bh — 69Bh — 71Bh PIE5 79Bh PMD5
41Ch — 49Ch — 51Ch — 59Ch TMR0 61Ch — 69Ch — 71Ch PIE6 79Ch —
41Dh — 49Dh — 51Dh — 59Dh PR0 61Dh — 69Dh — 71Dh PIE7 79Dh —
41Eh — 49Eh — 51Eh — 59Eh TMR0CON0 61Eh — 69Eh — 71Eh — 79Eh —
41Fh — 49Fh — 51Fh — 59Fh TMR0CON1 61Fh — 69Fh — 71Fh — 79Fh —
420h 4A0h 520h 5A0h 620h General 6A0h 720h 7A0h
Purpose General
General General General General Register General General
Purpose Purpose Purpose Purpose 64Fh 48 Bytes Purpose Purpose Purpose
Register Register Register Register General Register Register
650h Register
80 Bytes 80 Bytes 80 Bytes 80 Bytes Purpose 80 Bytes(2) 80 Bytes(2)
Register 80 Bytes(2)
PIC16(L)F15356/75/76/85/86
819h — 899h — 919h — 999h — A19h RC2REG A99h — B19h — B99h —
81Ah NVMADRL 89Ah — 91Ah — 99Ah — A1Ah TX2REG A9Ah — B1Ah — B9Ah —
81Bh NVMADRH 89Bh — 91Bh — 99Bh — A1Bh SP2BRGL A9Bh — B1Bh — B9Bh —
81Ch NVMDATL 89Ch — 91Ch — 99Ch — A1Ch SP2BRGH A9Ch — B1Ch — B9Ch —
81Dh NVMDATH 89Dh — 91Dh — 99Dh — A1Dh RC2STA A9Dh — B1Dh — B9Dh —
81Eh NVMCON1 89Eh — 91Eh — 99Eh — A1Eh TX2STA A9Eh — B1Eh — B9Eh —
81Fh NVMCON2 89Fh — 91Fh ZCDCON 99Fh — A1Fh BAUD2CON A9Fh — B1Fh — B9Fh —
820h General 8A0h General 920h General 9A0h General A20h General AA0h General B20h General BA0h General
Purpose Purpose Purpose Purpose Purpose Purpose Purpose Purpose
Register Register Register Register Register Register Register Register
86Fh 80 Bytes(3) 8EFh 80 Bytes(3) 96Fh 80 Bytes(3) 9EFh 80 Bytes(3) A6Fh 80 Bytes(3) AEFh 80 Bytes(3) B6Fh 80 Bytes(3) BEFh 80 Bytes(3)
870h Common RAM 8F0h Common RAM 970h Common RAM 9F0h Common RAM A70h Common RAM AF0h Common RAM B70h Common RAM BF0h Common RAM
Accesses Accesses Accesses Accesses Accesses Accesses Accesses Accesses
87Fh 70h-7Fh 8FFh 70h-7Fh 97Fh 70h-7Fh 9FFh 70h-7Fh A7Fh 70h-7Fh AFFh 70h-7Fh B7Fh 70h-7Fh BFFh 70h-7Fh
Unimplemented Unimplemented
Read as ‘0’ Read as ‘0’
PIC16(L)F15356/75/76/85/86
Read as ‘0’ Read as ‘0’ Read as ‘0’ Read as ‘0’ Read as ‘0’ Read as ‘0’
C1Fh C9Fh
C20h CA0h
General General
Purpose Purpose
Register Register
80 Bytes(1) 80 Bytes(1)
PIC16(L)F15356/75/76/85/86
1C19h — 1C99h — 1D19h — 1D99h — register mapping register mapping register mapping details)
1C1Ah — 1C9Ah — 1D1Ah — 1D9Ah — details) details) details)
1C1Bh — 1C9Bh — 1D1Bh — 1D9Bh —
1C1Ch — 1C9Ch — 1D1Ch — 1D9Ch —
1C1Dh — 1C9Dh — 1D1Dh — 1D9Dh —
1C1Eh — 1C9Eh — 1D1Eh — 1D9Eh —
1C1Fh — 1C9Fh — 1D1Fh — 1D9Fh —
1C20h 1CA0h 1D20h 1DA0h
TABLE 4-9: PIC16(L)F15356/75/76/85/86 MEMORY MAP, BANKS 60, 61, 62, AND 63
Bank 60 Bank 61 Bank 62 Bank 63
— (2) — 1F8Ch —
1E0Ch 1E8Ch RF7PPS 1F0Ch
1E0Dh — 1E8Dh — 1F0Dh — 1F8Dh —
1E0Eh — 1E8Eh — 1F0Eh — 1F8Eh —
1E0Fh CLCDATA 1E8Fh PPSLOCK 1F0Fh — 1F8Fh —
1E10h CLC1CON 1E90h INTPPS 1F10h RA0PPS 1F90h —
1E11h CLC1POL 1E91h T0CKIPPS 1F11h RA1PPS 1F91h —
1E12h CLC1SEL0 1E92h T1CKIPPS 1F12h RA2PPS 1F92h —
1E13h CLC1SEL1 1E93h T1GPPS 1F13h RA3PPS 1F93h —
1E14h CLC1SEL2 1E94h — 1F14h RA4PPS 1F94h —
1E15h CLC1SEL3 1E95h — 1F15h RA5PPS 1F95h —
1E16h CLC1GLS0 1E96h — 1F16h RA6PPS 1F96h —
1E17h CLC1GLS1 1E97h — 1F17h RA7PPS 1F97h —
1E18h CLC1GLS2 1E98h — 1F18h RB0PPS 1F98h —
1E19h CLC1GLS3 1E99h — 1F19h RB1PPS 1F99h —
1E1Ah CLC2CON 1E9Ah — 1F1Ah RB2PPS 1F9Ah —
1E1Bh CLC2POL 1E9Bh — 1F1Bh RB3PPS 1F9Bh —
1E1Ch CLC2SEL0 1E9Ch T2INPPS 1F1Ch RB4PPS 1F9Ch —
1E1Dh CLC2SEL1 1E9Dh — 1F1Dh RB5PPS 1F9Dh —
1E1Eh CLC2SEL2 1E9Eh — 1F1Eh RB6PPS 1F9Eh —
1E1Fh CLC2SEL3 1E9Fh — 1F1Fh RB7PPS 1F9Fh —
1E20h CLC2GLS0 1EA0h — 1F20h RC0PPS 1FA0h —
1E21h CLC2GLS1 1EA1h CCP1PPS 1F21h RC1PPS 1FA1h —
1E22h CLC2GLS2 1EA2h CCP2PPS 1F22h RC2PPS 1FA2h —
1E23h CLC2GLS3 1EA3h — 1F23h RC3PPS 1FA3h —
1E24h CLC3CON 1EA4h — 1F24h RC4PPS 1FA4h —
1E25h CLC3POL 1EA5h — 1F25h RC5PPS 1FA5h —
1E26h CLC3SEL0 1EA6h — 1F26h RC6PPS 1FA6h —
1E27h CLC3SEL1 1EA7h — 1F27h RC7PPS 1FA7h —
1E28h CLC3SEL2 1EA8h — 1F28h RD0PPS(1) 1FA8h —
TABLE 4-10: SPECIAL FUNCTION REGISTER SUMMARY BANKS 0-63 (ALL BANKS)
Bank Offset Value on: Value on:
Name Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Bank 0-Bank 63 POR, BOR MCLR
All Banks
Addressing this location uses contents of FSR0H/FSR0L to address data memory (not a
x00h or x80h INDF0 xxxx xxxx xxxx xxxx
physical register)
Addressing this location uses contents of FSR1H/FSR1L to address data memory (not a
x01h or x81h INDF1 xxxx xxxx xxxx xxxx
physical register)
x02h or x82h PCL PCL 0000 0000 0000 0000
x03h or x83h STATUS — — — TO PD Z DC C ---1 1000 ---q quuu
x04h or x84h FSR0L FSR0L Indirect Data Memory Address 0 Low Pointer 0000 0000 uuuu uuuu
x05h or x85h FSR0H FSR0H Indirect Data Memory Address 0 High Pointer 0000 0000 0000 0000
x06h or x86h FSR1L FSR1L Indirect Data Memory Address 1 Low Pointer 0000 0000 uuuu uuuu
x07h or x87h FSR1H FSR1H Indirect Data Memory Address 1 High Pointer 0000 0000 0000 0000
x08h or x88h BSR — — BSR<5:0> --00 0000 --00 0000
x09h or x89h WREG Working Register 0000 0000 uuuu uuuu
x0Ah or x8Ah PCLATH — Write Buffer for the upper 7 bits of the Program Counter -000 0000 -000 0000
x0Bh or x8Bh INTCON GIE PEIE — — — — — INTEDG 00-- ---1 00-- ---1
Legend: x = unknown, u = unchanged, q = depends on condition, - = unimplemented, read as ‘0’, r = reserved. Shaded locations
unimplemented, read as ‘0’.
Note 1: These Registers can be accessed from any bank.
Bank 0
00Ch PORTA RA7 RA6 RA5 RA4 RA3 RA2 RA1 RA0 xxxx xxxx uuuu uuuu
00Dh PORTB RB7 RB6 RB5 RB4 RB3 RB2 RB1 RB0 xxxx xxxx uuuu uuuu
00Eh PORTC RC7 RC6 RC5 RC4 RC3 RC2 RC1 RC0 xxxx xxxx uuuu uuuu
00Fh PORTD(1) RD7 RD6 RD5 RD4 RD3 RD2 RD1 RD0 xxxx xxxx uuuu uuuu
010h PORTE — — — — RE3 RE2(1) RE1(1) RE0(1) ---- xxxx ---- uuuu
011h PORTF(2) RF7 RF6 RF5 RF4 RF3 RF2 RF1 RF0 xxxx xxxx uuuu uuuu
012h TRISA TRISA7 TRISA6 TRISA5 TRISA4 TRISA3 TRISA2 TRISA1 TRISA0 1111 1111 1111 1111
013h TRISB TRISB7 TRISB6 TRISB5 TRISB4 TRISB3 TRISB2 TRISB1 TRISB0 1111 1111 1111 1111
014h TRISC TRISC7 TRISC6 TRISC5 TRISC4 TRISC3 TRISC2 TRISC1 TRISC0 1111 1111 1111 1111
PIC16(L)F15356/75/76/85/86
015h TRISD(1) TRISD7 TRISD6 TRISD5 TRISD4 TRISD3 TRISD2 TRISD1 TRISD0 1111 1111 1111 1111
016h TRISE — — — — —(3) TRISE2(1) TRISE1(1) TRISE0(1) ---- 1111 ---- 1111
(2)
017h TRISF TRISF7 TRISF6 TRISF5 TRISF4 TRISF3 TRISF2 TRISF1 TRISF0 1111 1111 1111 1111
018h LATA LATA7 LATA6 LATA5 LATA4 LATA3 LATA2 LATA1 LATA0 xxxx xxxx uuuu uuuu
019h LATB LATB7 LATB6 LATB5 LATB4 LATB3 LATB2 LATB1 LATB0 xxxx xxxx uuuu uuuu
01Ah LATC LATC7 LATC6 LATC5 LATC4 LATC3 LATC2 LATC1 LATC0 xxxx xxxx uuuu uuuu
01Bh LATD(1) LATD7 LATD6 LATD5 LATD4 LATD3 LATD2 LATD1 LATD0 xxxx xxxx uuuu uuuu
01Ch LATE — — — — — LATE2(1) LATE1(1) LATE0(1) ---- -xxx ---- -uuu
(2)
01Dh LATF LATF7 LATF6 LATF5 LATF4 LATF3 LATF2 LATF1 LATF0 xxxx xxxx uuuu uuuu
01Eh — Unimplemented — —
01Fh — Unimplemented — —
Legend: x = unknown, u = unchanged, q = depends on condition, - = unimplemented, read as ‘0’, r = reserved. Shaded locations unimplemented, read as ‘0’.
Note 1: Present only in PIC16(L)F15375/76/85/86.
2: Present only in PIC16(L)F15385/86.
3: Unimplemented, read as ‘1’.
DS40001866B-page 64
TABLE 4-11: SPECIAL FUNCTION REGISTER SUMMARY BANKS 0-63 (CONTINUED)
2016-2018 Microchip Technology Inc.
Bank 1
08Ch
— — Unimplemented — —
09Ah
09Bh ADRESL ADC Result Register Low xxxx xxxx uuuu uuuu
09Ch ADRESH ADC Result Register High xxxx xxxx uuuu uuuu
09Dh ADCON0 CHS<5:0> GO/DONE ADON 0000 0000 0000 0000
09Eh ADCON1 ADFM ADCS<2:0> — — ADPREF<1:0> 0000 --00 0000 --00
09Fh ADACT — — — ADACT<4:0> ---0 0000 ---0 0000
Legend: x = unknown, u = unchanged, q = depends on condition, - = unimplemented, read as ‘0’, r = reserved. Shaded locations unimplemented, read as ‘0’.
PIC16(L)F15356/75/76/85/86
DS40001866B-page 65
TABLE 4-11: SPECIAL FUNCTION REGISTER SUMMARY BANKS 0-63 (CONTINUED)
2016-2018 Microchip Technology Inc.
Bank 2
10Ch
— — Unimplemented — —
118h
119h RC1REG EUSART Receive Data Register 0000 0000 0000 0000
11Ah TX1REG EUSART Transmit Data Register 0000 0000 0000 0000
11Bh SP1BRGL SP1BRG<7:0> 0000 0000 0000 0000
11Ch SP1BRGH SP1BRG<15:8> 0000 0000 0000 0000
11Dh RC1STA SPEN RX9 SREN CREN ADDEN FERR OERR RX9D 0000 0000 0000 0000
11Eh TX1STA CSRC TX9 TXEN SYNC SENDB BRGH TRMT TX9D 0000 0010 0000 0010
11Fh BAUD1CON ABDOVF RCIDL — SCKP BRG16 — WUE ABDEN 01-0 0-00 01-0 0-00
PIC16(L)F15356/75/76/85/86
Legend: x = unknown, u = unchanged, q = depends on condition, - = unimplemented, read as ‘0’, r = reserved. Shaded locations unimplemented, read as ‘0’.
DS40001866B-page 66
TABLE 4-11: SPECIAL FUNCTION REGISTER SUMMARY BANKS 0-63 (CONTINUED)
2016-2018 Microchip Technology Inc.
Bank 3
18Ch SSP1BUF Synchronous Serial Port Receive Buffer/Transmit Register xxxx xxxx xxxx xxxx
18Dh SSP1ADD ADD<7:0> 0000 0000 0000 0000
18Eh SSP1MSK MSK<7:0> 1111 1111 1111 1111
18Fh SSP1STAT SMP CKE D/A P S R/W UA BF 0000 0000 0000 0000
190h SSP1CON1 WCOL SSPOV SSPEN CKP SSPM3 SSPM2 SSPM1 SSPM0 0000 0000 0000 0000
191h SSP1CON2 GCEN ACKSTAT ACKDT ACKEN RCEN PEN RSEN SEN 0000 0000 0000 0000
192h SSP1CON3 ACKTIM PCIE SCIE BOEN SDAHT SBCDE AHEN DHEN 0000 0000 0000 0000
193h — Unimplemented — —
194h — Unimplemented — —
PIC16(L)F15356/75/76/85/86
195h — Unimplemented — —
196h SSP2BUF Synchronous Serial Port Receive Buffer/Transmit Register xxxx xxxx xxxx xxxx
197h SSP2ADD ADD<7:0> 0000 0000 0000 0000
198h SSP2MSK MSK<7:0> 1111 1111 1111 1111
199h SSP2STAT SMP CKE D/A P S R/W UA BF 0000 0000 0000 0000
19Ah SSP2CON1 WCOL SSPOV SSPEN CKP SSPM3 SSPM2 SSPM1 SSPM0 0000 0000 0000 0000
19Bh SSP2CON2 GCEN ACKSTAT ACKDT ACKEN RCEN PEN RSEN SEN 0000 0000 0000 0000
19Ch SSP2CON3 ACKTIM PCIE SCIE BOEN SDAHT SBCDE AHEN DHEN 0000 0000 0000 0000
19Dh — Unimplemented — —
19Eh — Unimplemented — —
19Fh — Unimplemented — —
Legend: x = unknown, u = unchanged, q = depends on condition, - = unimplemented, read as ‘0’, r = reserved. Shaded locations unimplemented, read as ‘0’.
DS40001866B-page 67
TABLE 4-11: SPECIAL FUNCTION REGISTER SUMMARY BANKS 0-63 (CONTINUED)
2016-2018 Microchip Technology Inc.
Bank 4
20Ch TMR1L Holding Register for the Least Significant Byte of the 16-bit TMR1 Register 0000 0000 uuuu uuuu
20Dh TMR1H Holding Register for the Most Significant Byte of the 16-bit TMR1 Register 0000 0000 uuuu uuuu
20Eh T1CON — — CKPS<1:0> — SYNC RD16 ON --00 -000 --uu -u0u
20Fh T1GCON GE GPOL GTM GSPM GGO/DONE GVAL — — 0000 0x-- uuuu ux--
210h T1GATE — — — GSS<4:0> ---0 0000 ---u uuuu
211h T1CLK — — — — CS<3:0> ---- 0000 ---- uuuu
212h
— — Unimplemented — —
21Fh
Legend: x = unknown, u = unchanged, q = depends on condition, - = unimplemented, read as ‘0’, r = reserved. Shaded locations unimplemented, read as ‘0’.
PIC16(L)F15356/75/76/85/86
DS40001866B-page 68
TABLE 4-11: SPECIAL FUNCTION REGISTER SUMMARY BANKS 0-63 (CONTINUED)
2016-2018 Microchip Technology Inc.
Bank 5
28Ch T2TMR Holding Register for the 8-bit TMR2 Register 0000 0000 0000 0000
28Dh T2PR TMR2 Period Register 1111 1111 1111 1111
28Eh T2CON ON CKPS<2:0> OUTPS<3:0> 0000 0000 0000 0000
28Fh T2HLT PSYNC CKPOL CKSYNC MODE<4:0> 0000 0000 0000 0000
290h T2CLKCON — — — — CS<3:0> ---- 0000 ---- 0000
291h T2RST — — — — RSEL<3:0> ---- 0000 ---- 0000
292h
— — Unimplemented — —
29Fh
Legend: x = unknown, u = unchanged, q = depends on condition, - = unimplemented, read as ‘0’, r = reserved. Shaded locations unimplemented, read as ‘0’.
PIC16(L)F15356/75/76/85/86
DS40001866B-page 69
TABLE 4-11: SPECIAL FUNCTION REGISTER SUMMARY BANKS 0-63 (CONTINUED)
2016-2018 Microchip Technology Inc.
Bank 6
PIC16(L)F15356/75/76/85/86
315h PWM3DCH DC<9:0> xxxx xxxx uuuu uuuu
316h PWM3CON EN — OUT POL — — — — 0-00 ---- 0-00 ----
317h — Unimplemented — —
318h PWM4DCL DC<1:0> — — — — — — xx-- ---- uu-- ----
319h PWM4DCH DC<9:0> xxxx xxxx uuuu uuuu
31Ah PWM4CON EN — OUT POL — — — — 0-00 ---- 0-00 ----
31Bh — Unimplemented — —
31Ch PWM5DCL DC<1:0> — — — — — — xx-- ---- uu-- ----
31Dh PWM5DCH DC<9:0> xxxx xxxx uuuu uuuu
31Eh PWM5CON EN — OUT POL — — — — 0-00 ---- 0-00 ----
31Fh — Unimplemented — —
Legend: x = unknown, u = unchanged, q = depends on condition, - = unimplemented, read as ‘0’, r = reserved. Shaded locations unimplemented, read as ‘0’.
DS40001866B-page 70
TABLE 4-11: SPECIAL FUNCTION REGISTER SUMMARY BANKS 0-63 (CONTINUED)
2016-2018 Microchip Technology Inc.
Bank 7
PIC16(L)F15356/75/76/85/86
DS40001866B-page 71
TABLE 4-11: SPECIAL FUNCTION REGISTER SUMMARY BANKS 0-63 (CONTINUED)
2016-2018 Microchip Technology Inc.
Bank 8-10
x0Ch/
x8Ch
— — Unimplemented
x1Fh/
x9Fh
Legend: x = unknown, u = unchanged, q = depends on condition, - = unimplemented, read as ‘0’, r = reserved. Shaded locations unimplemented, read as ‘0’.
PIC16(L)F15356/75/76/85/86
DS40001866B-page 72
TABLE 4-11: SPECIAL FUNCTION REGISTER SUMMARY BANKS 0-63 (CONTINUED)
2016-2018 Microchip Technology Inc.
Bank 11
PIC16(L)F15356/75/76/85/86
595h — Unimplemented — —
596h — Unimplemented — —
597h — Unimplemented — —
598h — Unimplemented — —
599h — Unimplemented — —
59Ah — Unimplemented — —
59Bh — Unimplemented — —
59Ch TMR0L Holding Register for the Least Significant Byte of the 16-bit TMR0 Register 0000 0000 0000 0000
59Dh TMR0H Holding Register for the Most Significant Byte of the 16-bit TMR0 Register 1111 1111 1111 1111
59Eh T0CON0 T0EN — T0OUT T016BIT T0OUTPS<3:0> 0-00 0000 0-00 0000
59Fh T0CON1 T0CS<2:0> T0ASYNC T0CKPS<3:0> 0000 0000 0000 0000
Legend: x = unknown, u = unchanged, q = depends on condition, - = unimplemented, read as ‘0’, r = reserved. Shaded locations unimplemented, read as ‘0’.
DS40001866B-page 73
TABLE 4-11: SPECIAL FUNCTION REGISTER SUMMARY BANKS 0-63 (CONTINUED)
2016-2018 Microchip Technology Inc.
Bank 12
PIC16(L)F15356/75/76/85/86
615h
— — Unimplemented — —
61Fh
Legend: x = unknown, u = unchanged, q = depends on condition, - = unimplemented, read as ‘0’, r = reserved. Shaded locations unimplemented, read as ‘0’.
DS40001866B-page 74
TABLE 4-11: SPECIAL FUNCTION REGISTER SUMMARY BANKS 0-63 (CONTINUED)
2016-2018 Microchip Technology Inc.
Bank 13
68Ch
— — Unimplemented — —
69Fh
Legend: x = unknown, u = unchanged, q = depends on condition, - = unimplemented, read as ‘0’, r = reserved. Shaded locations unimplemented, read as ‘0’.
PIC16(L)F15356/75/76/85/86
DS40001866B-page 75
TABLE 4-11: SPECIAL FUNCTION REGISTER SUMMARY BANKS 0-63 (CONTINUED)
2016-2018 Microchip Technology Inc.
Bank 14
70Fh PIR3 RC2IF TX2IF RC1IF TX1IF BCL2IF SSP2IF BCL1IF SSP1IF 0000 0000 0000 0000
710h PIR4 — — — — — — TMR2IF TMR1IF ---- --00 ---- --00
711h PIR5 CLC4IF CLC3IF CLC2IF CLC1IF — — — TMR1GIF 0000 ---0 0000 ---0
712h PIR6 — — — — — — CCP2IF CCP1IF ---- --00 ---- --00
713h PIR7 — — NVMIF NCO1IF — — — CWG1IF --00 ---0 --00 ---0
714h — Unimplemented — —
PIC16(L)F15356/75/76/85/86
715h — Unimplemented — —
716h PIE0 — — TMR0IE IOCIE — — — INTE --00 ---0 --00 ---0
717h PIE1 OSFIE CSWIE — — — — — ADIE 00-- --00 00-- --00
718h PIE2 — ZCDIE — — — — C2IE C1IE -0-- --00 -0-- --00
719h PIE3 RC2IE TX2IE RC1IE TX1IE BCL2IE SSP2IE BCL1IE SSP1IE 0000 0000 0000 0000
71Ah PIE4 — — — — — — TMR2IE TMR1IE ---- --00 ---- --00
71Bh PIE5 CLC4IE CLC3IE CLC2IE CLC1IE — — — TMR1GIE 0000 ---0 0000 ---0
71Ch PIE6 — — — — — — CCP2IE CCP1IE ---- --00 ---- --00
71Dh PIE7 — — NVMIE NCO1IE — — — CWG1IE --00 ---0 --00 ---0
71Eh — Unimplemented — —
71Fh — Unimplemented — —
Legend: x = unknown, u = unchanged, q = depends on condition, - = unimplemented, read as ‘0’, r = reserved. Shaded locations unimplemented, read as ‘0’.
DS40001866B-page 76
TABLE 4-11: SPECIAL FUNCTION REGISTER SUMMARY BANKS 0-63 (CONTINUED)
2016-2018 Microchip Technology Inc.
Bank 15
78Ch
— — Unimplemented — —
795h
796h PMD0 SYSCMD FVRMD — — — NVMMD CLKRMD IOCMD 00-- -000 00-- -000
797h PMD1 NCO1MD — — — — TMR2MD TMR1MD TMR0MD 0--- -000 0--- -000
798h PMD2 — DAC1MD ADCMD — — CMP2MD CMP1MD ZCDMD -00- -000 -00- -000
799h PMD3 — — PWM6MD PWM5MD PWM4MD PWM3MD CCP2MD CCP1MD --00 0000 --00 0000
79Ah PMD4 UART2MD UART1MD MSSP2MD MSSP1MD — — — CWG1MD 0000 ---0 0000 ---0
79Bh PMD5 — — — CLC4MD CLC3MD CLC2MD CLC1MD — ---0 000- ---0 000-
79Ch — Unimplemented — —
PIC16(L)F15356/75/76/85/86
79Dh — Unimplemented — —
79Eh — Unimplemented — —
79Fh — Unimplemented — —
Legend: x = unknown, u = unchanged, q = depends on condition, - = unimplemented, read as ‘0’, r = reserved. Shaded locations unimplemented, read as ‘0’.
DS40001866B-page 77
TABLE 4-11: SPECIAL FUNCTION REGISTER SUMMARY BANKS 0-63 (CONTINUED)
2016-2018 Microchip Technology Inc.
Bank 16
PIC16(L)F15356/75/76/85/86
815h — Unimplemented — —
816h — Unimplemented — —
817h — Unimplemented — —
818h — Unimplemented — —
819h — Unimplemented — —
81Ah NVMADRL NVMADR<7:0> xxxx xxxx uuuu uuuu
81Bh NVMADRH — NVMADR<14:8> -xxx xxxx -uuu uuuu
81Ch NVMDATL NVMDAT<7:0> 0000 0000 0000 0000
81Dh NVMDATH — — NVMDAT<13:8> --00 0000 --00 0000
81Eh NVMCON1 — NVMREGS LWLO FREE WRERR WREN WR RD -000 x000 -000 q000
81Fh NVMCON2 NVMCON2<7:0> xxxx xxxx uuuu uuuu
Legend: x = unknown, u = unchanged, q = depends on condition, - = unimplemented, read as ‘0’, r = reserved. Shaded locations unimplemented, read as ‘0’.
Note 1: Present only on PIC16F15356/75/76/85/86.
DS40001866B-page 78
TABLE 4-11: SPECIAL FUNCTION REGISTER SUMMARY BANKS 0-63 (CONTINUED)
2016-2018 Microchip Technology Inc.
Bank 17
88Ch CPUDOZE IDLEN DOZEN ROI DOE — DOZE<2:0> 0000 -000 u000 -000
88Dh OSCCON1 — NOSC<2:0> NDIV<3:0> -qqq 0000 -qqq 0000
88Eh OSCCON2 — COSC<2:0> CDIV<3:0> -qqq qqqq -qqq qqqq
88Fh OSCCON3 CSWHOLD SOSCPWR — ORDY NOSCR — — — 00-0 0--- 00-0 0---
890h OSCSTAT EXTOR HFOR MFOR LFOR SOR ADOR — PLLR q000 qq-0 qqqq qq-q
891h OSCEN EXTOEN HFOEN MFOEN LFOEN SOSCEN ADOEN — — 0000 00-- 0000 00--
892h OSCTUNE — — HFTUN<5:0> --10 0000 --10 0000
893h OSCFRQ — — — — — HFFRQ<2:0> ---- -qqq ---- -qqq
894h — Unimplemented — —
PIC16(L)F15356/75/76/85/86
895h CLKRCON CLKREN — — CLKRDC<1:0> CLKRDIV<2:0> 0--x xxxx 0--u uuuu
896h CLKRCLK — — — — CLKRCLK<3:0> ---- 0000 ---- 0000
897h
— — Unimplemented — —
89Fh
Legend: x = unknown, u = unchanged, q = depends on condition, - = unimplemented, read as ‘0’, r = reserved. Shaded locations unimplemented, read as ‘0’.
DS40001866B-page 79
TABLE 4-11: SPECIAL FUNCTION REGISTER SUMMARY BANKS 0-63 (CONTINUED)
2016-2018 Microchip Technology Inc.
Bank 18
90Ch FVRCON FVREN FVRRDY TSEN TSRNG CDAFVR<1:0> ADFVR<1:0> 0x00 xxxx 0q00 uuuu
90Dh — Unimplemented — —
90Eh DAC1CON0 EN — OE1 OE2 PSS<1:0> — NSS 0-00 00-0 0-00 00-0
90Fh DAC1CON1 — — — DAC1R<4:0> ---0 0000 ---0 0000
910h
— — Unimplemented — —
91Eh
91Fh ZCDCON ZCDSEN — ZCDOUT ZCDPOL — — ZCDINTP ZCDINTN 0-x0 --00 0-x0 --00
Legend: x = unknown, u = unchanged, q = depends on condition, - = unimplemented, read as ‘0’, r = reserved. Shaded locations unimplemented, read as ‘0’.
PIC16(L)F15356/75/76/85/86
DS40001866B-page 80
TABLE 4-11: SPECIAL FUNCTION REGISTER SUMMARY BANKS 0-63 (CONTINUED)
2016-2018 Microchip Technology Inc.
Bank 19
98Ch — Unimplemented — —
98Dh — Unimplemented — —
98Eh — Unimplemented — —
98Fh CMOUT — — — — — — MC2OUT MC1OUT ---- --00 ---- --00
990h CM1CON0 EN OUT — POL — — HYS SYNC 00-0 --00 00-0 --00
991h CM1CON1 — — — — — — INTP INTN ---- --00 ---- --00
992h CM1NCH — — — — — NCH<2:0> ---- -000 ---- -000
993h CM1PCH — — — — — PCH<2:0> ---- -000 ---- -000
994h CM2CON0 EN OUT — POL — — HYS SYNC 00-0 --00 00-0 --00
PIC16(L)F15356/75/76/85/86
995h CM2CON1 — — — — — — INTP INTN ---- --00 ---- --00
996h CM2NCH — — — — — NCH<2:0> ---- -000 ---- -000
997h CM2PCH — — — — — PCH<2:0> ---- -000 ---- -000
998h
— — Unimplemented — —
99Fh
Legend: x = unknown, u = unchanged, q = depends on condition, - = unimplemented, read as ‘0’, r = reserved. Shaded locations unimplemented, read as ‘0’.
DS40001866B-page 81
TABLE 4-11: SPECIAL FUNCTION REGISTER SUMMARY BANKS 0-63 (CONTINUED)
2016-2018 Microchip Technology Inc.
Bank 20
A0Ch
— — Unimplemented — —
A18h
A19h RC2REG RC2REG<7:0> 0000 0000 0000 0000
A1Ah TX2REG TX2REG<7:0> 0000 0000 0000 0000
A1Bh SP2BRGL SP2BRGL<7:0> 0000 0000 0000 0000
A1Ch SP2BRGH SP2BRGH<7:0> 0000 0000 0000 0000
A1Dh RC2STA SPEN RX9 SREN CREN ADDEN FERR OERR RX9D 0000 0000 0000 0000
A1Eh TX2STA CSRC TX9 TXEN SYNC SENDB BRGH TRMT TX9D 0000 0010 0000 0010
A1Fh BAUD2CON ABDOVF RCIDL — SCKP BRG16 — WUE ABDEN 01-0 0-00 01-0 0-00
PIC16(L)F15356/75/76/85/86
Legend: x = unknown, u = unchanged, q = depends on condition, - = unimplemented, read as ‘0’, r = reserved. Shaded locations unimplemented, read as ‘0’.
DS40001866B-page 82
TABLE 4-11: SPECIAL FUNCTION REGISTER SUMMARY BANKS 0-63 (CONTINUED)
2016-2018 Microchip Technology Inc.
Bank 21-59
x0Ch/
x8Ch
— — Unimplemented — —
x1Fh/
x9Fh
Legend: x = unknown, u = unchanged, q = depends on condition, - = unimplemented, read as ‘0’, r = reserved. Shaded locations unimplemented, read as ‘0’.
PIC16(L)F15356/75/76/85/86
DS40001866B-page 83
TABLE 4-11: SPECIAL FUNCTION REGISTER SUMMARY BANKS 0-63 (CONTINUED)
2016-2018 Microchip Technology Inc.
Bank 60
1E0Ch — Unimplemented — —
1E0Dh — Unimplemented — —
1E0Eh — Unimplemented — —
1E0Fh CLCDATA — — — — MLC4OUT MLC3OUT MLC2OUT MLC1OUT ---- xxxx ---- uuuu
1E10h CLCCON LC1EN — LC1OUT LC1INTP LC1INTN LC1MODE<2:0> 0-00 0000 0-00 0000
1E11h CLC1POL LC1POL — — — LC1G4POL LC1G3POL LC1G2POL LC1G1POL 0--- xxxx 0--- uuuu
1E12h CLC1SEL0 — — LC1D1S<5:0> --xx xxxx --uu uuuu
1E13h CLC1SEL1 — — LC1D2S<5:0> --xx xxxx --uu uuuu
1E14h CLC1SEL2 — — LC1D3S<5:0> --xx xxxx --uu uuuu
PIC16(L)F15356/75/76/85/86
1E15h CLC1SEL3 — — LC1D4S<5:0> --xx xxxx --uu uuuu
1E16h CLC1GLS0 LC1G1D4T LC1G4D3N LC1G1D3T LC1G1D3N LC1G1D2T LC1G1D2N LC1G1D1T LC1G1D1N xxxx xxxx uuuu uuuu
1E17h CLC1GLS1 LC1G2D4T LC1G4D3N LC1G2D3T LC1G2D3N LC1G2D2T LC1G2D2N LC1G2D1T LC1G2D1N xxxx xxxx uuuu uuuu
1E18h CLC1GLS2 LC1G3D4T LC1G4D3N LC1G3D3T LC1G3D3N LC1G3D2T LC1G3D2N LC1G3D1T LC1G3D1N xxxx xxxx uuuu uuuu
1E19h CLC1GLS3 LC1G4D4T LC1G4D3N LC1G4D3T LC1G4D3N LC1G4D2T LC1G4D2N LC1G4D1T LC1G4D1N xxxx xxxx uuuu uuuu
1E1Ah CLC2CON LC2EN — LC2OUT LC2INTP LC2INTN LC2MODE<2:0> 0-00 0000 0-00 0000
1E1Bh CLC2POL LC2POL — — — LC2G4POL LC2G3POL LC2G2POL LC2G1POL 0--- xxxx 0--- uuuu
1E1Ch CLC2SEL0 — — LC2D1S<5:0> --xx xxxx --uu uuuu
1E1Dh CLC2SEL1 — — LC2D2S<5:0> --xx xxxx --uu uuuu
1E1Eh CLC2SEL2 — — LC2D3S<5:0> --xx xxxx --uu uuuu
1E1Fh CLC2SEL3 — — LC2D4S<5:0> --xx xxxx --uu uuuu
1E20h CLC2GLS0 LC2G1D4T LC2G4D3N LC2G1D3T LC2G1D3N LC2G1D2T LC2G1D2N LC2G1D1T LC2G1D1N xxxx xxxx uuuu uuuu
1E21h CLC2GLS1 LC2G2D4T LC2G4D3N LC2G2D3T LC2G2D3N LC2G2D2T LC2G2D2N LC2G2D1T LC2G2D1N xxxx xxxx uuuu uuuu
1E22h CLC2GLS2 LC2G3D4T LC2G4D3N LC2G3D3T LC2G3D3N LC2G3D2T LC2G3D2N LC2G3D1T LC2G3D1N xxxx xxxx uuuu uuuu
1E23h CLC2GLS3 LC2G4D4T LC2G4D3N LC2G4D3T LC2G4D3N LC2G4D2T LC2G4D2N LC2G4D1T LC2G4D1N xxxx xxxx uuuu uuuu
1E24h CLC3CON LC3EN — LC3OUT LC3INTP LC3INTN LC3MODE 0-00 0000 0-00 0000
1E25h CLC3POL LC3POL — — — LC3G4POL LC3G3POL LC3G2POL LC3G1POL 0--- xxxx 0--- uuuu
DS40001866B-page 84
Bank 60 (Continued)
1E2Bh CLC3GLS1 LC3G2D4T LC3G4D3N LC3G2D3T LC3G2D3N LC3G2D2T LC3G2D2N LC3G2D1T LC3G2D1N xxxx xxxx uuuu uuuu
1E2Ch CLC3GLS2 LC3G3D4T LC3G4D3N LC3G3D3T LC3G3D3N LC3G3D2T LC3G3D2N LC3G3D1T LC3G3D1N xxxx xxxx uuuu uuuu
1E2Dh CLC3GLS3 LC3G4D4T LC3G4D3N LC3G4D3T LC3G4D3N LC3G4D2T LC3G4D2N LC3G4D1T LC3G4D1N xxxx xxxx uuuu uuuu
1E2Eh CLC4CON LC4EN — LC4OUT LC4INTP LC4INTN LC4MODE<2:0> 0-00 0000 0-00 0000
1E2Fh CLC4POL LC4POL — — — LC4G4POL LC4G3POL LC4G2POL LC4G1POL 0--- xxxx 0--- uuuu
1E30h CLC4SEL0 — — LC4D1S<5:0> --xx xxxx --uu uuuu
1E31h CLC4SEL1 — — LC4D2S<5:0> --xx xxxx --uu uuuu
1E32h CLC4SEL2 — — LC4D3S<5:0> --xx xxxx --uu uuuu
1E33h CLC4SEL3 — — LC4D4S<5:0> --xx xxxx --uu uuuu
1E34h CLC4GLS0 LC4G1D4T LC4G4D3N LC4G1D3T LC4G1D3N LC4G1D2T LC4G1D2N LC4G1D1T LC4G1D1N xxxx xxxx uuuu uuuu
1E35h CLC4GLS1 LC4G2D4T LC4G4D3N LC4G2D3T LC4G2D3N LC4G2D2T LC4G2D2N LC4G2D1T LC4G2D1N xxxx xxxx uuuu uuuu
1E36h CLC4GLS2 LC4G3D4T LC4G4D3N LC4G3D3T LC4G3D3N LC4G3D2T LC4G3D2N LC4G3D1T LC4G3D1N xxxx xxxx uuuu uuuu
PIC16(L)F15356/75/76/85/86
1E37h CLC4GLS3 LC4G4D4T LC4G4D3N LC4G4D3T LC4G4D3N LC4G4D2T LC4G4D2N LC4G4D1T LC4G4D1N xxxx xxxx uuuu uuuu
1E38h RF0PPS(1) — — — RF0PPS<4:0> ---0 0000 ---u uuuu
1E39h RF1PPS(1) — — — RF1PPS<4:0> ---0 0000 ---u uuuu
1E3Ah RF2PPS(1) — — — RF2PPS<4:0> ---0 0000 ---u uuuu
1E3Bh RF3PPS(1) — — — RF3PPS<4:0> ---0 0000 ---u uuuu
1E3Ch RF4PPS(1) — — — RF4PPS<4:0> ---0 0000 ---u uuuu
1E3Dh RF5PPS(1) — — — RF5PPS<4:0> ---0 0000 ---u uuuu
1E3Eh RF6PPS(1) — — — RF6PPS<4:0> ---0 0000 ---u uuuu
1E3Fh RF7PPS(1) — — — RF7PPS<4:0> ---0 0000 ---u uuuu
1E40h
— — Unimplemented — —
1E4Fh
1E50h ANSELF(1) ANSF7 ANSF6 ANSF5 ANSF4 ANSF3 ANSF2 ANSF1 ANSF0 1111 1111 1111 1111
1E51h WPUF(1) WPUF7 WPUF6 WPUF5 WPUF4 WPUF3 WPUF2 WPUF1 WPUF0 0000 0000 0000 0000
1E52h ODCONF(1) ODCF7 ODCF6 ODCF5 ODCF4 ODCF3 ODCF2 ODCF1 ODCFCF0 0000 0000 0000 0000
1E53h SLRCONF(1) SLRF7 SLRF6 SLRF5 SLRF4 SLRF3 SLRF2 SLRF1 SLRF0 1111 1111 1111 1111
1E54h INLVLF(1) INLVLF7 INLVLF6 INLVLF5 INLVLF4 INLVLF3 INLVLF2 INLVLF1 INLVLF0 1111 1111 1111 1111
DS40001866B-page 85
1E55h
— — Unimplemented — —
1E6Fh
Legend: x = unknown, u = unchanged, q = depends on condition, - = unimplemented, read as ‘0’, r = reserved. Shaded locations unimplemented, read as ‘0’.
Note 1: Present only on PIC16(L)F15385/86.
TABLE 4-11: SPECIAL FUNCTION REGISTER SUMMARY BANKS 0-63 (CONTINUED)
2016-2018 Microchip Technology Inc.
Bank 61
1E8Ch — Unimplemented — —
1E8Dh — Unimplemented — —
1E8Eh — Unimplemented — —
1E8Fh PPSLOCK — — — — — — — PPSLOCKED ---- ---0 ---- ---0
1E90h INTPPS — — INTPPS<5:0> --00 1000 --uu uuuu
1E91h T0CKIPPS — — T0CKIPPS<5:0> --00 0100 --uu uuuu
1E92h T1CKIPPS — — T1CKIPPS<5:0> --01 0000 --uu uuuu
1E93h T1GPPS — — T1GPPS<5:0> --00 1101 --uu uuuu
1E94h
— — Unimplemented — —
PIC16(L)F15356/75/76/85/86
1E9Bh
1E9Ch T2INPPS — — T2INPPS<5:0> --01 0011 --uu uuuu
1E9Dh
— — Unimplemented — —
1EA0h
1EA1h CCP1PPS — — CCP1PPS<5:0> --01 0010 --uu uuuu
1EA2h CCP2PPS — — CCP2PPS<5:0> --01 0001 --uu uuuu
1EA3h
— — Unimplemented — —
1EB0h
1EB1h CWG1PPS — — CWG1PPS<5:0> --00 1000 --uu uuuu
1EB2h
— — Unimplemented — —
1EBAh
1EBBh CLCIN0PPS — — CLCIN0PPS<5:0> --00 0000 --uu uuuu
1EBCh CLCIN1PPS — — CLCIN1PPS<5:0> --00 0001 --uu uuuu
1EBDh CLCIN2PPS — — CLCIN2PPS<5:0> --00 1110 --uu uuuu
1EBEh CLCIN3PPS — — CLCIN3PPS<5:0> --00 1111 --uu uuuu
1EBFh
— — Unimplemented — —
1EC2h
DS40001866B-page 86
Bank 61 (Continued)
1EC5h SSP1CLKPPS — — SSP1CLKPPS<5:0> --01 0011 --uu uuuu
1EC6h SSP1DATPPS — — SSP1DATPPS<5:0> --01 0100 --uu uuuu
1EC7h SSP1SSPPS — — SSP1SSPPS<5:0> --00 0101 --uu uuuu
1EC8h SSP2CLKPPS — — SSP2CLKPPS<5:0> --00 1001 --uu uuuu
1EC9h SSP2DATPPS — — SSP2DATPPS<5:0> --00 1000 --uu uuuu
1ECAh SSP2SSPPS — — SSP2SSPPS<5:0> --00 1000 --uu uuuu
1ECBh RX1DTPPS — — RX1DTPPS<5:0> --01 0111 --uu uuuu
1ECCh TX1CKPPS — — TX1CKPPS<5:0> --01 0110 --uu uuuu
1ECDh RX2DTPPS — — RX2DTPPS<5:0> --00 1111 --uu uuuu
1ECEh TX2CKPPS — — TX2CKPPS<5:0> --00 1110 --uu uuuu
1ECFh
— — Unimplemented — —
PIC16(L)F15356/75/76/85/86
1EEFh
Legend: x = unknown, u = unchanged, q = depends on condition, - = unimplemented, read as ‘0’, r = reserved. Shaded locations unimplemented, read as ‘0’.
DS40001866B-page 87
TABLE 4-11: SPECIAL FUNCTION REGISTER SUMMARY BANKS 0-63 (CONTINUED)
2016-2018 Microchip Technology Inc.
Bank 62
1F0Ch — Unimplemented — —
1F0Dh — Unimplemented — —
1F0Eh — Unimplemented — —
1F0Fh — Unimplemented — —
1F10h RA0PPS — — — RA0PPS<4:0> ---0 0000 ---u uuuu
1F11h RA1PPS — — — RA1PPS<4:0> ---0 0000 ---u uuuu
1F12h RA2PPS — — — RA2PPS<4:0> ---0 0000 ---u uuuu
1F13h RA3PPS — — — RA3PPS<4:0> ---0 0000 ---u uuuu
1F14h RA4PPS — — — RA4PPS<4:0> ---0 0000 ---u uuuu
1F15h RA5PPS — — — RA5PPS<4:0> ---0 0000 ---u uuuu
PIC16(L)F15356/75/76/85/86
1F16h RA6PPS — — — RA6PPS<4:0> ---0 0000 ---u uuuu
1F17h RA7PPS — — — RA7PPS<4:0> ---0 0000 ---u uuuu
1F18h RB0PPS — — — RB0PPS<4:0> ---0 0000 ---u uuuu
1F19h RB1PPS — — — RB1PPS<4:0> ---0 0000 ---u uuuu
1F1Ah RB2PPS — — — RB2PPS<4:0> ---0 0000 ---u uuuu
1F1Bh RB3PPS — — — RB3PPS<4:0> ---0 0000 ---u uuuu
1F1Ch RB4PPS — — — RB4PPS<4:0> ---0 0000 ---u uuuu
1F1Dh RB5PPS — — — RB5PPS<4:0> ---0 0000 ---u uuuu
1F1Eh RB6PPS — — — RB6PPS<4:0> ---0 0000 ---u uuuu
1F1Fh RB7PPS — — — RB7PPS<4:0> ---0 0000 ---u uuuu
1F20h RC0PPS — — — RC0PPS<4:0> ---0 0000 ---u uuuu
1F21h RC1PPS — — — RC1PPS<4:0> ---0 0000 ---u uuuu
1F22h RC2PPS — — — RC2PPS<4:0> ---0 0000 ---u uuuu
1F23h RC3PPS — — — RC3PPS<4:0> ---0 0000 ---u uuuu
1F24h RC4PPS — — — RC4PPS<4:0> ---0 0000 ---u uuuu
1F25h RC5PPS — — — RC5PPS<4:0> ---0 0000 ---u uuuu
1F26h RC6PPS — — — RC6PPS<4:0> ---0 0000 ---u uuuu
DS40001866B-page 88
Bank 62 (Continued)
1F2Ah RD2PPS(1) — — — RD2PPS<4:0> ---0 0000 ---u uuuu
1F2Bh RD3PPS(1) — — — RD3PPS<4:0> ---0 0000 ---u uuuu
1F2Ch RD4PPS(1) — — — RD4PPS<4:0> ---0 0000 ---u uuuu
1F2Dh RD5PPS(1) — — — RD5PPS<4:0> ---0 0000 ---u uuuu
1F2Eh RD6PPS(1) — — — RD6PPS<4:0> ---0 0000 ---u uuuu
1F2Fh RD7PPS(1) — — — RD7PPS<4:0> ---0 0000 ---u uuuu
1F30h RE0PPS(1) — — — RE0PPS<4:0> ---0 0000 ---u uuuu
1F31h RE1PPS(1) — — — RE1PPS<4:0> ---0 0000 ---u uuuu
1F32h RE2PPS(1) — — — RE2PPS<4:0> ---0 0000 ---u uuuu
1F33h
— — Unimplemented — —
1F37h
PIC16(L)F15356/75/76/85/86
Legend: x = unknown, u = unchanged, q = depends on condition, - = unimplemented, read as ‘0’, r = reserved. Shaded locations unimplemented, read as ‘0’.
Note 1: Present only on PIC16(L)F15375/76/85/86.
DS40001866B-page 89
TABLE 4-11: SPECIAL FUNCTION REGISTER SUMMARY BANKS 0-63 (CONTINUED)
2016-2018 Microchip Technology Inc.
Bank 62 (Continued)
1F38h ANSELA ANSA7 ANSA6 ANSA5 ANSA4 ANSA3 ANSA2 ANSA1 ANSA0 1111 1111 1111 1111
1F39h WPUA WPUA7 WPUA6 WPUA5 WPUA4 WPUA3 WPUA2 WPUA1 WPUA0 0000 0000 0000 0000
1F3Ah ODCONA ODCA7 ODCA6 ODCA5 ODCA4 ODCA3 ODCA2 ODCA1 ODCA0 0000 0000 0000 0000
1F3Bh SLRCONA SLRA7 SLRA6 SLRA5 SLRA4 SLRA3 SLRA2 SLRA1 SLRA0 1111 1111 1111 1111
1F3Ch INLVLA INLVLA7 INLVLA6 INLVLA5 INLVLA4 INLVLA3 INLVLA2 INLVLA1 INLVLA0 1111 1111 1111 1111
1F3Dh IOCAP IOCAP7 IOCAP6 IOCAP5 IOCAP4 IOCAP3 IOCAP2 IOCAP1 IOCAP0 0000 0000 0000 0000
1F3Eh IOCAN IOCAN7 IOCAN6 IOCAN5 IOCAN4 IOCAN3 IOCAN2 IOCAN1 IOCAN0 0000 0000 0000 0000
1F3Fh IOCAF IOCAF7 IOCAF6 IOCAF5 IOCAF4 IOCAF3 IOCAF2 IOCAF1 IOCAF0 0000 0000 0000 0000
1F40h
— — Unimplemented — —
1F42h
1F43h ANSELB ANSB7 ANSB6 ANSB5 ANSB4 ANSB3 ANSB2 ANSB1 ANSB0 1111 1111 1111 1111
PIC16(L)F15356/75/76/85/86
1F44h WPUB WPUB7 WPUB6 WPUB5 WPUB4 WPUB3 WPUB2 WPUB1 WPUB0 0000 0000 0000 0000
1F45h ODCONB ODCB7 ODCB6 ODCB5 ODCB4 ODCB3 ODCB2 ODCB1 ODCB0 0000 0000 0000 0000
1F46h SLRCONB SLRB7 SLRB6 SLRB5 SLRB4 SLRB3 SLRB2 SLRB1 SLRB0 1111 1111 1111 1111
1F47h INLVLB INLVLB7 INLVLB6 INLVLB5 INLVLB4 INLVLB3 INLVLB2 INLVLB1 INLVLB0 1111 1111 1111 1111
1F48h IOCBP IOCBP7 IOCBP6 IOCBP5 IOCBP4 IOCBP3 IOCBP2 IOCBP1 IOCBP0 0000 0000 0000 0000
1F49h IOCBN IOCBN7 IOCBN6 IOCBN5 IOCBN4 IOCBN3 IOCBN2 IOCBN1 IOCBN0 0000 0000 0000 0000
1F4Ah IOCBF IOCBF7 IOCBF6 IOCBF5 IOCBF4 IOCBF3 IOCBF2 IOCBF1 IOCBF0 0000 0000 0000 0000
1F4Bh
— — Unimplemented — —
1F4Dh
Legend: x = unknown, u = unchanged, q = depends on condition, - = unimplemented, read as ‘0’, r = reserved. Shaded locations unimplemented, read as ‘0’.
DS40001866B-page 90
TABLE 4-11: SPECIAL FUNCTION REGISTER SUMMARY BANKS 0-63 (CONTINUED)
2016-2018 Microchip Technology Inc.
Bank 62 (Continued)
1F4Eh ANSELC ANSC7 ANSC6 ANSC5 ANSC4 ANSC3 ANSC2 ANSC1 ANSC0 1111 1111 1111 1111
1F4Fh WPUC WPUC7 WPUC6 WPUC5 WPUC4 WPUC3 WPUC2 WPUC1 WPUC0 0000 0000 0000 0000
1F50h ODCONC ODCC7 ODCC6 ODCC5 ODCC4 ODCC3 ODCC2 ODCC1 ODCC0 0000 0000 0000 0000
1F51h SLRCONC SLRC7 SLRC6 SLRC5 SLRC4 SLRC3 SLRC2 SLRC1 SLRC0 1111 1111 1111 1111
1F52h INLVLC INLVLC7 INLVLC6 INLVLC5 INLVLC4 INLVLC3 INLVLC2 INLVLC1 INLVLC0 1111 1111 1111 1111
1F53h IOCCP IOCCP7 IOCCP6 IOCCP5 IOCCP4 IOCCP3 IOCCP2 IOCCP1 IOCCP0 0000 0000 0000 0000
1F54h IOCCN IOCCN7 IOCCN6 IOCCN5 IOCCN4 IOCCN3 IOCCN2 IOCCN1 IOCCN0 0000 0000 0000 0000
1F55h IOCCF IOCCF7 IOCCF6 IOCCF5 IOCCF4 IOCCF3 IOCCF2 IOCCF1 IOCCF0 0000 0000 0000 0000
1F56h
— — Unimplemented — —
1F58h
1F59h ANSELD(1) ANSD7 ANSD6 ANSD5 ANSD4 ANSD3 ANSD2 ANSD1 ANSD0 1111 1111 1111 1111
WPUD(1)
PIC16(L)F15356/75/76/85/86
1F5Ah WPUD7 WPUD6 WPUD5 WPUD4 WPUD3 WPUD2 WPUD1 WPUD0 0000 0000 0000 0000
1F5Bh ODCOND(1) ODCD7 ODCD6 ODCD5 ODCD4 ODCD3 ODCD2 ODCD1 ODCD0 0000 0000 0000 0000
1F5Ch SLRCOND(1) SLRD7 SLRD6 SLRD5 SLRD4 SLRD3 SLRD2 SLRD1 SLRD0 1111 1111 1111 1111
1F5Dh INLVLD(1) INLVLD7 INLVLD6 INLVLD5 INLVLD4 INLVLD3 INLVLD2 INLVLD1 INLVLD0 1111 1111 1111 1111
1F5Eh
— — Unimplemented — —
1F63h
(1)
1F64h ANSELE — — — — — ANSE2 ANSE1 ANSE0 ---- -111 ---- -uuu
1F65h WPUE — — — — WPUE3 WPUE2(1) WPUE1(1) WPUE0(1) ---- 0000 ---- uuuu
1F66h ODCONE(1) — — — — — ODCE2 ODCE1 ODCE0 ---- -000 ---- -000
1F67h SLRCONE(1) — — — — — SLRE2 SLRE1 SLRE0 ---- -111 ---- -111
1F68h INLVLE — — — — INLVLE3 INLVLE2(1) INLVLE1(1) INLVLE0(1) ---- 1111 ---- uuuu
1F69h IOCEP — — — — IOCEP3 IOCEP2(1) IOCEP1(1) IOCEP0(1) ---- 0000 ---- 0000
1F6Ah IOCEN — — — — IOCEN3 IOCEN2(1) IOCEN1(1) IOCEN0(1) ---- 0000 ---- 0000
1F6Bh IOCEF — — — — IOCEF3 IOCEF2(1) IOCEF1(1) IOCEF0(1) ---- 0000 ---- 0000
1F6Ch
— — Unimplemented — —
1F6Fh
Legend: x = unknown, u = unchanged, q = depends on condition, - = unimplemented, read as ‘0’, r = reserved. Shaded locations unimplemented, read as ‘0’.
DS40001866B-page 91
Bank 63
1F8Ch
— — Unimplemented — —
1FE3h
1FE4h STATUS_SHAD — — — — — Z DC C ---- -xxx ---- -uuu
1FE5h WREG_SHAD Working Register Shadow xxxx xxxx uuuu uuuu
1FE6h BSR_SHAD — — — Bank Select Register Shadow ---x xxxx ---u uuuu
1FE7h PCLATH_SHAD — Program Counter Latch High Register Shadow -xxx xxxx uuuu uuuu
1FE8h FSR0L_SHAD Indirect Data Memory Address 0 Low Pointer Shadow xxxx xxxx uuuu uuuu
1FE9h FSR0H_SHAD Indirect Data Memory Address 0 High Pointer Shadow xxxx xxxx uuuu uuuu
1FEAh FSR1L_SHAD Indirect Data Memory Address 1 Low Pointer Shadow xxxx xxxx uuuu uuuu
PIC16(L)F15356/75/76/85/86
1FEBh FSR1H_SHAD Indirect Data Memory Address 1 High Pointer Shadow xxxx xxxx uuuu uuuu
1FECh — Unimplemented — —
1FEDh STKPTR — — — Current Stack Pointer ---1 1111 ---1 1111
1FEEh TOSL Top of Stack Low byte xxxx xxxx uuuu uuuu
1FEFh TOSH — Top of Stack High byte -xxx xxxx -uuu uuuu
Legend: x = unknown, u = unchanged, q = depends on condition, - = unimplemented, read as ‘0’, r = reserved. Shaded locations unimplemented, read as ‘0’.
DS40001866B-page 92
PIC16(L)F15356/75/76/85/86
4.4 PCL and PCLATH 4.4.2 COMPUTED GOTO
The Program Counter (PC) is 15 bits wide. The low byte A computed GOTO is accomplished by adding an offset to
comes from the PCL register, which is a readable and the program counter (ADDWF PCL). When performing a
writable register. The high byte (PC<14:8>) is not directly table read using a computed GOTO method, care should
readable or writable and comes from PCLATH. On any be exercised if the table location crosses a PCL memory
Reset, the PC is cleared. Figure 4-4 shows the five boundary (each 256-byte block). Refer to Application
situations for the loading of the PC. Note AN556, “Implementing a Table Read” (DS00556).
Rev. 10-000043A
7/30/2013
0x0F
0x0E
0x0D
0x0C
0x0B
0x0A
0x09 This figure shows the stack configuration
after the first CALL or a single interrupt.
0x08 If a RETURN instruction is executed, the
0x07 return address will be placed in the
Program Counter and the Stack Pointer
0x06 decremented to the empty state (0x1F).
0x05
0x04
0x03
0x02
0x01
TOSH:TOSL 0x00 Return Address STKPTR = 0x00
Rev. 10-000043C
7/30/2013
0x0F
0x0E
0x0D
0x0C
After seven CALLs or six CALLs and an
0x0B interrupt, the stack looks like the figure on
the left. A series of RETURN instructions will
0x0A
repeatedly place the return addresses into
0x09 the Program Counter and pop the stack.
0x08
0x07
TOSH:TOSL 0x06 Return Address STKPTR = 0x06
Rev. 10-000044C
9/16/2016
0x0000 0x0000
Traditional
Data Memory
0x1FFF
0x2000
Linear
Data Memory
0X2FEF
0X2FF0
Reserved
0x7FFF
FSR
0x8000 PC value = 0x0000
Address
Range
Program
Flash Memory
0x0000 0x0000
Traditional
Data Memory
0x1FFF
0x2000
Linear
Data Memory
0X2FEF
0X2FF0
Reserved
0x7FFF
FSR
0x8000 PC value = 0x0000
Address
Range
Program
Flash Memory
From Opcode
5 BSR 0 6 0 7 FSRxH 0 7 FSRxL 0
0 0 0
0x7F
Bank 0 Bank 1 Bank 2 Bank 63
Location Select
0x2000
0x020
Bank 0
0x06F
0x7FFF
0x0A0 0xFFFF
Bank 1
0x0EF
0x120
Bank 2
0x16F
0x1920
Bank 50
0x196F
0x2FEF
Legend:
R = Readable bit P = Programmable bit x = Bit is unknown U = Unimplemented bit, read as
‘1’
‘0’ = Bit is cleared ‘1’ = Bit is set W = Writable bit n = Value when blank or after Bulk
Erase
Legend:
R = Readable bit P = Programmable bit x = Bit is unknown U = Unimplemented bit, read as
‘1’
‘0’ = Bit is cleared ‘1’ = Bit is set W = Writable bit n = Value when blank or after Bulk
Erase
bit 13 DEBUG: Debugger Enable bit
1 = Background debugger disabled
0 = Background debugger enabled
bit 12 STVREN: Stack Overflow/Underflow Reset Enable bit
1 = Stack Overflow or Underflow will cause a Reset
0 = Stack Overflow or Underflow will not cause a Reset
bit 11 PPS1WAY: PPSLOCK One-Way Set Enable bit
1 = The PPSLOCK bit can be cleared and set only once; PPS registers remain locked after one clear/set cycle
0 = The PPSLOCK bit can be set and cleared repeatedly (subject to the unlock sequence)
bit 10 ZCDDIS: Zero-Cross Detect Disable bit
1 = ZCD disabled. ZCD can be enabled by setting the ZCDSEN bit of the ZCDCON register
0 = ZCD always enabled (ZCDSEN bit is ignored)
bit 9 BORV: Brown-out Reset Voltage Selection bit(1)
1 = Brown-out Reset voltage (VBOR) set to lower trip point level
0 = Brown-out Reset voltage (VBOR) set to higher trip point level
bit 8 Unimplemented: Read as ‘1’
bit 7-6 BOREN<1:0>: Brown-out Reset Enable bits
When enabled, Brown-out Reset Voltage (VBOR) is set by the BORV bit
11 = Brown-out Reset is enabled; SBOREN bit is ignored
10 = Brown-out Reset is enabled while running, disabled in Sleep; SBOREN bit is ignored
01 = Brown-out Reset is enabled according to SBOREN
00 = Brown-out Reset is disabled
bit 5 LPBOREN: Low-Power BOR Enable bit
1 = ULPBOR is disabled
0 = ULPBOR is enabled
bit 4-2 Unimplemented: Read as ‘1’
bit 1 PWRTE: Power-up Timer Enable bit
1 = PWRT is disabled
0 = PWRT is enabled
bit 0 MCLRE: Master Clear (MCLR) Enable bit
If LVP = 1:
RE3 pin function is MCLR (it will reset the device when driven low)
If LVP = 0:
1 = MCLR pin is MCLR (it will reset the device when driven low)
0 = MCLR pin may be used as general purpose RE3 input
Note 1: See Vbor parameter for specific trip point voltages.
2: The DEBUG bit in Configuration Words is managed automatically by device development tools including debuggers
and programmers. For normal device operation, this bit should be maintained as a ‘1’.
Legend:
R = Readable bit P = Programmable bit x = Bit is unknown U = Unimplemented bit, read as ‘1’
‘0’ = Bit is cleared ‘1’ = Bit is set W = Writable bit n = Value when blank or after Bulk
Erase
WDTWS at POR
Software Keyed
WDTCWS Window control of access
Window delay
Value opening WDTWS? required?
Percent of time
Percent of time
111 111 n/a 100 Yes No
110 111 n/a 100
101 101 25 75
100 100 37.5 62.5
011 011 50 50 No Yes
010 010 62.5 37.5
001 001 75 25
000 000 87.5 12.5
WDTPS at POR
Software Control
WDTCPS Typical Time Out
Value Divider Ratio of WDTPS?
(FIN = 31 kHz)
11111(1) 01011 1:65536 216 2s Yes
11110 11110
... ... 1:32 25 1 ms No
10011 10011
10010 10010 1:8388608 223 256 s
10001 10001 1:4194304 222 128 s
10000 10000 1:2097152 221 64 s
01111 01111 1:1048576 220 32 s
01110 01110 1:524299 219 16 s
01101 01101 1:262144 218 8s
01100 01100 1:131072 217 4s
01011 01011 1:65536 216 2s
01010 01010 1:32768 215 1s
01001 01001 1:16384 214 512 ms No
01000 01000 1:8192 213 256 ms
00111 00111 1:4096 212 128 ms
00110 00110 1:2048 211 64 ms
00101 00101 1:1024 210 32 ms
00100 00100 1:512 29 16 ms
00011 00011 1:256 28 8 ms
00010 00010 1:128 27 4 ms
00001 00001 1:64 26 2 ms
00000 00000 1:32 25 1 ms
Legend:
R = Readable bit P = Programmable bit x = Bit is unknown U = Unimplemented bit, read
as ‘1’
‘0’ = Bit is cleared ‘1’ = Bit is set W = Writable bit n = Value when blank or after
Bulk Erase
Note 1: Bits are implemented as sticky bits. Once protection is enabled, it can only be reset through a Bulk Erase.
Legend:
R = Readable bit P = Programmable bit x = Bit is unknown U = Unimplemented bit, read as ‘1’
‘0’ = Bit is cleared ‘1’ = Bit is set W = Writable bit n = Value when blank or after Bulk
Erase
5.5 User ID
Four memory locations (8000h-8003h) are designated
as ID locations where the user can store checksum or
other code identification numbers. These locations are
readable and writable during normal execution. See
Section 13.3.6 “NVMREG Access to Device
Information Area, Device Configuration Area, User
ID, Device ID and Configuration Words” for more
information on accessing these memory locations. For
more information on checksum calculation, see the
“PIC16(L)F153xx Memory Programming Specification”
(DS40001838).
R R R R R R R R
DEV<7:0>
bit 7 bit 0
Legend:
R = Readable bit
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit
‘0’ = Bit is cleared ‘1’ = Bit is set x = Bit is unknown
Stack Underflow
Stack Overflow
VPP/MCLR MCLRE
WWDT Time-out/
Window violation Device
Reset
Power-on
Reset
VDD
Brown-out
R
Reset(1) Power-up
Timer
LFINTOSC
PWRTE
LPBOR
Reset
VDD
VBOR
Internal
Reset TPWRT(1)
VDD
VBOR
VDD
VBOR
Internal
Reset TPWRT(1)
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared q = Value depends on condition
VDD
Internal POR
TPWRT
Power-up Timer
MCLR
Internal RESET
Int. Oscillator
FOSC
Begin Execution code execution (1) code execution (1)
VDD
Internal POR
TPWRT
Power-up Timer
MCLR
Internal RESET
Ext. Clock (EC)
FOSC
Begin Execution
code execution (1) code execution (1)
External Clock (EC modes), PWRTEN = 0 External Clock (EC modes), PWRTEN = 1
Note 1: Code execution begins 10 FOSC cycles after the FOSC clock is released.
RMCLR
STOVF
MEMV
RWDT
BOR
POR
PD
TO
Condition
RI
0 0 1 1 1 0 x 1 1 1 Power-on Reset
0 0 1 1 1 0 x 0 x u Illegal, TO is set on POR
0 0 1 1 1 0 x x 0 u Illegal, PD is set on POR
0 0 u 1 1 u 0 1 1 u Brown-out Reset
u u 0 u u u u 0 u u WWDT Reset
u u u u u u u 0 0 u WWDT Wake-up from Sleep
u u u u u u u 1 0 u Interrupt Wake-up from Sleep
u u u 0 u u u u u 1 MCLR Reset during normal operation
u u u 0 u u u 1 0 u MCLR Reset during Sleep
u u u u 0 u u u u u RESET Instruction Executed
1 u u u u u u u u u Stack Overflow Reset (STVREN = 1)
u 1 u u u u u u u u Stack Underflow Reset (STVREN = 1)
u u u u u u u u u 0 Memory violation Reset
Legend:
HC = Bit is cleared by hardware HS = Bit is set by hardware
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -m/n = Value at POR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared q = Value depends on condition
Legend:
HC = Bit is cleared by hardware
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -m/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared q = Value depends on condition
Rev. 10-000208J
12/13/2016
CLKIN
External
Oscillator
(EXTOSC)
CLKOUT
CDIV<4:0>
4x PLL Mode
COSC<2:0>
SOSCIN/SOSCI
PIC16(L)F15356/75/76/85/86
128 Sleep
001 0111
HFFRQ<2:0>
1 – 32 MHz
MFINTOSC FSCM
Oscillator
To Peripherals
To Peripherals
DS40001866B-page 127
500 kHz
To Peripherals
31.25 kHz
To Peripherals
To Peripherals
PIC16(L)F15356/75/76/85/86
9.2 Clock Source Types The Oscillator Start-up Timer (OST) is disabled when
EC mode is selected. Therefore, there is no delay in
Clock sources can be classified as external or internal. operation after a Power-on Reset (POR) or wake-up
External clock sources rely on external circuitry for the from Sleep. Because the PIC® MCU design is fully
clock source to function. Examples are: oscillator static, stopping the external clock input will have the
modules (ECH, ECM, ECL mode), quartz crystal effect of halting the device while leaving all data intact.
resonators or ceramic resonators (LP, XT and HS Upon restarting the external clock, the device will
modes). resume operation as if no time had elapsed.
There is also a secondary oscillator block which is
optimized for a 32.768 kHz external clock source, FIGURE 9-2: EXTERNAL CLOCK (EC)
which can be used as an alternate clock source. MODE OPERATION
There are two internal oscillator blocks:
Clock from CLKIN
- HFINTOSC
Ext. System
- LFINTOSC PIC® MCU
The HFINTOSC can produce clock frequencies from 1-
32 MHz, and is responsible for generating the two OSC2/CLKOUT
FOSC/4 or I/O(1)
MFINTOSC frequencies (500 kHz and 32 kHz) that can
be used by some peripherals. The LFINTOSC
generates a 31 kHz clock frequency. Note 1: Output depends upon CLKOUTEN bit of the
Configuration Words.
There is a 4x PLL that can be used by the external
oscillator. See Section 9.2.1.4 “4x PLL” for more
details. Additionally, there is a PLL that can be used by 9.2.1.2 LP, XT, HS Modes
the HFINTOSC at certain frequencies. See The LP, XT and HS modes support the use of quartz
Section 9.2.2.2 “Internal Oscillator Frequency crystal resonators or ceramic resonators connected to
Adjustment” for more details. OSC1 and OSC2 (Figure 9-3). The three modes select
a low, medium or high gain setting of the internal
9.2.1 EXTERNAL CLOCK SOURCES inverter-amplifier to support various resonator types
An external clock source can be used as the device and speed.
system clock by performing one of the following LP Oscillator mode selects the lowest gain setting of the
actions: internal inverter-amplifier. LP mode current consumption
• Program the RSTOSC<2:0> bits in the is the least of the three modes. This mode is designed to
Configuration Words to select an external clock drive only 32.768 kHz tuning-fork type crystals (watch
source that will be used as the default system crystals), but can operate up to 100 kHz.
clock upon a device Reset XT Oscillator mode selects the intermediate gain
• Write the NOSC<2:0> and NDIV<3:0> bits in the setting of the internal inverter-amplifier. XT mode
OSCCON1 register to switch the system clock current consumption is the medium of the three modes.
source This mode is best suited to drive crystals and
See Section 9.3 “Clock Switching” for more resonators with a frequency range up to 4 MHz.
information. HS Oscillator mode selects the highest gain setting of the
internal inverter-amplifier. HS mode current consumption
9.2.1.1 EC Mode is the highest of the three modes. This mode is best
The External Clock (EC) mode allows an externally suited for resonators that require operating frequencies
generated logic level signal to be the system clock up to 20 MHz.
source. When operating in this mode, an external clock Figure 9-3 and Figure 9-4 show typical circuits for
source is connected to the OSC1/CLKIN input. OSC2/ quartz crystal and ceramic resonators, respectively.
CLKOUT is available for general purpose I/O or
CLKOUT. Figure 9-2 shows the pin connections for EC
mode.
EC mode has three power modes to select from through
Configuration Words:
• ECH – High power, 32 MHz
• ECM – Medium power, 8 MHz
• ECL – Low power, 0.1 MHz
PIC® MCU
OSC1/CLKIN C1 To Internal
Logic
C1 To Internal
Logic RP(3) RF(2) Sleep
Quartz
(2)
Crystal RF Sleep
PIC® MCU
SOSCI
C1 To Internal
Logic
32.768 kHz
Quartz
Crystal
C2 SOSCO
The internal oscillator block has two independent The NDIV<3:0> bits of the OSCCON1 register allow for
oscillators that can produce two internal system clock division of the HFINTOSC output from a range between
sources. 1:1 and 1:512.
OSC #1 OSC #2
ORDY
NOTE 2
NOSCR
NOTE 1
CSWIF
USER
CSWHOLD CLEAR
Note 1:CSWIF is asserted coincident with NOSCR; interrupt is serviced at OSC#2 speed.
2: The assertion of NOSCR is hidden from the user because it appears only for the duration of the switch.
OSC #1 OSC #2
ORDY
NOSCR
NOTE 1
CSWIF
USER
CSWHOLD CLEAR
Note 1:CSWIF is asserted coincident with NOSCR, and may be cleared before or after clearing CSWHOLD = 0.
OSC #1
ORDY NOTE 2
NOSCR
NOTE 1
CSWIF
CSWHOLD
Note 1:CSWIF may be cleared before or after rewriting OSCCON1; CSWIF is not automatically cleared.
2: ORDY = 0 if OSCCON1 does not match OSCCON2; a new switch will begin.
Sample Clock
System Oscillator
Clock Failure
Output
Note: The system clock is normally at a much higher frequency than the sample clock. The relative frequencies in
this example have been chosen for clarity.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared f = determined by fuse setting
Note 1: The default value (f/f) is set equal to the RSTOSC Configuration bits.
2: If NOSC is written with a reserved value (Table 9-1), the operation is ignored and neither NOSC nor NDIV
is written.
3: When CSWEN = 0, this register is read-only and cannot be changed from the POR value.
4: When NOSC = 110 (HFINTOSC 1 MHz), the NDIV bits will default to ‘0010’ upon Reset; for all other
NOSC settings the NDIV bits will default to ‘0000’ upon Reset.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Note 1:The POR value is the value present when user code execution begins.
2: The Reset value (n/n) is the same as the NOSC/NDIV bits.
TABLE 9-1: NOSC/COSC BIT SETTINGS TABLE 9-2: NDIV/CDIV BIT SETTINGS
NOSC<2:0>/ NDIV<3:0>/
Clock Source Clock divider
COSC<2:0> CDIV<3:0>
111 EXTOSC(1) 1111-1010 Reserved
110 HFINTOSC (1-32 MHz)(2) 1001 512
101 LFINTOSC 1000 256
100 SOSC 0111 128
011 Reserved 0110 64
010 EXTOSC with 4x PLL(1) 0101 32
001 HFINTOSC with 2x PLL (32 MHz)(1) 0100 16
000 Reserved 0011 8
Note 1: EXTOSC configured by the FEXTOSC bits of 0010 4
Configuration Word 1 (Register 5-1). 0001 2
2: HFINTOSC settings are configured with the
0000 1
HFFRQ bits of the OSCFRQ register
(Register 9-6).
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared q = Reset value is determined by hardware
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
TMR0IF Wake-up
TMR0IE (If in Sleep mode)
INTF
Peripheral Interrupts INTE
PEIE
PIRn
PIEn GIE
OSC1
Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4
CLKOUT
INT
pin
Valid Interrupt
window(1) 1 Cycle Instruction at PC
Indeterminate Latency
Latency(2)
Note 1: An interrupt may occur at any time during the interrupt window.
2: Since an interrupt may occur any time during the interrupt window, the actual latency can vary.
Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4
OSC1
(4)
INT pin
(1)
(1)
INTF (5) Interrupt Latency (2)
GIE
INSTRUCTION FLOW
PC PC PC + 1 PC + 1 0004h 0005h
Instruction
Fetched Inst (PC) Inst (PC + 1) — Inst (0004h) Inst (0005h)
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared HS = Hardware set
Note 1: The External Interrupt INT pin is selected by INTPPS (Register 15-1).
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared HS = Hardware set
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared HS = Hardware set
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared HS = Hardware set
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared HS = Hardware set
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared HS= Hardware Set
Note 1: The External Interrupt INT pin is selected by INTPPS (Register 15-1).
2: The IOCIF bit is the logical OR of all the IOCAF-IOCEF flags. Therefore, to clear the IOCIF flag,
application firmware must clear all of the lower level IOCAF-IOCEF register bits.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared HS = Hardware set
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared HS = Hardware set
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared HS = Hardware clearable
Note 1: The RCxIF flag is a read-only bit. To clear the RCxIF flag, the firmware must read from RCxREG enough
times to remove all bytes from the receive buffer.
2: The TXxIF flag is a read-only bit, indicating if there is room in the transmit buffer. To clear the TX1IF flag,
the firmware must write enough data to TXxREG to completely fill all available bytes in the buffer. The
TXxIF flag does not indicate transmit completion (use TRMT for this purpose instead).
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared HS = Hardware set
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared HS = Hardware set
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared HS = Hardware set
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared HS = Hardware set
1 1 1 1 1 1 1 1 1 1 1 1 1
2 2 2 2 2 2 2 2 2 2 2 2 2
/ŶƐƚƌƵĐƚŝŽŶ
WĞƌŝŽĚ 3 3 3 3 3 3 3 3 3 3 3 3 3
4 4 4 4 4 4 4 4 4 4 4 4 4
1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4
CPU Clock
Interrupt
Here
(ROI = 1)
Note 1: Multi-cycle instructions are executed to completion before fetching 0004h.
2: If the pre-fetched instruction clears GIE, the ISR will not occur, but DOZEN is still cleared and the CPU will resume execution at full speed.
GIE bit
(INTCON reg.) Processor in
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) Forced NOP Forced NOP
Executed Inst(PC - 1) Inst(0004h)
Some peripherals that can operate in Sleep mode will 11.3.2 IDLE AND WDT
not operate properly with the Low-Power Sleep mode
When in IDLE, the WDT Reset is blocked and will
selected. The Low-Power Sleep mode is intended for
instead wake the device. The WDT wake-up is not an
use with these peripherals:
interrupt, therefore ROI does not apply.
• Brown-out Reset (BOR)
• Watchdog Timer (WDT)
• External interrupt pin/interrupt-on-change pins Note: The WDT can bring the device out of
• Timer1 (with external clock source) IDLE, in the same way it brings the device
out of Sleep. The DOZEN bit is not
It is the responsibility of the end user to determine what
affected.
is acceptable for their application when setting the
VREGPM settings in order to ensure operation in
Sleep.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other
HC = Bit is cleared by hardware Resets
‘1’ = Bit is set ‘0’ = Bit is cleared HS = Bit is set by hardware
Rev. 10-000162C
10/12/2016
WWDT
Armed
WDT
Window
Violation
Window Closed
Window
Comparator
CLRWDT Sizes
WDTWS
RESET
Reserved 111
Reserved 110
Reserved 101
R
Reserved 100 18-bit Prescale
Reserved 011 Counter
E
SOSC 010
MFINTOSC/16 001
LFINTOSC 000
WDTCS
WDTPS
R
5-bit Overflow
WDT Time-out
WDT Counter Latch
WDTE<1:0> = 01
SWDTEN
WDTE<1:0> = 11
WDTE<1:0> = 10
Sleep
11 X X Active
Awake Active
10 X
Sleep Disabled
1 X Active
01
0 X Disabled
00 X X Disabled
Rev. 10-000163A
8/15/2016
CLRWDT Instruction
(or other WDT Reset)
Window Period
Time-out Event
Window Delay
(window violation can occur)
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared q = Value depends on condition
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared q = Value depends on condition
Note 1: If WDTCCS <2:0> in CONFIG3 = 111, the Reset value of WDTCS<2:0> is 000.
2: The Reset value of WINDOW<2:0> is determined by the value of WDTCWS<2:0> in the CONFIG3 register.
3: If WDTCCS<2:0> in CONFIG3 ≠ 111, these bits are read-only.
4: If WDTCWS<2:0> in CONFIG3 ≠ 111, these bits are read-only.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Note 1: The 18-bit WDT prescale value, PSCNT<17:0> includes the WDTPSL, WDTPSH and the lower bits of the WDTTMR
registers. PSCNT<17:0> is intended for debug operations and should be read during normal operation.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Note 1: The 18-bit WDT prescale value, PSCNT<17:0> includes the WDTPSL, WDTPSH and the lower bits of the WDTTMR
registers. PSCNT<17:0> is intended for debug operations and should be read during normal operation.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Note 1: The 18-bit WDT prescale value, PSCNT<17:0> includes the WDTPSL, WDTPSH and the lower bits of the WDTTMR
registers. PSCNT<17:0> is intended for debug operations and should be read during normal operation.
Note 1: Sequence begins when NVMCON2 is written; steps 1-4 must occur in the cycle-accurate order shown.
2: Opcodes shown are illustrative; any instruction that has the indicated effect may be used.
Unlock Sequence
(See Note 1)
Re-enable Interrupts
(GIE = 1)
End
Erase Operation
BANKSEL NVMADRL
MOVF ADDRL,W
MOVWF NVMADRL ; Load lower 8 bits of erase address boundary
MOVF ADDRH,W
MOVWF NVMADRH ; Load upper 6 bits of erase address boundary
BCF NVMCON1,NVMREGS ; Choose PFM memory area
BSF NVMCON1,FREE ; Specify an erase operation
BSF NVMCON1,WREN ; Enable writes
BCF INTCON,GIE ; Disable interrupts during unlock sequence
; -------------------------------REQUIRED UNLOCK SEQUENCE:------------------------------
Program
NVMREGS FSR
Memory Counter (PC), NVMADR< Allowed FSR
Memory Type bit Programming
Function ICSP™ 14:0> Operations Address
(NVMCON1) Address
Address
Reset Vector 0000h 0 0000h 8000h
0001h 0001h 8001h
User Memory 0
0003h 0003h 8003h
Program Flash Read
INT Vector 0004h 0 0004h 8004h Read-0nly
Memory Write
0005h 0005h 8005h
User Memory 1FFFh 0 1FFFh 9FFFh
3FFFh 3FFFh BFFFh
8000h Program Flash 0000h Read
User ID 1
8003h Memory 0003h Write
Reserved 8004h — — 0004h —
Rev ID 8005h 1 0005h
Read-Only
Device ID 8006h 1 0006h
No Access
CONFIG1 8007h 1 0007h
Program Flash
CONFIG2 8008h 1 0008h
Memory Read
CONFIG3 8009h 1 0009h
Write
CONFIG4 800Ah 1 000Ah
CONFIG5 800Bh 1 000Bh
Program Flash Read-Only
0100h-
DIA and DCI 8100h-82FFh Memory and 1 No Access
02FFh
Hard coded
Rev. 10-000004F
7 6 0 7 5 4 0 7 5 0 7 0 8/15/2016
14
Write Latch #0 Write Latch #1 Write Latch #30 Write Latch #31
00h 01h 1Eh 1Fh
NVMADRL<4:0>
14 14 14 14
Row End
Addr End Addr
Address
NVMADRH<6:0> Decode Flash Program Memory
NVMADRL<7:5>
Configuration Memory
User ID, Device ID, Revision ID, Configuration Words, DIA, DCI
NVMREGS = 1
-page 187
PIC16(L)F15356/75/76/85/86
FIGURE 13-5: PROGRAM FLASH MEMORY WRITE FLOWCHART
Rev. 10-000049C
8/24/2015
Start
Write Operation
Determine number of
words to be written into Load the value to write
PFM. The number of TABLAT
words cannot exceed the
number of words per row
(word_cnt)
Disable Interrupts
Select Write Operation (GIE = 0)
(FREE = 0)
CPU stalls while Write
operation completes
(2 ms typical)
Unlock Sequence
Load Write Latches Only (See note 1)
Enable Write/Erase
Operation (WREN = 1) No delay when writing to Re-enable Interrupts
PFM Latches (GIE = 1)
Disable Write/Erase
Operation (WREN = 0)
Re-enable Interrupts
(GIE = 1)
End
Write Operation
Increment Address
TBLPTR++
BANKSEL NVMADRH
MOVF ADDRH,W
MOVWF NVMADRH ; Load initial address
MOVF ADDRL,W
MOVWF NVMADRL
MOVLW LOW DATA_ADDR ; Load initial data address
MOVWF FSR0L
MOVLW HIGH DATA_ADDR
MOVWF FSR0H
BCF NVMCON1,NVMREGS ; Set Program Flash Memory as write location
BSF NVMCON1,WREN ; Enable writes
BSF NVMCON1,LWLO ; Load only write latches
LOOP
MOVIW FSR0++
MOVWF NVMDATL ; Load first data byte
MOVIW FSR0++
MOVWF NVMDATH ; Load second data byte
MOVF NVMADRL,W
XORLW 0x1F ; Check if lower bits of address are 00000
ANDLW 0x1F ; and if on last of 32 addresses
BTFSC STATUS,Z ; Last of 32 words?
GOTO START_WRITE ; If so, go write latches into memory
CALL UNLOCK_SEQ ; If not, go load latch
INCF NVMADRL,F ; Increment address
GOTO LOOP
START_WRITE
BCF NVMCON1,LWLO ; Latch writes complete, now write memory
CALL UNLOCK_SEQ ; Perform required unlock sequence
BCF NVMCON1,WREN ; Disable writes
UNLOCK_SEQ
MOVLW 55h
BCF INTCON,GIE ; Disable interrupts
MOVWF NVMCON2 ; Begin unlock sequence
MOVLW AAh
MOVWF NVMCON2
BSF NVMCON1,WR
BSF INTCON,GIE ; Unlock sequence complete, re-enable interrupts
return
Modify Image
The words to be modified are
changed in the RAM image
Erase Operation
(See Note 2)
Write Operation
Use RAM image
(See Note 3)
End
Modify Operation
BANKSEL NVMADRH
MOVF ADDRH,W
MOVWF NVMADRH ; Load initial address
MOVF ADDRL,W
MOVWF NVMADRL
MOVLW LOW DATA_ADDR ; Load initial data address
MOVWF FSR0L
MOVLW HIGH DATA_ADDR
MOVWF FSR0H
BCF NVMCON1,NVMREGS ; Set PFM as write location
BSF NVMCON1,WREN ; Enable writes
BSF NVMCON1,LWLO ; Load only write latches
LOOP
MOVIW FSR0++
MOVWF NVMDATL ; Load first data byte
MOVIW FSR0++
MOVWF NVMDATH ; Load second data byte
CALL UNLOCK_SEQ ; If not, go load latch
INCF NVMADRL,F ; Increment address
MOVF NVMADRL,W
XORLW 0x1F ; Check if lower bits of address are 00000
ANDLW 0x1F ; and if on last of 32 addresses
BTFSC STATUS,Z ; Last of 32 words?
GOTO START_WRITE ; If so, go write latches into memory
GOTO LOOP
START_WRITE
BCF NVMCON1,LWLO ; Latch writes complete, now write memory
CALL UNLOCK_SEQ ; Perform required unlock sequence
BCF NVMCON1,LWLO ; Disable writes
UNLOCK_SEQ
MOVLW 55h
BCF INTCON,GIE ; Disable interrupts
MOVWF NVMCON2 ; Begin unlock sequence
MOVLW AAh
MOVWF NVMCON2
BSF NVMCON1,WR
BSF INTCON,GIE ; Unlock sequence complete, re-enable interrupts
return
Start
Verify Operation
Read Operation(1)
NVMDAT = No
RAM image ?
Yes
Fail
Verify Operation
No Last word ?
Yes
End
Verify Operation
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
bit 7-0 NVMDAT<7:0>: Read/write value for Least Significant bits of program memory
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
bit 7-0 NVMADR<7:0>: Specifies the Least Significant bits for program memory address
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
S = Bit can only be set x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared HC = Bit is cleared by hardware
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
S = Bit can only be set x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
PORTB
PORTC
PORTD
PORTE
PORTA
PORTF
Device FIGURE 14-1: GENERIC I/O PORT
OPERATION
PIC16(L)F15356 ● ● ● ● Rev. 10-000052A
7/30/2013
Most port pins share functions with device peripherals, To analog peripherals
both analog and digital. In general, when a peripheral
VSS
is enabled on a port pin, that pin cannot be used as a
general purpose output; however, the pin can still be
read.
14.1 I/O Priorities
The Data Latch (LATx registers) is useful for read-
modify-write operations on the value that the I/O pins Each pin defaults to the PORT data latch after Reset.
are driving. Other functions are selected with the peripheral pin
select logic. See Section 15.0 “Peripheral Pin Select
A write operation to the LATx register has the same (PPS) Module” for more information.
effect as a write to the corresponding PORTx register.
A read of the LATx register reads of the values held in Analog input functions, such as ADC and comparator
the I/O PORT latches, while a read of the PORTx inputs, are not shown in the peripheral pin select lists.
register reads the actual I/O pin value. These inputs are active when the I/O pin is set for
Analog mode using the ANSELx register. Digital output
Ports that support analog inputs have an associated functions may continue to control the pin when it is in
ANSELx register. When an ANSEL bit is set, the digital Analog mode.
input buffer associated with that bit is disabled.
Analog outputs, when enabled, take priority over the
digital outputs and force the digital output driver to the
high-impedance state.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Note 1: Writes to PORTA are actually written to corresponding LATA register. Reads from PORTA register returns
of actual I/O pin values.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Note 1: Writes to PORTA are actually written to corresponding LATA register. Reads from PORTA register returns
actual I/O pin values.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
bit 7-0 ANSA<7:0>: Analog Select between Analog or Digital Function on pins RA<7:0>, respectively
1 = Analog input. Pin is assigned as analog input(1). Digital input buffer disabled.
0 = Digital I/O. Pin is assigned to port or digital special function.
Note 1: When setting a pin to an analog input, the corresponding TRIS bit must be set to Input mode in order to
allow external control of the voltage on the pin.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Note 1: The weak pull-up device is automatically disabled if the pin is configured as an output.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Note 1: Writes to PORTB are actually written to corresponding LATB register. The actual I/O pin values are read
from the PORTB register.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Note 1: Writes to PORTB are actually written to corresponding LATB register. Reads from PORTB register returns
actual I/O pin values.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
bit 7-0 ANSB<7:0>: Analog Select between Analog or Digital Function on pins RB<7:0>, respectively
1 = Analog input. Pin is assigned as analog input(1). Digital input buffer disabled.
0 = Digital I/O. Pin is assigned to port or digital special function.
Note 1: When setting a pin to an analog input, the corresponding TRIS bit must be set to Input mode in order to
allow external control of the voltage on the pin.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Note 1: Writes to PORTC are actually written to corresponding LATC register. The actual I/O pin values are read from
the PORTC register.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Note 1: Writes to PORTC are actually written to corresponding LATC register. Reads from PORTC register returns
actual I/O pin values.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
bit 7-0 ANSC<7:0>: Analog Select between Analog or Digital Function on Pins RC<7:0>, respectively(1)
1 = Analog input. Pin is assigned as analog input(1). Digital input buffer disabled.
0 = Digital I/O. Pin is assigned to port or digital special function.
Note 1: When setting a pin to an analog input, the corresponding TRIS bit must be set to Input mode in order to
allow external control of the voltage on the pin.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Note 1: Writes to PORTD are actually written to corresponding LATD register. Reads from PORTD register is
return of actual I/O pin values.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Note 1: Writes to PORTD are actually written to corresponding LATD register. Reads from PORTD register is
return of actual I/O pin values.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
bit 7-0 ANSD<7:0>: Analog Select between Analog or Digital Function on Pins RD<7:0>, respectively(1)
0 = Digital I/O. Pin is assigned to port or digital special function.
1 = Analog input. Pin is assigned as analog input(1). Digital input buffer disabled.
Note 1: When setting a pin to an analog input, the corresponding TRIS bit must be set to Input mode in order to
allow external control of the voltage on the pin.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Note 1: The weak pull-up device is automatically disabled if the pin is configured as an output.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Note 1: Writes to PORTF are actually written to corresponding LATF register. Reads from PORTF register is return
of actual I/O pin values.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Note 1: Writes to PORTF are actually written to corresponding LATF register. Reads from PORTF register is return
of actual I/O pin values.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
bit 7-0 ANSF<7:0>: Analog Select between Analog or Digital Function on Pins RF<7:0>, respectively(1)
0 = Digital I/O. Pin is assigned to port or digital special function.
1 = Analog input. Pin is assigned as analog input(1). Digital input buffer disabled.
Note 1: When setting a pin to an analog input, the corresponding TRIS bit must be set to Input mode in order to
allow external control of the voltage on the pin.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Note 1: The weak pull-up device is automatically disabled if the pin is configured as an output.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
PPS Outputs
RA0PPS
PPS Inputs
abcPPS RA0
RA0
Peripheral abc
RxyPPS
Rxy
Peripheral xyz
RE3(1) RE3PPS(1)
xyzPPS RE3(1)
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared q = value depends on peripheral
Note 1: The “xxx” in the register name “xxxPPS” represents the input signal function name, such as “INT”,
“T0CKI”, “RX”, etc. This register summary shown here is only a prototype of the array of actual registers,
as each input function has its own dedicated SFR (ex: INTPPS, T0CKIPPS, RXPPS, etc.).
2: Each specific input signal may only be mapped to a subset of these I/O pins, as shown in Table 15-1
through Table 15-3. Attempting to map an input signal to a non-supported I/O pin will result in undefined
behavior. For example, the “INT” signal map be mapped to any PORTA or PORTB pin. Therefore, the
INTPPS register may be written with values from 0x00-0x0F (corresponding to RA0-RB7). Attempting to
write 0x10 or higher to the INTPPS register is not supported and will result in undefined behavior.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared q = Value depends on condition
Note 1: When enabling NVM, a delay of up to 1 µs may be required before accessing data.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared q = Value depends on condition
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared q = Value depends on condition
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared q = Value depends on condition
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared q = Value depends on condition
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared q = Value depends on condition
IOCBNx D Q
edge
detect
RBx
R write IOCBFx
IOCIE
IOC interrupt
RESET to CPU core
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared HS - Bit is set in hardware
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared HS - Bit is set in hardware
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared HS - Bit is set in hardware
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared HS - Bit is set in hardware
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared HS - Bit is set in hardware
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared HS - Bit is set in hardware
2
ADFVR<1:0>
1x
2x ADC FVR Buffer
4x
2
CDAFVR<1:0>
1x
Comparator and DAC
2x
4x FVR Buffer
FVREN
Voltage
FVRRDY (Note 1)
Reference
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared q = Value depends on condition
Positive
VDD Reference
Select
VREF+ pin
VSS ADCS<2:0>
AN0
ANa VRNEG VRPOS
External .
Channel FOSC/n Fosc
. Divider FOSC
Inputs ADC
ADC_clk
. sampled Clock
ANz input Select FRC
FRC
Temp Indicator
Internal
Channel DACx_output ADC CLOCK SOURCE
Inputs
FVR_buffer1 ADC
Sample Circuit
CHS<4:0>
ADFM
set bit ADIF
10
complete 10-bit Result
Write to bit
GO/DONE
GO/DONE Q1 16
start
Q4
ADRESH ADRESL
Q2 Enable
Trigger Select
TRIGSEL<3:0> ADON
. . . VSS
Trigger Sources
AUTO CONVERSION
TRIGGER
TABLE 20-1: ADC CLOCK PERIOD (TAD) VS. DEVICE OPERATING FREQUENCIES
ADC Clock Period (TAD) Device Frequency (FOSC)
ADC
ADCS<2:0> 32 MHz 20 MHz 16 MHz 8 MHz 4 MHz 1 MHz
Clock Source
FOSC/2 000 62.5ns(2) 100 ns(2) 125 ns(2) 250 ns(2) 500 ns(2) 2.0 s
(2) (2) (2) (2)
FOSC/4 100 125 ns 200 ns 250 ns 500 ns 1.0 s 4.0 s
FOSC/8 001 0.5 s(2) 400 ns(2) 0.5 s(2) 1.0 s 2.0 s 8.0 s(3)
FOSC/16 101 800 ns 800 ns 1.0 s 2.0 s 4.0 s 16.0 s(3)
(3)
FOSC/32 010 1.0 s 1.6 s 2.0 s 4.0 s 8.0 s 32.0 s(2)
FOSC/64 110 2.0 s 3.2 s 4.0 s 8.0 s(3) 16.0 s(2) 64.0 s(2)
(1,4) (1,4) (1,4) (1,4) (1,4)
ADCRC x11 1.0-6.0 s 1.0-6.0 s 1.0-6.0 s 1.0-6.0 s 1.0-6.0 s 1.0-6.0 s(1,4)
Legend: Shaded cells are outside of recommended range.
Note 1: See TAD parameter for ADCRC source typical TAD value.
2: These values violate the required TAD time.
3: Outside the recommended TAD time.
4: The ADC clock period (TAD) and total ADC conversion time can be minimized when the ADC clock is derived
from the system clock FOSC. However, the ADCRC oscillator source must be used when conversions are to be
performed with the device in Sleep mode.
TAD1 TAD2 TAD3 TAD4 TAD5 TAD6 TAD7 TAD8 TAD9 TAD10 TAD11
b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
THCD
Conversion Starts
TACQ On the following cycle:
Holding capacitor disconnected
from analog input (THCD).
ADRESH:ADRESL is loaded,
GO bit is cleared,
Set GO bit ADIF bit is set,
holding capacitor is reconnected to analog input.
Enable ADC (ADON bit)
and
Select channel (ACS bits)
ADRESH ADRESL
When the conversion is complete, the ADC module will: Match between Timer2 postscaled
0x04 TMR2
value and PR2
• Clear the GO/DONE bit 0x05 CCP1 CCP1 output
• Set the ADIF Interrupt Flag bit 0x06 CCP2 CCP2 output
• Update the ADRESH and ADRESL registers with 0x07 PWM3 PWM3 output
new conversion result 0x08 PWM4 PWM4 output
0x09 PWM5 PWM5 output
0x0A PWM6 PWM6 output
Note: A device Reset forces all registers to their
0x0B NCO1 NCO1 output
Reset state. Thus, the ADC module is
0x0C C1OUT Comparator C1 output
turned off and any pending conversion is
0x0D C2OUT Comparator C2 output
terminated.
0x0E IOCIF Interrupt-on change flag trigger
T ACQ = Amplifier Settling Time + Hold Capacitor Charging Time + Temperature Coefficient
= T AMP + T C + T COFF
= 2µs + T C + Temperature - 25°C 0.05µs/°C
1
V APPLIED 1 – -------------------------- = V CHOLD ;[1] VCHOLD charged to within 1/2 lsb
n+1
2 –1
–T C
----------
RC
V APPLIED 1 – e = V CHOLD ;[2] VCHOLD charge response to VAPPLIED
– Tc
---------
1
V APPLIED 1 – e = V APPLIED 1 – -------------------------- ;combining [1] and [2]
RC
n+1
2 –1
Note: Where n = number of bits of the ADC.
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 + 50°C- 25°C 0.05µs/°C
= 4.62µs
Note 1: The VAPPLIED 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.
Rev. 10-000070A
8/23/2016
VDD
Sampling
Analog switch
VT § 0.6V SS
RS Input pin RIC 1K RSS
ILEAKAGE(1) CHOLD = 10 pF
VA CPIN VT § 0.6V
5pF
Ref-
6V
Legend: CHOLD = Sample/Hold Capacitance 5V
CPIN = Input Capacitance VDD 4V RSS
3V
ILEAKAGE = Leakage Current at the pin due to varies injunctions 2V
RIC = Interconnect Resistance
RSS = Resistance of Sampling switch
SS = Sampling Switch 5 6 7 8 9 10 11
VT = Threshold Voltage Sampling Switch
RS = Source Resistance (k )
Full-Scale Range
3FFh
3FEh
3FDh
3FCh
ADC Output Code
3FBh
03h
02h
01h
00h
Analog Input Voltage
0.5 LSB 1.5 LSB
Ref- Zero-Scale
Transition Full-Scale
Transition Ref+
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Note 1: See Section 21.0 “5-Bit Digital-to-Analog Converter (DAC1) Module” for more information.
2: See Section 18.0 “Fixed Voltage Reference (FVR)” for more information.
3: See Section 19.0 “Temperature Indicator Module” for more information.
4: The analog channel functionality on these pins is disabled when the system clock source is selected is external.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Note 1: When selecting the VREF+ pin as the source of the positive reference, be aware that a minimum voltage
specification exists. See Table 37-14 for details.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
V = V or V REF-
SOURCE- SS
Reserved 11
VSOURCE+ DACR<4:0>
FVR Buffer 10 5
VREF+ 01 R
VDD 00
R
DACPSS
32-to-1 MUX
32 DACx_output
To Peripherals
Steps
DACEN
R
R DACxOUT1(1)
DACOE1
R
DACxOUT2(1)
DACNSS
Note 1: The unbuffered DACx_output is provided on the DACxOUT pin(s).
PIC® MCU
DAC
R
Module
+
Voltage DAC1OUT Buffered DAC Output
–
Reference
Output
Impedance
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
NCO_overflow Adder
20
NCOx Clock
NCOx_clk
Sources NCOxACCU NCOxACCH NCOxACCL
20
See
NCOxCLK
Register NCO_interrupt set bit
PIC16(L)F15356/75/76/85/86
Fixed Duty NCOxIF
0000
Cycle Mode
Circuitry
NCOxOUT
_ 1
Q
NxPFM NxPOL
NCOx_out
To Peripherals
EN S Q
_ NxOUT
Ripple
R Q
Counter
Pulse
R Frequency
3
DS40001866B-page 291
Mode Circuitry
NxPWS<2:0>
Note 1: The increment registers are double-buffered to allow for value changes to be made without first disabling the NCO module. The full increment value is loaded into the buffer registers on the
second rising edge of the NCOx_clk signal that occurs immediately after a write to NCOxINCL register. The buffers are not user-accessible and are shown here for reference.
PIC16(L)F15356/75/76/85/86
22.1 NCO OPERATION
The NCO operates by repeatedly adding a fixed value to
an accumulator. Additions occur at the input clock rate.
The accumulator will overflow with a carry periodically,
which is the raw NCO output (NCO_overflow). This
effectively reduces the input clock by the ratio of the
addition value to the maximum accumulator value. See
Equation 22-1.
The NCO output can be further modified by stretching
the pulse or toggling a flip-flop. The modified NCO
output is then distributed internally to other peripherals
and can be optionally output to a pin. The accumulator
overflow also generates an interrupt (NCO_overflow).
The NCO period changes in discrete steps to create an
average frequency.
Rev. 10-000029A
11/7/2013
NCOx
Clock
Source
NCOx
Increment 4000h 4000h 4000h
Value
NCOx
Accumulator 00000h 04000h 08000h FC000h 00000h 04000h 08000h FC000h 00000h 04000h 08000h
Value
PIC16(L)F15356/75/76/85/86
NCO_overflow
NCO_interrupt
NCOx Output
FDC Mode
NCOx Output
PF Mode
DS40001866B-page 294
NCOxPWS =
000
NCOx Output
PF Mode
NCOxPWS =
001
PIC16(L)F15356/75/76/85/86
22.8 NCO Control Registers
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Note 1: The accumulator spans registers NCO1ACCU:NCO1ACCH: NCO1ACCL. The 24 bits are reserved but
not all are used.This register updates in real-time, asynchronously to the CPU; there is no provision to
guarantee atomic access to this 24-bit space using an 8-bit bus. Writing to this register while the module is
operating will produce undefined results.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Register
Name Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
on Page
Rev. 10-000027K
11/20/2015
3 (1)
CxNCH<2:0> CxON
Interrupt CxINTP
Rising
Edge set bit
CxIN0- 000 CxIF
Interrupt CxINTN
CxIN1- 001
Falling
CxIN2- 010 CxON(1) Edge
CxOUT_sync to
peripherals
CxSYNC
CxIN0+ 000
TRIS bit
CxIN1+ 001 0
CxPCH<2:0> CxON(1)
2
Note 1: When CxON = 0, all multiplexer inputs are disconnected and the Comparator will produce a ‘0’ at the output.
CPIN ILEAKAGE(1)
VA VT 0.6V
5 pF
Vss
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
optional
VDD RPULLUP
- ZCDxIN RSERIES
External
Zcpinv + RPULLDOWN voltage
source
optional
ZCDxPOL
ZCDxOUT pin
Interrupt
det
ZCDxINTP Set
ZCDxIF
ZCDxINTN flag
Interrupt
det
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared q = value depends on Configuration bits
Rev. 10-000017D
4/6/2017
CLC1 111
SOSC 110
MFINTOSC 101 T0CKPS<3:0> TMR0 Peripherals
LFINTOSC 100 body T0OUTPS<3:0> T0IF
Prescaler 1
HFINTOSC 011 IN OUT Postscaler T0_out
SYNC 0
FOSC/4 010
PPS 001 FOSC/4 T016BIT TMR0
T0ASYNC D Q PPS
000
T0CKIPPS CK Q RxyPPS
T0CS<2:0>
8-bit TMR0 Body Diagram (T016BIT = 0) 16-bit TMR0 Body Diagram (T016BIT = 1)
Read TMR0L
COMPARATOR OUT
Write TMR0L
T0_match 8
8 TMR0H
TMR0 High
Byte
Latch 8
Enable
TMR0H
8
Internal Data Bus
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Register
Name Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
on Page
TMR0L Holding Register for the Least Significant Byte of the 16-bit TMR0 Register 316*
TMR0H Holding Register for the Most Significant Byte of the 16-bit TMR0 Register 316*
T0CON0 T0EN ― T0OUT T016BIT T0OUTPS<3:0> 319
T0CON1 T0CS<2:0> T0ASYNC T0CKPS<3:0> 320
T0CKIPPS ― ― T0CKIPPS<5:0> 242
TMR0PPS ― ― TMR0PPS<5:0> 242
T1GCON GE GPOL GTM GSPM GGO/DONE GVAL — — 332
INTCON GIE PEIE ― ― ― ― ― INTEDG 147
PIR0 ― ― TMR0IF IOCIF ― ― ― INTF 156
PIE0 ― ― TMR0IE IOCIE ― ― ― INTE 148
Legend: — = Unimplemented location, read as ‘0’. Shaded cells are not used by the Timer0 module.
* Page with Register information.
4
TxGPPS
TxGSPM
PPS 00000
1
0 Single Pulse D Q TxGVAL
NOTE (5) 0
11111
1 Acq. Control
Q1
D Q
TxGPOL TxGGO/DONE
CK Q
TMRxON Interrupt
set bit
R
TxGTM det TMRxGIF
TMRxGE
set flag bit
TMRxIF
TMRxON
EN
(2) To Comparators (6)
TMRx
Tx_overflow Synchronized Clock Input
TMRxH TMRxL Q D 0
1
TxCLK
TxSYNC
TMRxCLK<3:0>
4
TxCKIPPS
(1)
PPS 0000
Prescaler
Synchronize(3)
1,2,4,8
(4)
Note det
1111
2
Fosc/2
TxCKPS<1:0> Internal Sleep
Clock Input
Note 1: ST Buffer is high speed type when using TxCKIPPS.
2: TMRx register increments on rising edge.
3: Synchronize does not operate while in Sleep.
4: See Register 26-3 for Clock source selections.
5: See Register 26-4 for GATE source selections.
6: Synchronized comparator output should not be used in conjunction with synchronized input clock.
TxCKI = 1
when the timer is
enabled
TxCKI = 0
when the timer is
enabled
TMRxGE
TxGPOL
Selected
gate input
TxCKI
TxGVAL
TMRxGE
TxGPOL
TxGTM
Selected
gate input
TxCKI
TxGVAL
TMRxGE
TxGPOL
TxGSPM
Cleared by hardware on
TxGGO/ Set by software falling edge of TxGVAL
DONE
Counting enabled on
rising edge of selected source
Selected gate
source
TxCKI
TxGVAL
TMRxGE
TxGPOL
TxGSPM
TxGTM
Cleared by hardware on
TxGGO/ Set by software falling edge of TxGVAL
DONE Counting enabled on
rising edge of selected source
Selected gate
source
TxCKI
TxGVAL
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared HC = Bit is cleared by hardware
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared HC = Bit is cleared by hardware
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared HC = Bit is cleared by hardware
INPPS
TxIN PPS MODE<4:0> MODE<3>
enable MODE<4:3>=01
Clear ON
MODE<4:1>=1011 D Q
CPOL
TMRx_clk Prescaler 0
R
T[7MR
Set flag bit
3 Sync 1 TMRxIF
4
ON Sync
(2 Clocks)
1
7[PR OUTPS<3:0>
0
CSYNC
CKPS 0b010
PRx 1
OUTPS 0b0001
TMRx_clk
TMRx 0 1 0 1 0 1 0
TMRx_postscaled
Note 1: Setting the interrupt flag is synchronized with the instruction clock.
Synchronization may take as many as 2 instruction cycles
2: Cleared by software.
MODE 0b00000
TMRx_clk
ON
PRx 5
TMRx 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 0 1
TMRx_postscaled
PWM Duty
3
Cycle
PWM Output
Note 1: BSF and BCF represent Bit-Set File and Bit-Clear File instructions executed by the CPU to
set or clear the ON bit of TxCON. CPU execution is asynchronous to the timer clock input.
MODE 0b00001
TMRx_clk
TMRx_ers
PRx 5
TMRx 0 1 2 3 4 5 0 1 2 3 4 5 0 1
TMRx_postscaled
PWM Duty
3
Cycle
PWM Output
MODE 0b00100
TMRx_clk
PRx 5
ON
TMRx_ers
TMRx 0 1 2 0 1 2 3 4 5 0 1 2 3 4 5 0 1
TMRx_postscaled
PWM Duty
3
Cycle
PWM Output
Note 1: BSF and BCF represent Bit-Set File and Bit-Clear File instructions executed by the CPU to
set or clear the ON bit of TxCON. CPU execution is asynchronous to the timer clock input.
MODE 0b00111
TMRx_clk
PRx 5
ON
TMRx_ers
TMRx 0 1 2 0 1 2 3 4 5 0 0 1 2 3 4 5 0
TMRx_postscaled
PWM Duty
3
Cycle
PWM Output
Note 1: BSF and BCF represent Bit-Set File and Bit-Clear File instructions executed by the CPU to
set or clear the ON bit of TxCON. CPU execution is asynchronous to the timer clock input.
FIGURE 27-8: SOFTWARE START ONE-SHOT MODE TIMING DIAGRAM (MODE = 01000)
Rev. 10-000199B
4/7/2016
MODE 0b01000
TMRx_clk
PRx 5
ON
TMRx 0 1 2 3 4 5 0 1 2 3 4 5 0
TMRx_postscaled
PWM Duty
3
Cycle
PWM Output
Note 1: BSF and BCF represent Bit-Set File and Bit-Clear File instructions
executed by the CPU to set or clear the ON bit of TxCON. CPU
execution is asynchronous to the timer clock input.
MODE 0b01001
TMRx_clk
PRx 5
ON
TMRx_ers
TMRx 0 1 2 3 4 5 0 1 2
CCP_pset
TMRx_postscaled
PWM Duty
3
Cycle
PWM Output
Note 1: BSF and BCF represent Bit-Set File and Bit-Clear File instructions executed by the CPU to
set or clear the ON bit of TxCON. CPU execution is asynchronous to the timer clock input.
MODE period value. External signal edges will have no effect until after software sets
the ON bit. Figure 27-10 illustrates the rising edge hardware limit one-shot
In Edge-Triggered Hardware Limit One-Shot modes the timer starts on the first operation.
external signal edge after the ON bit is set and resets on all subsequent edges.
When this mode is used in conjunction with the CCP then the first starting edge
Only the first edge after the ON bit is set is needed to start the timer. The
trigger, and all subsequent Reset edges, will activate the PWM drive. The PWM
counter will resume counting automatically two clocks after all subsequent drive will deactivate when the timer matches the CCPRx pulse-width value and
external Reset edges. Edge triggers are as follows: stay deactivated until the timer halts at the PR2 period match unless an external
• Rising edge start and Reset (MODE<4:0> = 01100) signal edge resets the timer before the match occurs.
• Falling edge start and Reset (MODE<4:0> = 01101)
FIGURE 27-10: EDGE-TRIGGERED HARDWARE LIMIT ONE-SHOT MODE TIMING DIAGRAM (MODE = 01100)
Rev. 10-000201B
4/7/2016
MODE 0b01100
PIC16(L)F15356/75/76/85/86
TMRx_clk
PRx 5
ON
TMRx_ers
TMRx 0 1 2 3 4 5 0 1 2 0 1 2 3 4 5 0
TMRx_postscaled
PWM Duty
3
Cycle
DS40001866B-page 347
PWM Output
Note 1: BSF and BCF represent Bit-Set File and Bit-Clear File instructions executed by the CPU to
set or clear the ON bit of TxCON. CPU execution is asynchronous to the timer clock input.
27.5.8 LEVEL RESET, EDGE-TRIGGERED HARDWARE LIMIT When the timer count matches the PR2 period count, the timer is reset and the
2016-2018 Microchip Technology Inc.
ONE-SHOT MODES ON bit is cleared. When the ON bit is cleared by either a PR2 match or by soft-
ware control a new external signal edge is required after the ON bit is set to start
In Level -Triggered One-Shot mode the timer count is reset on the external the counter.
signal level and starts counting on the rising/falling edge of the transition from
When Level-Triggered Reset One-Shot mode is used in conjunction with the
Reset level to the active level while the ON bit is set. Reset levels are selected
CCP PWM operation the PWM drive goes active with the external signal edge
as follows: that starts the timer. The PWM drive goes inactive when the timer count equals
• Low Reset level (MODE<4:0> = 01110) the CCPRx pulse width count. The PWM drive does not go active when the
• High Reset level (MODE<4:0> = 01111) timer count clears at the PR2 period count match.
FIGURE 27-11: LOW LEVEL RESET, EDGE-TRIGGERED HARDWARE LIMIT ONE-SHOT MODE TIMING DIAGRAM (MODE = 01110)
Rev. 10-000202B
4/7/2016
MODE 0b01110
TMRx_clk
PIC16(L)F15356/75/76/85/86
PRx 5
ON
TMRx_ers
TMRx 0 1 2 3 4 5 0 1 0 1 2 3 4 5 0
TMRx_postscaled
PWM Duty
3
Cycle
PWM Output
DS40001866B-page 348
Note 1: BSF and BCF represent Bit-Set File and Bit-Clear File instructions executed by the CPU to
set or clear the ON bit of TxCON. CPU execution is asynchronous to the timer clock input.
27.5.9 EDGE-TRIGGERED MONOSTABLE MODES When an Edge-Triggered Monostable mode is used in conjunction with the
2016-2018 Microchip Technology Inc.
CCP PWM operation the PWM drive goes active with the external Reset signal
The Edge-Triggered Monostable modes start the timer on an edge from the
edge that starts the timer, but will not go active when the timer matches the PR2
external Reset signal input, after the ON bit is set, and stop incrementing the
value. While the timer is incrementing, additional edges on the external Reset
timer when the timer matches the PR2 period value. The following edges will
signal will not affect the CCP PWM.
start the timer:
• Rising edge (MODE<4:0> = 10001)
• Falling edge (MODE<4:0> = 10010)
• Rising or Falling edge (MODE<4:0> = 10011)
FIGURE 27-12: RISING EDGE-TRIGGERED MONOSTABLE MODE TIMING DIAGRAM (MODE = 10001)
Rev. 10-000203A
4/7/2016
MODE 0b10001
TMRx_clk
PIC16(L)F15356/75/76/85/86
PRx 5
ON
TMRx_ers
TMRx 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 0
TMRx_postscaled
PWM Duty
3
Cycle
PWM Output
DS40001866B-page 349
Note 1: BSF and BCF represent Bit-Set File and Bit-Clear File instructions executed by the CPU to
set or clear the ON bit of TxCON. CPU execution is asynchronous to the timer clock input.
27.5.10 LEVEL-TRIGGERED HARDWARE LIMIT ONE-SHOT When the timer count matches the PR2 period count, the timer is reset and the
2016-2018 Microchip Technology Inc.
MODES ON bit is cleared. When the ON bit is cleared by either a PR2 match or by soft-
ware control the timer will stay in Reset until both the ON bit is set and the exter-
The Level-Triggered Hardware Limit One-Shot modes hold the timer in Reset
nal signal is not at the Reset level.
on an external Reset level and start counting when both the ON bit is set and
the external signal is not at the Reset level. If one of either the external signal When Level-Triggered Hardware Limit One-Shot modes are used in conjunc-
is not in Reset or the ON bit is set then the other signal being set/made active tion with the CCP PWM operation the PWM drive goes active with either the
will start the timer. Reset levels are selected as follows: external signal edge or the setting of the ON bit, whichever of the two starts the
timer.
• Low Reset level (MODE<4:0> = 10110)
• High Reset level (MODE<4:0> = 10111)
FIGURE 27-13: LEVEL-TRIGGERED HARDWARE LIMIT ONE-SHOT MODE TIMING DIAGRAM (MODE = 10110)
Rev. 10-000204A
4/7/2016
MODE 0b10110
PIC16(L)F15356/75/76/85/86
TMR2_clk
PRx 5
ON
TMR2_ers
TMRx 0 1 2 3 4 5 0 1 2 3 0 1 2 3 4 5 0
TMR2_postscaled
PWM Duty
‘D3
Cycle
PWM Output
DS40001866B-page 350
Note 1: BSF and BCF represent Bit-Set File and Bit-Clear File instructions executed by the CPU to
set or clear the ON bit of TxCON. CPU execution is asynchronous to the timer clock input.
PIC16(L)F15356/75/76/85/86
27.6 Timer2 Operation During Sleep
When PSYNC = 1, Timer2 cannot be operated while
the processor is in Sleep mode. The contents of the
TMR2 and PR2 registers will remain unchanged while
processor is in Sleep mode.
When PSYNC = 0, Timer2 will operate in Sleep as long
as the clock source selected is also still running.
Selecting the LFINTOSC, MFINTOSC, or HFINTOSC
oscillator as the timer clock source will keep the
selected oscillator running during Sleep.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared HC = Bit is cleared by hardware
Note 1: In certain modes, the ON bit will be auto-cleared by hardware. See Section 27.5 “Operation Examples”.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Note 1: Setting this bit ensures that reading TM2x will return a valid value.
2: When this bit is ‘1’, Timer2 cannot operate in Sleep mode.
3: CKPOL should not be changed while ON = 1.
4: Setting this bit ensures glitch-free operation when the ON is enabled or disabled.
5: When this bit is set then the timer operation will be delayed by two TMR2 input clocks after the ON bit is set.
6: Unless otherwise indicated, all modes start upon ON = 1 and stop upon ON = 0 (stops occur without affecting the value
of TMR2).
7: When TMR2 = PR2, the next clock clears TMR2, regardless of the operating mode.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Rev. 10-000158F
9/1/2015
RxyPPS
CCPx
CTS<2:0>
TRIS Control
LC4_out 111
LC3_out 110 CCPRxH CCPRxL
LC2_out 101 16
set CCPxIF
LC1_out 100 Prescaler and
IOC_interrupt 011 1,4,16 Edge Detect
16
C2OUT_sync 010
C1OUT_sync 001 MODE <3:0> TMR1H TMR1L
CCPx PPS 000
CCPxPPS
TMR1H TMR1L
TRIS
Output Enable
Auto-conversion Trigger
TMR2 = 0
CCPRxH CCPRxL
CCPx_out
To Peripherals
set CCPIF
10-bit Latch(2)
(Not accessible by user)
S RxyPPS
TMR2 Module TRIS Control
R
TMR2 (1)
ERS logic
Comparator CCPx_pset
PR2
that has many new modes, which allow for greater 12/9/201 3
Note: The Timer postscaler (see Section 27.4 The 8-bit timer TMR2 register is concatenated with
“Timer2 Interrupt”) is not used in the either the 2-bit internal system clock (FOSC), or two bits
of the prescaler, to create the 10-bit time base. The
determination of the PWM frequency.
system clock is used if the Timer2 prescaler is set to 1:1.
28.3.6 PWM DUTY CYCLE
When the 10-bit time base matches the
The PWM duty cycle is specified by writing a 10-bit CCPRxH:CCPRxL register pair, then the CCPx pin is
value to the CCPRxH:CCPRxL register pair. The cleared (see Figure 28-4).
alignment of the 10-bit value is determined by the
CCPRxFMT bit of the CCPxCON register (see 28.3.7 PWM RESOLUTION
Figure 28-5). The CCPRxH:CCPRxL register pair can
The resolution determines the number of available duty
be written to at any time; however the duty cycle value
cycles for a given period. For example, a 10-bit resolution
is not latched into the 10-bit buffer until after a match
will result in 1024 discrete duty cycles, whereas an 8-bit
between PR2 and TMR2.
resolution will result in 256 discrete duty cycles.
Equation 28-2 is used to calculate the PWM pulse
The maximum PWM resolution is ten bits when PR2 is
width.
255. The resolution is a function of the PR2 register
Equation 28-3 is used to calculate the PWM duty cycle value as shown by Equation 28-4.
ratio.
EQUATION 28-4: PWM RESOLUTION
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Reset
‘1’ = Bit is set ‘0’ = Bit is cleared
Note 1: All modes will set the CCPxIF bit, and will trigger an ADC conversion if CCPx is selected as the ADC trigger source.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Reset
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Reset
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Reset
‘1’ = Bit is set ‘0’ = Bit is cleared
modules.
(1)
TMRx = PWMxDC
Rev. 10-000022B
9/24/2014
PWMx_out
To Peripherals
10-bit Latch
(Not visible to user)
Comparator R Q
0
PPS PWMx
1
S Q
TMR2 Module
R PWMxPOL RxyPPS TRIS Control
TMR2 (1)
Comparator
T2_match
PR2
Note 1: 8-bit timer is concatenated with two bits generated by Fosc or two bits of the internal prescaler to
create 10-bit time-base.
29.1.9 SETUP FOR PWM OPERATION 6. Wait until the TMR2IF is set.
The following steps should be taken when configuring 7. When the TMR2IF flag bit is set:
the module for using the PWMx outputs: • Clear the associated TRIS bit(s) to enable the out-
put driver.
1. Disable the PWMx pin output driver(s) by setting
• Route the signal to the desired pin by configuring
the associated TRIS bit(s).
the RxyPPS register.
2. Configure the PWM output polarity by • Enable the PWMx module by setting the
configuring the PWMxPOL bit of the PWMxCON PWMxEN bit of the PWMxCON register.
register.
In order to send a complete duty cycle and period on
3. Load the PR2 register with the PWM period value,
the first PWM output, the above steps must be followed
as determined by Equation 29-1.
in the order given. If it is not critical to start with a
4. Load the PWMxDCH register and bits <7:6> of complete PWM signal, then the PWM module can be
the PWMxDCL register with the PWM duty cycle enabled during Step 2 by setting the PWMxEN bit of
value, as determined by Equation 29-2. the PWMxCON register.
5. Configure and start Timer2:
• Clear the TMR2IF interrupt flag bit of the PIR4
register.
• Select the Timer2 prescale value by configuring
the CKPS<2:0> bits of the T2CON register.
• Enable Timer2 by setting the Timer2 ON bit of the
T2CON register.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Rev. 10-000166B
8/29/2014
CWG_data
PIC16(L)F15356/75/76/85/86
D Q
CWGxISM<3:0>
E Q
R
Falling Deadband Block
clock CWG_dataB
signal_out
signal_in CWG_dataD
EN
SHUTDOWN
HFINTOSC 1
FOSC 0
CWGxCLK<0>
DS40001866B-page 376
PIC16(L)F15356/75/76/85/86
30.1.2 PUSH-PULL MODE
In Push-Pull mode, two output signals are generated,
alternating copies of the input as illustrated in
Figure 30-2. This alternation creates the push-pull
effect required for driving some transformer-based
power supply designs.
The push-pull sequencer is reset whenever EN = 0 or
if an auto-shutdown event occurs. The sequencer is
clocked by the first input pulse, and the first output
appears on CWG1A.
The unused outputs CWG1C and CWG1D drive copies
of CWG1A and CWG1B, respectively, but with polarity
controlled by the POLC and POLD bits of the
CWG1CON1 register, respectively.
Rev. 10-000167B
8/29/2014
CWG_data
See
CWGxISM
Register D Q
CWG_dataA
Q CWG_dataC
R
CWG_dataB
D Q
PIC16(L)F15356/75/76/85/86
CWG_dataD
CWGxISM<3:0>
E Q
R
EN
SHUTDOWN
DS40001866B-page 378
FIGURE 30-3: SIMPLIFIED CWG BLOCK DIAGRAM (FORWARD AND REVERSE FULL-BRIDGE MODES)
2016-2018 Microchip Technology Inc.
Rev. 10-000165B
8/29/2014
D Q CWG_dataB
D Q
Q CWG_dataC
PIC16(L)F15356/75/76/85/86
CWGxISM<3:0>
E
R
Q CWG_dataD
clock
signal_out
signal_in
Forward Deadband Block
EN CWG_data
SHUTDOWN
HFINTOSC 1
FOSC 0
CWGxCLK<0>
DS40001866B-page 379
PIC16(L)F15356/75/76/85/86
30.1.4 STEERING MODES
In Steering modes, the data input can be steered to any
or all of the four CWG output pins. In Synchronous
Steering mode, changes to steering selection registers
take effect on the next rising input.
In Non-Synchronous mode, steering takes effect on the
next instruction cycle. Additional details are provided in
Section 30.9 “CWG Steering Mode”.
See
CWGxISM CWG_dataA
Register
CWG_dataB
CWG_data
CWG_dataC
CWG_dataD
D Q
CWGxISM <3:0>
E Q
R
EN
SHUTDOWN
Rev. 10-000171B
9/24/2014
LSAC<1:0>
‘1’ 11 RxyPPS
TRIS Control
‘0’ 10
1
CWG_dataA High Z 01 PPS CWGxA
1 0
POLA 00
OVRA 0
STRA(1)
LSBD<1:0>
‘1’ 11 RxyPPS
TRIS Control
‘0’ 10
1
CWG_dataB High Z 01 PPS CWGxB
1 0
POLB 00
OVRB 0
STRB(1)
LSAC<1:0>
‘1’ 11 RxyPPS
TRIS Control
‘0’ 10
1
CWG_dataC High Z 01 PPS CWGxC
1 0
POLC 00
OVRC 0
STRC(1)
LSBD<1:0>
‘1’ 11 RxyPPS
TRIS Control
‘0’ 10
1
CWG_dataD High Z 01 PPS CWGxD
1 0
POLD 00
OVRD 0
STRD(1)
CWG_shutdown
Note 1: STRx is held to 1 in all modes other than Output Steering Mode.
cwg_clock
Input Source
CWG1A
CWG1B
PIC16(L)F15356/75/76/85/86
FIGURE 30-7: DEAD-BAND OPERATION, CWG1DBR = 03H, CWG1DBF = 04H, SOURCE SHORTER THAN DEAD BAND
cwg_clock
Input Source
CWG1A
CWG1B
Therefore:
1
TDEADBAND_UNCERTAINTY = ----------------------------
-
Fcwg_clock
1 -
= -----------------
16MHz
= 62.5ns
MODE0
CWG1A
CWG1B
CWG1C
CWG1D
Note 1: WGPOL{ABCD} = 0
2: The direction bit MODE<0> (Register 30-1) can be written any time during the PWM cycle, and takes effect at the
next rising CWG1_data.
3: When changing directions, CWG1A and CWG1C switch at rising CWG1_data; modulated CWG1B and CWG1D
are held inactive for the dead band duration shown; dead band affects only the first pulse after the direction change.
CWG1_clock
CWG1A
CWG1C
Rising Event Dead Band Rising Event D
Falling Event Dead Band Falling Event Dead Band
CWG1B
CWG1D
CWG1_data
Note: CWG1_rising_src = CCP1_out, CWG1_falling_src = ~CCP1_out
Rising Event
CWG1_data
(Rising and Falling Source)
STR<D:A>
follows CWG1_data
CWG1_data
(Rising and Falling Source)
STR<D:A>
follows CWG1_data
PPS
INAS
CWGxINPPS
C1OUT_sync
C1AS
C2OUT_sync
C2AS
TMR2_postscaled SHUTDOWN S
S Q
TMR2AS
D Q CWG_shutdown
REN FREEZE
R
Write ‘0’ to
SHUTDOWN bit
CWG_data CK
PIC16(L)F15356/75/76/85/86
DS40001866B-page 389
PIC16(L)F15356/75/76/85/86
30.12 Configuring the CWG 30.12.2 AUTO-SHUTDOWN RESTART
The following steps illustrate how to properly configure After an auto-shutdown event has occurred, there are
the CWG. two ways to resume operation:
CWG Input
Source
Shutdown Source
SHUTDOWN
PIC16(L)F15356/75/76/85/86
No Shutdown
Shutdown Output Resumes
FIGURE 30-14: SHUTDOWN FUNCTIONALITY, AUTO-RESTART ENABLED (REN = 1, LSAC = 01, LSBD = 01)
CWG Input
Source
Shutdown Source
SHUTDOWN
CWG1C
Legend:
HC = Bit is cleared by hardware HS = Bit is set by hardware
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared q = Value depends on condition
Note 1: This bit can only be set after EN = 1 and cannot be set in the same instruction that EN is set.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared q = Value depends on condition
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared q = Value depends on condition
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared q = Value depends on condition
Legend:
HC = Bit is cleared by hardware HS = Bit is set by hardware
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared q = Value depends on condition
Note 1: This bit may be written while EN = 0 (CWG1CON0 register) to place the outputs into the shutdown
configuration.
2: The outputs will remain in auto-shutdown state until the next rising edge of the input signal after this bit is
cleared.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared q = Value depends on condition
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared q = Value depends on condition
Note 1: The bits in this register apply only when MODE<2:0> = 00x.
2: This bit is effectively double-buffered when MODE<2:0> = 001.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared q = Value depends on condition
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared q = Value depends on condition
CWG1CLKCON — — — — — — — CS 398
CWG1DAT — — — — DAT<3:0> 398
CWG1DBR — — DBR<5:0> 394
CWG1DBF — — DBF<5:0> 394
CWG1CON0 EN LD — — — MODE<2:0> 397
CWG1CON1 — — IN — POLD POLC POLB POLA 393
CWG1AS0 SHUTDOWN REN LSBD<1:0> LSAC<1:0> — — 395
CWG1AS1 — — — AS4E AS3E AS2E AS1E AS0E 396
CWG1STR OVRD OVRC OVRB OVRA STRD STRC STRB STRA 397
Legend: – = unimplemented locations read as ‘0’. Shaded cells are not used by CWG.
Rev. 10-000025H
11/9/2016
OUT
D Q
CLCxOUT
Q1
LCx_in[0]
LCx_in[1] CLCx_out
to Peripherals
LCx_in[2]
Input Data Selection Gates(1)
. lcxg1
EN
CLCxPPS
. lcxg2
lcxg3
Logic
Function
(2)
lcxq
PPS CLCx
. lcxg4
POL TRIS
Data Selection
LCx_in
Data GATE 1
lcxd1T LCxD1G1T
lcxd1N LCxD1G1N
LCx_in
LCxD2G1T
LCxD1S<5:0>
LCxD2G1N lcxg1
LCx_in
LCxD3G1T
LCxG1POL
lcxd2T
LCxD3G1N
lcxd2N
LCxD4G1T
LCx_in
LCxD2S<5:0> LCxD4G1N
LCx_in
Data GATE 2
lcxg2
lcxd3T
(Same as Data GATE 1)
lcxd3N
Data GATE 3
LCx_in
lcxg3
LCxD3S<5:0>
(Same as Data GATE 1)
lcxd4N
LCx_in
LCxD4S<5:0>
AND-OR OR-XOR
lcxg1 lcxg1
lcxg2 lcxg2
lcxq lcxq
lcxg3 lcxg3
lcxg4 lcxg4
lcxg1 lcxg1
S Q lcxq
lcxg2
lcxg2
lcxq
lcxg3
lcxg3
R
lcxg4 lcxg4
lcxg1 R
lcxg1 R
lcxg3 lcxg3
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Register
Name Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
on Page
Data Bus
Read Write
SSPxBUF Reg
SSPDATPPS
SDI
PPS SSPSR Reg
SDO bit 0 Shift
Clock
PPS
RxyPPS
Edge
SSPSSPPS Select
SSPCLKPPS(2) SSPM<3:0>
SCK PPS
4
( T2_match
2
)
Edge Prescaler TOSC
PPS Select 4, 16, 64
Internal
data bus [SSPM<3:0>]
SSPDATPPS(1) Read Write
SDA
SDA in
PPS SSPxBUF Baud Rate
Generator
(SSPxADD)
Shift
RxyPPS(1) Clock
PPS
Note 1: SDA pin selections must be the same for input and output
2: SCL pin selections must be the same for input and output
Internal
Data Bus
Read Write
SSPxMSK Reg
SSPDATPPS(1)
SDA Match Detect Addr Match
PPS
SSPxADD Reg
PPS
Start and Set, Reset
RxyPPS(1) Stop bit Detect S, P bits
(SSPxSTAT Reg)
Note 1: SDA pin selections must be the same for input and output
2: SCL pin selections must be the same for input and output
SCK SCK
SPI Master
SDO SDI SPI Slave
SDI SDO #1
General I/O SS
General I/O
General I/O SCK
SDI SPI Slave
SDO #2
SS
SCK
SDI SPI Slave
SDO #3
SS
Slave Select
General I/O SS
Processor 1 (optional) Processor 2
Write to
SSPxBUF
SCK
(CKP = 0
CKE = 0)
SCK
(CKP = 1
CKE = 0)
4 Clock
SCK Modes
(CKP = 0
CKE = 1)
SCK
(CKP = 1
CKE = 1)
Input
Sample
(SMP = 1)
SSPxIF
SSPxSR to
SSPxBUF
SCK SCK
SPI Master
SDO SDI SPI Slave
SDI SDO #1
General I/O SS
SCK
SDI SPI Slave
SDO #2
SS
SCK
SDI SPI Slave
SDO #3
SS
SS
SCK
(CKP = 0
CKE = 0)
SCK
(CKP = 1
CKE = 0)
Write to
SSPxBUF
Shift register SSPxSR
and bit count are reset
SSPxBUF to
SSPxSR
SDI bit 0
bit 7 bit 7
Input
Sample
SSPxIF
Interrupt
Flag
SSPxSR to
SSPxBUF
SS
Optional
SCK
(CKP = 0
CKE = 0)
SCK
(CKP = 1
CKE = 0)
Write to
SSPxBUF
Valid
SDO bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0
SDI
bit 7 bit 0
Input
Sample
SSPxIF
Interrupt
Flag
SSPxSR to
SSPxBUF
Write Collision
detection active
SS
Not Optional
SCK
(CKP = 0
CKE = 1)
SCK
(CKP = 1
CKE = 1)
Write to
SSPxBUF
Valid
SDO bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0
SDI
bit 7 bit 0
Input
Sample
SSPxIF
Interrupt
Flag
SSPxSR to
SSPxBUF
Write Collision
detection active
The hold time of the SDA pin is selected by the SDAHT The I2C specification defines a Start condition as a
bit of the SSPxCON3 register. Hold time is the time transition of SDA from a high to a low state while SCL
SDA is held valid after the falling edge of SCL. Setting line is high. A Start condition is always generated by
the SDAHT bit selects a longer 300 ns minimum hold the master and signifies the transition of the bus from
time and may help on buses with large capacitance. an Idle to an active state. Figure 32-12 shows wave
forms for Start and Stop conditions.
TABLE 32-1: I2C BUS TERMS
32.4.6 STOP CONDITION
TERM Description
A Stop condition is a transition of the SDA line from
Transmitter The device which shifts data out low-to-high state while the SCL line is high.
onto the bus.
Receiver The device which shifts data in Note: At least one SCL low time must appear
from the bus. before a Stop is valid, therefore, if the SDA
line goes low then high again while the SCL
Master The device that initiates a transfer,
line stays high, only the Start condition is
generates clock signals and termi-
detected.
nates a transfer.
Slave The device addressed by the 32.4.7 RESTART CONDITION
master.
Multi-master A bus with more than one device A Restart is valid any time that a Stop would be valid.
that can initiate data transfers. A master can issue a Restart if it wishes to hold the
bus after terminating the current transfer. A Restart
Arbitration Procedure to ensure that only one
has the same effect on the slave that a Start would,
master at a time controls the bus.
resetting all slave logic and preparing it to clock in an
Winning arbitration ensures that
address. The master may want to address the same or
the message is not corrupted.
another slave. Figure 32-13 shows the wave form for a
Synchronization Procedure to synchronize the Restart condition.
clocks of two or more devices on
the bus. In 10-bit Addressing Slave mode a Restart is required
for the master to clock data out of the addressed
Idle No master is controlling the bus,
slave. Once a slave has been fully addressed, match-
and both SDA and SCL lines are
ing both high and low address bytes, the master can
high.
issue a Restart and the high address byte with the R/
Active Any time one or more master W bit set. The slave logic will then hold the clock and
devices are controlling the bus. prepare to clock out data.
Addressed Slave device that has received a
Slave matching address and is actively 32.4.8 START/STOP CONDITION INTERRUPT
being clocked by a master. MASKING
Matching Address byte that is clocked into a The SCIE and PCIE bits of the SSPxCON3 register
Address slave that matches the value can enable the generation of an interrupt in Slave
stored in SSPxADD. modes that do not typically support this function. Slave
Write Request Slave receives a matching modes where interrupt on Start and Stop detect are
address with R/W bit clear, and is already enabled, these bits will have no effect.
ready to clock in data.
Read Request Master sends an address byte with
the R/W bit set, indicating that it
wishes to clock data out of the
Slave. This data is the next and all
following bytes until a Restart or
Stop.
Clock Stretching When a device on the bus hold
SCL low to stall communication.
Bus Collision Any time the SDA line is sampled
low by the module while it is out-
putting and expected high state.
SDA
SCL
S P
Change of Change of
Data Allowed Data Allowed
Start Stop
Condition Condition
Sr
Change of Change of
Data Allowed Data Allowed
Restart
Condition
32.4.9 ACKNOWLEDGE SEQUENCE Slave software, when the AHEN and DHEN bits are
set, allow the user to set the ACK value sent back to
The 9th SCL pulse for any transferred byte in I2C is the transmitter. The ACKDT bit of the SSPxCON2
dedicated as an Acknowledge. It allows receiving register is set/cleared to determine the response.
devices to respond back to the transmitter by pulling
the SDA line low. The transmitter must release control There are certain conditions where an ACK will not be
of the line during this time to shift in the response. The sent by the slave. If the BF bit of the SSPxSTAT
Acknowledge (ACK) is an active-low signal, pulling the register or the SSPOV bit of the SSPxCON1 register
SDA line low indicates to the transmitter that the are set when a byte is received.
device has received the transmitted data and is ready When the module is addressed, after the eighth falling
to receive more. edge of SCL on the bus, the ACKTIM bit of the
The result of an ACK is placed in the ACKSTAT bit of SSPxCON3 register is set. The ACKTIM bit indicates
the SSPxCON2 register. the acknowledge time of the active bus. The ACKTIM
Status bit is only active when the AHEN bit or DHEN
bit is enabled.
The MSSP Slave mode operates in one of four modes When the R/W bit of a matching received address byte
selected by the SSPM bits of SSPxCON1 register. The is clear, the R/W bit of the SSPxSTAT register is
modes can be divided into 7-bit and 10-bit Addressing cleared. The received address is loaded into the
mode. 10-bit Addressing modes operate the same as SSPxBUF register and acknowledged.
7-bit with some additional overhead for handling the When the overflow condition exists for a received
larger addresses. address, then not Acknowledge is given. An overflow
Modes with Start and Stop bit interrupts operate the condition is defined as either bit BF of the SSPxSTAT
same as the other modes with SSPxIF additionally register is set, or bit SSPOV of the SSPxCON1 register
getting set upon detection of a Start, Restart, or Stop is set. The BOEN bit of the SSPxCON3 register
condition. modifies this operation. For more information see
Register 32-4.
32.5.1 SLAVE MODE ADDRESSES
An MSSP interrupt is generated for each transferred
The SSPxADD register (Register 32-6) contains the data byte. Flag bit, SSPxIF, must be cleared by
Slave mode address. The first byte received after a software.
Start or Restart condition is compared against the When the SEN bit of the SSPxCON2 register is set,
value stored in this register. If the byte matches, the SCL will be held low (clock stretch) following each
value is loaded into the SSPxBUF register and an received byte. The clock must be released by setting
interrupt is generated. If the value does not match, the the CKP bit of the SSPxCON1 register.
module goes idle and no indication is given to the
software that anything happened. 32.5.2.1 7-bit Addressing Reception
The SSP Mask register (Register 32-5) affects the This section describes a standard sequence of events
address matching process. See Section 32.5.9 “SSP for the MSSP module configured as an I2C slave in 7-
Mask Register” for more information. bit Addressing mode. Figure 32-14 and Figure 32-15
is used as a visual reference for this description.
32.5.1.1 I2C Slave 7-bit Addressing Mode
This is a step by step process of what typically must
In 7-bit Addressing mode, the LSb of the received data be done to accomplish I2C communication.
byte is ignored when determining if there is an address
1. Start bit detected.
match.
2. S bit of SSPxSTAT is set; SSPxIF is set if
32.5.1.2 I2C Slave 10-bit Addressing Mode interrupt on Start detect is enabled.
In 10-bit Addressing mode, the first received byte is 3. Matching address with R/W bit clear is received.
compared to the binary value of ‘1 1 1 1 0 A9 A8 0’. A9 4. The slave pulls SDA low sending an ACK to the
and A8 are the two MSb’s of the 10-bit address and master, and sets SSPxIF bit.
stored in bits 2 and 1 of the SSPxADD register. 5. Software clears the SSPxIF bit.
After the acknowledge of the high byte the UA bit is set 6. Software reads received address from
and SCL is held low until the user updates SSPxADD SSPxBUF clearing the BF flag.
with the low address. The low address byte is clocked 7. If SEN = 1; Slave software sets CKP bit to
in and all eight bits are compared to the low address release the SCL line.
value in SSPxADD. Even if there is not an address 8. The master clocks out a data byte.
match; SSPxIF and UA are set, and SCL is held low 9. Slave drives SDA low sending an ACK to the
until SSPxADD is updated to receive a high byte master, and sets SSPxIF bit.
again. When SSPxADD is updated the UA bit is
10. Software clears SSPxIF.
cleared. This ensures the module is ready to receive
the high address byte on the next communication. 11. Software reads the received byte from
SSPxBUF clearing BF.
A high and low address match as a write request is
12. Steps 8-12 are repeated for all received bytes
required at the start of all 10-bit addressing communi-
from the master.
cation. A transmission can be initiated by issuing a
Restart once the slave is addressed, and clocking in 13. Master sends Stop condition, setting P bit of
the high address with the R/W bit set. The slave SSPxSTAT, and the bus goes idle.
hardware will then acknowledge the read request and
prepare to clock out data. This is only valid for a slave
after it has received a complete high and low address
byte match.
SCL
PIC16(L)F15356/75/76/85/86
1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9
S P
SSPxIF
SSPxIF set on 9th
Cleared by software Cleared by software falling edge of
SCL
BF
First byte
SSPxBUF is read of data is
available
in SSPxBUF
SSPOV
PIC16(L)F15356/75/76/85/86
Clock is held low until CKP is set to ‘1’
SSPxIF
BF
First byte
of data is
SSPxBUF is read available
in SSPxBUF
SSPOV
CKP
low because
releasing SCL releasing SCL
ACK= 1
FIGURE 32-16: I2C SLAVE, 7-BIT ADDRESS, RECEPTION (SEN = 0, AHEN = 1, DHEN = 1)
2016-2018 Microchip Technology Inc.
SCL
S 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 P
SSPxIF
If AHEN = 1: SSPxIF is set on
SSPxIF is set 9th falling edge of Cleared by software No interrupt
SCL, after ACK after not ACK
PIC16(L)F15356/75/76/85/86
BF from Slave
Address is
read from Data is read from SSPxBUF
ACKDT SSPxBUF
Slave software
clears ACKDT to Slave software
ACK the received sets ACKDT to
CKP byte not ACK
When AHEN = 1:
When DHEN = 1: CKP set by software,
CKP is cleared by hardware
CKP is cleared by SCL is released
and SCL is stretched hardware on 8th falling
edge of SCL
ACKTIM
P
FIGURE 32-17: I2C SLAVE, 7-BIT ADDRESS, RECEPTION (SEN = 1, AHEN = 1, DHEN = 1)
2016-2018 Microchip Technology Inc.
Master sends
Stop condition
Master releases
R/W = 0 SDA to slave for ACK sequence
Receiving Address Receive Data Receive Data ACK
SDA ACK
A7 A6 A5 A4 A3 A2 A1 D7 D6 D5 D4 D3 D2 D1 D0 ACK D7 D6 D5 D4 D3 D2 D1 D0
SCL
1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 P
S
SSPxIF
Cleared by software No interrupt after
PIC16(L)F15356/75/76/85/86
if not ACK
from Slave
BF
Received
address is loaded into Received data is SSPxBUF can be
SSPxBUF available on SSPxBUF read any time before
next byte is loaded
ACKDT
ACKTIM
P
PIC16(L)F15356/75/76/85/86
32.5.3 SLAVE TRANSMISSION 32.5.3.2 7-bit Transmission
When the R/W bit of the incoming address byte is set A master device can transmit a read request to a
and an address match occurs, the R/W bit of the slave, and then clock data out of the slave. The list
SSPxSTAT register is set. The received address is below outlines what software for a slave will need to
loaded into the SSPxBUF register, and an ACK pulse is do to accomplish a standard transmission. Figure 32-
sent by the slave on the ninth bit. 18 can be used as a reference to this list.
Following the ACK, slave hardware clears the CKP bit 1. Master sends a Start condition on SDA and
and the SCL pin is held low (see Section 32.5.6 SCL.
“Clock Stretching” for more detail). By stretching the 2. S bit of SSPxSTAT is set; SSPxIF is set if
clock, the master will be unable to assert another clock interrupt on Start detect is enabled.
pulse until the slave is done preparing the transmit 3. Matching address with R/W bit set is received by
data. the Slave setting SSPxIF bit.
The transmit data must be loaded into the SSPxBUF 4. Slave hardware generates an ACK and sets
register which also loads the SSPxSR register. Then SSPxIF.
the SCL pin should be released by setting the CKP bit 5. SSPxIF bit is cleared by software.
of the SSPxCON1 register. The eight data bits are
6. Software reads the received address from
shifted out on the falling edge of the SCL input. This
SSPxBUF, clearing BF.
ensures that the SDA signal is valid during the SCL
high time. 7. R/W is set so CKP was automatically cleared by
hardware after the ACK.
The ACK pulse from the master-receiver is latched on
8. The slave software loads the transmit data into
the rising edge of the ninth SCL input pulse. This ACK
SSPxBUF.
value is copied to the ACKSTAT bit of the SSPxCON2
register. If ACKSTAT is set (not ACK), then the data 9. CKP bit is set in software, releasing SCL, allow-
transfer is complete. In this case, when the not ACK is ing the master to clock the data out of the slave.
latched by the slave, the slave goes idle and waits for 10. SSPxIF is set after the ACK response from the
another occurrence of the Start bit. If the SDA line was master is loaded into the ACKSTAT bit.
low (ACK), the next transmit data must be loaded into 11. SSPxIF bit is cleared.
the SSPxBUF register. Again, the SCL pin must be 12. The slave software checks the ACKSTAT bit to
released by setting bit CKP. see if the master wants to clock out more data.
An MSSP interrupt is generated for each data transfer Note 1:If the master ACKs the clock will be
byte. The SSPxIF bit must be cleared by software and stretched.
the SSPxSTAT register is used to determine the status
of the byte. The SSPxIF bit is set on the falling edge of 2: ACKSTAT is the only bit updated on the
the ninth clock pulse. rising edge of SCL (9th) rather than the
falling.
32.5.3.1 Slave Mode Bus Collision 13. Steps 9-13 are repeated for each transmitted
A slave receives a read request and begins shifting byte.
data out on the SDA line. If a bus collision is detected 14. If the master sends a not ACK; the clock is not
and the SBCDE bit of the SSPxCON3 register is set, held, but SSPxIF is still set.
the BCL1IF bit of the PIR3 register is set. Once a bus 15. The master sends a Restart condition or a Stop.
collision is detected, the slave goes idle and waits to be
16. The slave is no longer addressed.
addressed again. User software can use the BCL1IF bit
to handle a slave bus collision.
Master sends
Stop condition
SCL
1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9
S P
SSPxIF
Cleared by software
BF
BF is automatically
PIC16(L)F15356/75/76/85/86
Received address Data to transmit is cleared after 8th falling
is read from SSPxBUF loaded into SSPxBUF edge of SCL
CKP
When R/W is set CKP is not
SCL is always held for not
held low after 9th SCL Set by software ACK
falling edge
ACKSTAT
Indicates an address
has been received
DS40001866B-page 438
P
PIC16(L)F15356/75/76/85/86
32.5.3.3 7-bit Transmission with Address
Hold Enabled
Setting the AHEN bit of the SSPxCON3 register
enables additional clock stretching and interrupt
generation after the eighth falling edge of a received
matching address. Once a matching address has
been clocked in, CKP is cleared and the SSPxIF
interrupt is set.
Figure 32-19 displays a standard waveform of a 7-bit
address slave transmission with AHEN enabled.
1. Master sends Start condition; the S bit of
SSPxSTAT is set; SSPxIF is set if interrupt on
Start detect is enabled.
2. Master sends matching address with R/W bit
set. After the eighth falling edge of the SCL line
the CKP bit is cleared by hardware and SSPxIF
interrupt is generated.
3. Slave software clears SSPxIF.
4. Slave software reads ACKTIM bit of SSPxCON3
register, and R/W and D/A of the SSPxSTAT
register to determine the source of the interrupt.
5. Slave reads the address value from the
SSPxBUF register clearing the BF bit.
6. Slave software decides from this information if it
wishes to ACK or not ACK and sets the ACKDT
bit of the SSPxCON2 register accordingly.
7. Slave software sets the CKP bit releasing SCL.
8. Master clocks in the ACK value from the slave.
9. Slave hardware automatically clears the CKP bit
and sets SSPxIF after the ACK if the R/W bit is
set.
10. Slave software clears SSPxIF.
11. Slave loads value to transmit to the master into
SSPxBUF setting the BF bit.
Note: SSPxBUF cannot be loaded until after the
ACK.
12. Slave sets the CKP bit releasing the clock.
13. Master clocks out the data from the slave and
sends an ACK value on the ninth SCL pulse.
14. Slave hardware copies the ACK value into the
ACKSTAT bit of the SSPxCON2 register.
15. Steps 10-15 are repeated for each byte transmit-
ted to the master from the slave.
16. If the master sends a not ACK the slave
releases the bus allowing the master to send a
Stop and end the communication.
Note: Master must send a not ACK on the last
byte to ensure that the slave releases the
SCL line to receive a Stop.
Master sends
Master releases SDA Stop condition
to slave for ACK sequence
Receiving Address R/W = 1 Automatic Transmitting Data
Automatic Transmitting Data ACK
SDA ACK ACK
A7 A6 A5 A4 A3 A2 A1 D7 D6 D5 D4 D3 D2 D1 D0 D7 D6 D5 D4 D3 D2 D1 D0
SCL
S 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9
P
SSPxIF
Cleared by software
BF BF is automatically
Received address Data to transmit is cleared after 8th falling
PIC16(L)F15356/75/76/85/86
is read from SSPxBUF loaded into SSPxBUF edge of SCL
ACKDT
Slave clears
ACKDT to ACK
address
ACKSTAT
Master’s ACK
response is copied
to SSPxSTAT
CKP
When AHEN = 1; CKP not cleared
CKP is cleared by hardware When R/W = 1; Set by software, after not ACK
after receiving matching CKP is always releases SCL
address. cleared after ACK
ACKTIM
ACKTIM is set on 8th falling ACKTIM is cleared
edge of SCL on 9th rising edge of SCL
DS40001866B-page 440
R/W
D/A
PIC16(L)F15356/75/76/85/86
32.5.4 SLAVE MODE 10-BIT ADDRESS 32.5.5 10-BIT ADDRESSING WITH ADDRESS OR
RECEPTION DATA HOLD
This section describes a standard sequence of events Reception using 10-bit addressing with AHEN or
for the MSSP module configured as an I2C slave in 10- DHEN set is the same as with 7-bit modes. The only
bit Addressing mode. difference is the need to update the SSPxADD register
Figure 32-20 is used as a visual reference for this using the UA bit. All functionality, specifically when the
description. CKP bit is cleared and SCL line is held low are the
same. Figure 32-21 can be used as a reference of a
This is a step by step process of what must be done by slave in 10-bit addressing with AHEN set.
slave software to accomplish I2C communication.
Figure 32-22 shows a standard waveform for a slave
1. Master sends Start condition; S bit of SSPxSTAT transmitter in 10-bit Addressing mode.
is set; SSPxIF is set if interrupt on Start detect is
enabled.
2. Master sends matching high address with R/W
bit clear; UA bit of the SSPxSTAT register is set.
3. Slave sends ACK and SSPxIF is set.
4. Software clears the SSPxIF bit.
5. Software reads received address from
SSPxBUF clearing the BF flag.
6. Slave loads low address into SSPxADD,
releasing SCL.
7. Master sends matching low address byte to the
slave; UA bit is set.
Note: Updates to the SSPxADD register are not
allowed until after the ACK sequence.
Master sends
Stop condition
Receive First Address Byte Receive Second Address Byte Receive Data Receive Data
SDA
1 1 1 1
0 A9 A8 ACK A7 A6 A5 A4 A3 A2 A1 A0 ACK D7 D6 D5 D4 D3 D2 D1 D0 ACK D7 D6 D5 D4 D3 D2 D1 D0 ACK
SCL
1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 P
S
SCL is held low
while CKP = 0
PIC16(L)F15356/75/76/85/86
SSPxIF
Set by hardware Cleared by software
on 9th falling edge
BF
If address matches Receive address is Data is read
SSPxADD it is loaded into read from SSPxBUF from SSPxBUF
SSPxBUF
UA
When UA = 1; Software updates SSPxADD
SCL is held low and releases SCL
CKP
Receive First Address Byte R/W = 0 Receive Second Address Byte Receive Data Receive Data
SDA 1 1 1 1 0 A9 A8 ACK A7 A6 A5 A4 A3 A2 A1 A0 ACK D7 D6 D5 D4 D3 D2 D1 D0 ACK D7 D6 D5
SCL S 1 2 3 4 5 6 7 8 9 UA 1 2 3 4 5 6 7 8 9 UA 1 2 3 4 5 6 7 8 9 1 2
SSPxIF
Set by hardware Cleared by software Cleared by software
on 9th falling edge
PIC16(L)F15356/75/76/85/86
BF
UA
Master sends
Master sends Stop condition
Restart event Master sends
not ACK
Receiving Address R/W = 0 Receiving Second Address Byte Receive First Address Byte Transmitting Data Byte ACK = 1
SDA 1 1 1 1 0 A9 A8 ACK A7 A6 A5 A4 A3 A2 A1 A0 ACK 1 1 1 1 0 A9 A8 ACK D7 D6 D5 D4 D3 D2 D1 D0
SCL 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 P
S
Sr
SSPxIF
PIC16(L)F15356/75/76/85/86
Set by hardware Cleared by software Set by hardware
BF
D/A
Indicates an address
has been received
PIC16(L)F15356/75/76/85/86
32.5.6 CLOCK STRETCHING 32.5.6.3 Byte NACKing
Clock stretching occurs when a device on the bus When AHEN bit of SSPxCON3 is set; CKP is cleared
holds the SCL line low, effectively pausing communi- by hardware after the eighth falling edge of SCL for a
cation. The slave may stretch the clock to allow more received matching address byte. When DHEN bit of
time to handle data or prepare a response for the SSPxCON3 is set; CKP is cleared after the eighth fall-
master device. A master device is not concerned with ing edge of SCL for received data.
stretching as anytime it is active on the bus and not Stretching after the eighth falling edge of SCL allows
transferring data it is stretching. Any stretching done the slave to look at the received address or data and
by a slave is invisible to the master software and decide if it wants to ACK the received data.
handled by the hardware that generates SCL.
The CKP bit of the SSPxCON1 register is used to 32.5.7 CLOCK SYNCHRONIZATION AND THE
control stretching. Any time the CKP bit is cleared, the CKP BIT
module will wait for the SCL line to go low and then Any time the CKP bit is cleared, the module will wait
hold it. Setting CKP will release SCL and allow more for the SCL line to go low and then hold it. However,
communication. clearing the CKP bit will not assert the SCL output low
32.5.6.1 Normal Clock Stretching until the SCL output is already sampled low. There-
fore, the CKP bit will not assert the SCL line until an
Following an ACK if the R/W bit of SSPxSTAT is set, a external I2C master device has already asserted the
read request, the slave hardware will clear CKP. This SCL line. The SCL output will remain low until the CKP
allows the slave time to update SSPxBUF with data to bit is set and all other devices on the I2C bus have
transfer to the master. If the SEN bit of SSPxCON2 is released SCL. This ensures that a write to the CKP bit
set, the slave hardware will always stretch the clock will not violate the minimum high time requirement for
after the ACK sequence. Once the slave is ready; CKP SCL (see Figure 32-23).
is set by software and communication resumes.
Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4
SDA DX DX ‚ – 1
SCL
Master device
CKP asserts clock
Master device
releases clock
WR
SSPxCON1
SCL
1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9
S
SSPxIF
BF (SSPxSTAT<0>)
Cleared by software
SSPxBUF is read
GCEN (SSPxCON2<7>)
’1’
32.5.9 SSP MASK REGISTER This register is reset to all ‘1’s upon any Reset
condition and, therefore, has no effect on standard
An SSP Mask (SSPxMSK) register (Register 32-5) is SSP operation until written with a mask value.
available in I2C Slave mode as a mask for the value
held in the SSPxSR register during an address The SSP Mask register is active during:
comparison operation. A zero (‘0’) bit in the SSPxMSK • 7-bit Address mode: address compare of A<7:1>.
register has the effect of making the corresponding bit • 10-bit Address mode: address compare of A<7:0>
of the received address a “don’t care”. only. The SSP mask has no effect during the
reception of the first (high) byte of the address.
Master mode is enabled by setting and clearing the The master device generates all of the serial clock
appropriate SSPM bits in the SSPxCON1 register and pulses and the Start and Stop conditions. A transfer is
by setting the SSPEN bit. In Master mode, the SDA and ended with a Stop condition or with a Repeated Start
SCK pins must be configured as inputs. The MSSP condition. Since the Repeated Start condition is also
peripheral hardware will override the output driver TRIS the beginning of the next serial transfer, the I2C bus will
controls when necessary to drive the pins low. not be released.
Master mode of operation is supported by interrupt In Master Transmitter mode, serial data is output
generation on the detection of the Start and Stop through SDA, while SCL outputs the serial clock. The
conditions. The Stop (P) and Start (S) bits are cleared first byte transmitted contains the slave address of the
from a Reset or when the MSSP module is disabled. receiving device (7 bits) and the Read/Write (R/W) bit.
Control of the I 2C bus may be taken when the P bit is In this case, the R/W bit will be logic ‘0’. Serial data is
set, or the bus is Idle. transmitted eight bits at a time. After each byte is
transmitted, an Acknowledge bit is received. Start and
In Firmware Controlled Master mode, user code
Stop conditions are output to indicate the beginning
conducts all I 2C bus operations based on Start and
and the end of a serial transfer.
Stop bit condition detection. Start and Stop condition
detection is the only active circuitry in this mode. All In Master Receive mode, the first byte transmitted
other communication is done by the user software contains the slave address of the transmitting device
directly manipulating the SDA and SCL lines. (7 bits) and the R/W bit. In this case, the R/W bit will be
logic ‘1’. Thus, the first byte transmitted is a 7-bit slave
The following events will cause the SSP Interrupt Flag address followed by a ‘1’ to indicate the receive bit.
bit, SSPxIF, to be set (SSP interrupt, if enabled): Serial data is received via SDA, while SCL outputs the
• Start condition generated serial clock. Serial data is received eight bits at a time.
• Stop condition generated After each byte is received, an Acknowledge bit is
transmitted. Start and Stop conditions indicate the
• Data transfer byte transmitted/received
beginning and end of transmission.
• Acknowledge transmitted/received
A Baud Rate Generator is used to set the clock
• Repeated Start generated
frequency output on SCL. See Section 32.7 “Baud
Note 1:The MSSP module, when configured in I2C Rate Generator” for more detail.
Master mode, does not allow queuing of
events. For instance, the user is not
allowed to initiate a Start condition and
immediately write the SSPxBUF register
to initiate transmission before the Start
condition is complete. In this case, the
SSPxBUF will not be written to and the
WCOL bit will be set, indicating that a
write to the SSPxBUF did not occur
2: When in Master mode, Start/Stop
detection is masked and an interrupt is
generated when the SEN/PEN bit is
cleared and the generation is complete.
SDA DX DX ‚ – 1
BRG decrements on
Q2 and Q4 cycles
BRG
03h 02h 01h 00h (hold off) 03h 02h
Value
TBRG
SCL
S
TBRG
SDA A7 A6 A5 A4 A3 A2 A1 ACK = 0 D7 D6 D5 D4 D3 D2 D1 D0
PIC16(L)F15356/75/76/85/86
while CPU
responds to SSPxIF
SSPxIF
Cleared by software service routine
Cleared by software from SSP interrupt
Cleared by software
BF (SSPxSTAT<0>)
PEN
DS40001866B-page 452
R/W
PIC16(L)F15356/75/76/85/86
32.6.7 I2C MASTER MODE RECEPTION 32.6.7.4 Typical Receive Sequence:
Master mode reception (Figure 32-29) is enabled by 1. The user generates a Start condition by setting
programming the Receive Enable bit, RCEN bit of the the SEN bit of the SSPxCON2 register.
SSPxCON2 register. 2. SSPxIF is set by hardware on completion of the
Note: The MSSP module must be in an Idle Start.
state before the RCEN bit is set or the 3. SSPxIF is cleared by software.
RCEN bit will be disregarded. 4. User writes SSPxBUF with the slave address to
The Baud Rate Generator begins counting and on each transmit and the R/W bit set.
rollover, the state of the SCL pin changes (high-to-low/ 5. Address is shifted out the SDA pin until all eight
low-to-high) and data is shifted into the SSPxSR. After bits are transmitted. Transmission begins as
the falling edge of the eighth clock, the receive enable soon as SSPxBUF is written to.
flag is automatically cleared, the contents of the 6. The MSSP module shifts in the ACK bit from the
SSPxSR are loaded into the SSPxBUF, the BF flag bit slave device and writes its value into the
is set, the SSPxIF flag bit is set and the Baud Rate ACKSTAT bit of the SSPxCON2 register.
Generator is suspended from counting, holding SCL 7. The MSSP module generates an interrupt at the
low. The MSSP is now in Idle state awaiting the next end of the ninth clock cycle by setting the
command. When the buffer is read by the CPU, the BF SSPxIF bit.
flag bit is automatically cleared. The user can then 8. User sets the RCEN bit of the SSPxCON2
send an Acknowledge bit at the end of reception by set- register and the master clocks in a byte from the
ting the Acknowledge Sequence Enable, ACKEN bit of slave.
the SSPxCON2 register.
9. After the eighth falling edge of SCL, SSPxIF and
32.6.7.1 BF Status Flag BF are set.
10. Master clears SSPxIF and reads the received
In receive operation, the BF bit is set when an address
byte from SSPxBUF, clears BF.
or data byte is loaded into SSPxBUF from SSPxSR. It
is cleared when the SSPxBUF register is read. 11. Master sets ACK value sent to slave in ACKDT
bit of the SSPxCON2 register and initiates the
32.6.7.2 SSPOV Status Flag ACK by setting the ACKEN bit.
In receive operation, the SSPOV bit is set when eight 12. Master’s ACK is clocked out to the slave and
bits are received into the SSPxSR and the BF flag bit is SSPxIF is set.
already set from a previous reception. 13. User clears SSPxIF.
14. Steps 8-13 are repeated for each received byte
32.6.7.3 WCOL Status Flag from the slave.
If the user writes the SSPxBUF when a receive is 15. Master sends a not ACK or Stop to end
already in progress (i.e., SSPxSR is still shifting in a communication.
data byte), the WCOL bit is set and the contents of the
buffer are unchanged (the write does not occur).
Write to SSPxCON2<4>
to start Ackno1wledge sequence
SDA = ACKDT (SSPxCON2<5>) = 0
Write to SSPxCON2<0>(SEN = 1),
begin Start condition ACK from Master Set ACKEN, start Acknowledge sequence
Master configured as a receiver SDA = ACKDT = 0 SDA = ACKDT = 1
SEN = 0 by programming SSPxCON2<3> (RCEN = 1)
PEN bit = 1
Write to SSPxBUF occurs here, RCEN cleared RCEN = 1, start RCEN cleared
ACK from Slave next receive automatically written here
start XMIT automatically
Transmit Address to Slave Receiving Data from Slave Receiving Data from Slave
SDA A7 A6 A5 A4 A3 A2 A1 R/W ACK D7 D6 D5 D4 D3 D2 D1 D0 ACK D7 D6 D5 D4 D3 D2 D1 D0 ACK
Bus master
ACK is not sent terminates
transfer
1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9
SCL S P
Data shifted in on falling edge of CLK Set SSPxIF at end
PIC16(L)F15356/75/76/85/86
of receive Set SSPxIF interrupt
Set SSPxIF interrupt at end of Acknow-
Set SSPxIF interrupt ledge sequence
at end of receive at end of Acknowledge
SSPxIF sequence
Set P bit
Cleared by software Cleared by software Cleared by software Cleared by software (SSPxSTAT<4>)
SDA = 0, SCL = 1 Cleared in
while CPU software and SSPxIF
responds to SSPxIF
BF
(SSPxSTAT<0>) Last bit is shifted into SSPxSR and
contents are unloaded into SSPxBUF
SSPOV
ACKEN
DS40001866B-page 454
RCEN
Master configured as a receiver RCEN cleared ACK from Master RCEN cleared
by programming SSPxCON2<3> (RCEN = 1) automatically SDA = ACKDT = 0 automatically
PIC16(L)F15356/75/76/85/86
32.6.8 ACKNOWLEDGE SEQUENCE 32.6.9 STOP CONDITION TIMING
TIMING A Stop bit is asserted on the SDA pin at the end of a
An Acknowledge sequence is enabled by setting the receive/transmit by setting the Stop Sequence Enable
Acknowledge Sequence Enable bit, ACKEN bit of the bit, PEN bit of the SSPxCON2 register. At the end of a
SSPxCON2 register. When this bit is set, the SCL pin is receive/transmit, the SCL line is held low after the
pulled low and the contents of the Acknowledge data bit falling edge of the ninth clock. When the PEN bit is set,
are presented on the SDA pin. If the user wishes to the master will assert the SDA line low. When the SDA
generate an Acknowledge, then the ACKDT bit should line is sampled low, the Baud Rate Generator is
be cleared. If not, the user should set the ACKDT bit reloaded and counts down to ‘0’. When the Baud Rate
before starting an Acknowledge sequence. The Baud Generator times out, the SCL pin will be brought high
Rate Generator then counts for one rollover period and one TBRG (Baud Rate Generator rollover count)
(TBRG) and the SCL pin is deasserted (pulled high). later, the SDA pin will be deasserted. When the SDA
When the SCL pin is sampled high (clock arbitration), pin is sampled high while SCL is high, the P bit of the
the Baud Rate Generator counts for TBRG. The SCL pin SSPxSTAT register is set. A TBRG later, the PEN bit is
is then pulled low. Following this, the ACKEN bit is auto- cleared and the SSPxIF bit is set (Figure 32-31).
matically cleared, the Baud Rate Generator is turned off
and the MSSP module then goes into IDLE mode 32.6.9.1 WCOL Status Flag
(Figure 32-30). If the user writes the SSPxBUF when a Stop sequence
is in progress, then the WCOL bit is set and the
32.6.8.1 WCOL Status Flag contents of the buffer are unchanged (the write does
If the user writes the SSPxBUF when an Acknowledge not occur).
sequence is in progress, then WCOL bit is set and the
contents of the buffer are unchanged (the write does
not occur).
FIGURE 32-30: ACKNOWLEDGE SEQUENCE WAVEFORM
Acknowledge sequence starts here, ACKEN automatically cleared
write to SSPxCON2
ACKEN = 1, ACKDT = 0
TBRG TBRG
SDA D0 ACK
SCL 8 9
SSPxIF
Cleared in
SSPxIF set at software
the end of receive Cleared in
software SSPxIF set at the end
of Acknowledge sequence
Note: TBRG = one Baud Rate Generator period.
SDA ACK
P
TBRG TBRG TBRG
SCL brought high after TBRG
SDA asserted low before rising edge of clock
to setup Stop condition
SDA
BCL1IF
SDA
SCL
Set SEN, enable Start SEN cleared automatically because of bus collision.
condition if SDA = 1, SCL = 1 SSP module reset into Idle state.
SEN
SDA sampled low before
Start condition. Set BCL1IF.
S bit and SSPxIF set because
BCL1IF SDA = 0, SCL = 1.
SSPxIF and BCL1IF are
cleared by software
SSPxIF
TBRG TBRG
SDA
FIGURE 32-35: BRG RESET DUE TO SDA ARBITRATION DURING START CONDITION
SDA = 0, SCL = 1
Set S Set SSPxIF
Less than TBRG
TBRG
SCL S
SCL pulled low after BRG
time-out
SEN
Set SEN, enable Start
sequence if SDA = 1, SCL = 1
BCL1IF ’0’
SSPxIF
SDA = 0, SCL = 1, Interrupts cleared
set SSPxIF by software
SDA
SCL
RSEN
BCL1IF
Cleared by software
S ’0’
SSPxIF ’0’
TBRG TBRG
SDA
SCL
S ’0’
SSPxIF
PEN
BCL1IF
P ’0’
SSPxIF ’0’
SDA
PEN
BCL1IF
P ’0’
SSPxIF ’0’
SSPM<3:0> SSPxADD<7:0>
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared HS/HC = Hardware set/clear
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared HS = Bit is set by hardware C = User cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared HC = Cleared by hardware S = User set
bit 7 GCEN: General Call Enable bit (in I2C Slave mode only)
1 = Enable interrupt when a general call address (0x00 or 00h) is received in the SSPxSR
0 = General call address disabled
bit 6 ACKSTAT: Acknowledge Status bit (in I2C mode only)
1 = Acknowledge was not received
0 = Acknowledge was received
bit 5 ACKDT: Acknowledge Data bit (in I2C mode only)
In Receive mode:
Value transmitted when the user initiates an Acknowledge sequence at the end of a receive
1 = Not Acknowledge
0 = Acknowledge
bit 4 ACKEN: Acknowledge Sequence Enable bit (in I2C Master mode only)
In Master Receive mode:
1 = Initiate Acknowledge sequence on SDA and SCL pins, and transmit ACKDT data bit.
Automatically cleared by hardware.
0 = Acknowledge sequence idle
bit 3 RCEN: Receive Enable bit (in I2C Master mode only)
1 = Enables Receive mode for I2C
0 = Receive idle
bit 2 PEN: Stop Condition Enable bit (in I2C Master mode only)
SCKMSSP Release Control:
1 = Initiate Stop condition on SDA and SCL pins. Automatically cleared by hardware.
0 = Stop condition Idle
bit 1 RSEN: Repeated Start Condition Enable bit (in I2C Master mode only)
1 = Initiate Repeated Start condition on SDA and SCL pins. Automatically cleared by hardware.
0 = Repeated Start condition Idle
bit 0 SEN: Start Condition Enable/Stretch Enable bit
In Master mode:
1 = Initiate Start condition on SDA and SCL pins. Automatically cleared by hardware.
0 = Start condition Idle
In Slave mode:
1 = Clock stretching is enabled for both slave transmit and slave receive (stretch enabled)
0 = Clock stretching is disabled
Note 1: For bits ACKEN, RCEN, PEN, RSEN, SEN: If the I2C module is not in the IDLE mode, this bit may not be
set (no spooling) and the SSPxBUF may not be written (or writes to the SSPxBUF are disabled).
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Note 1: For daisy-chained SPI operation; allows the user to ignore all but the last received byte. SSPOV is still set when a new
byte is received and BF = 1, but hardware continues to write the most recent byte to SSPxBUF.
2: This bit has no effect in Slave modes that Start and Stop condition detection is explicitly listed as enabled.
3: The ACKTIM Status bit is only active when the AHEN bit or DHEN bit is set.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
REGISTER 32-6: SSPxADD: MSSPx ADDRESS AND BAUD RATE REGISTER (I2C MODE)
R/W-0/0 R/W-0/0 R/W-0/0 R/W-0/0 R/W-0/0 R/W-0/0 R/W-0/0 R/W-0/0
SSPxADD<7:0>
bit 7 bit 0
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Master mode:
bit 7-3 Not used: Unused for Most Significant Address Byte. Bit state of this register is a “don’t care”. Bit
pattern sent by master is fixed by I2C specification and must be equal to ‘11110’. However, those bits
are compared by hardware and are not affected by the value in this register.
bit 2-1 SSPxADD<2:1>: Two Most Significant bits of 10-bit address
bit 0 Not used: Unused in this mode. Bit state is a “don’t care”.
10-Bit Slave mode – Least Significant Address Byte:
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Data Bus
TXxIE
SYNC
Interrupt
CSRC
TXxREG Register TXxIF
8 RxyPPS(1)
CK pin TXEN
MSb LSb RX/DT pin
PPS 1 (8) 0 Pin Buffer
• • • and Control PPS
0 Transmit Shift Register (TSR)
CKPPS SYNC
TRMT TX_out
Baud Rate Generator FOSC
÷n
TX9
BRG16 n
+1 Multiplier x4 x16 x64
TX9D TX/CK pin
SYNC 1 X 0 0 0 0
PPS
SPxBRGH SPxBRGL BRGH X 1 1 0 0
1
BRG16 X 1 0 1 0
RxyPPS
SYNC
Note 1: In Synchronous mode the DT output and RX input PPS CSRC
selections should enable the same pin.
RXPPS(1)
RX/DT pin MSb RSR Register LSb
Pin Buffer Data
PPS and Control Recovery
Stop (8) 7 ••• 1 0 Start
BRG16
+1 n
Multiplier x4 x16 x64
SYNC 1 X 0 0 0
SPxBRGH SPxBRGL BRGH X 1 1 0 0 FIFO
FERR RX9D RCxREG Register
BRG16 X 1 0 1 0
8
Data Bus
Note 1: In Synchronous mode the DT output and RX input PPS RXxIF Interrupt
selections should enable the same pin. RXxIE
Write to TXxREG
Word 1
BRG Output
(Shift Clock)
TX/CK
pin Start bit bit 0 bit 1 bit 7/8 Stop bit
Word 1
TXxIF bit
(Transmit Buffer 1 TCY
Reg. Empty Flag)
Word 1
TRMT bit Transmit Shift Reg.
(Transmit Shift
Reg. Empty Flag)
Write to TXxREG
Word 1 Word 2
BRG Output
(Shift Clock)
TX/CK
pin Start bit bit 0 bit 1 bit 7/8 Stop bit Start bit bit 0
TXxIF bit 1 TCY Word 1 Word 2
(Transmit Buffer
Reg. Empty Flag) 1 TCY
• CREN = 1 Immediately after all data bits and the Stop bit have
been received, the character in the RSR is transferred
• SYNC = 0
to the EUSART receive FIFO and the RXxIF interrupt
• SPEN = 1 flag bit of the PIR3 register is set. The top character in
All other EUSART control bits are assumed to be in the FIFO is transferred out of the FIFO by reading the
their default state. RCxREG register.
Setting the CREN bit of the RCxSTA register enables Note: If the receive FIFO is overrun, no additional
the receiver circuitry of the EUSART. Clearing the SYNC characters will be received until the overrun
bit of the TXxSTA register configures the EUSART for condition is cleared. See Section 33.1.2.5
asynchronous operation. Setting the SPEN bit of the “Receive Overrun Error” for more
RCxSTA register enables the EUSART. The information on overrun errors.
programmer must set the corresponding TRIS bit to
configure the RX/DT I/O pin as an input.
Note: If the RX/DT function is on an analog pin,
the corresponding ANSEL bit must be
cleared for the receiver to function.
Read Rcv
Buffer Reg.
RCxREG
RXxIF
(Interrupt Flag)
OERR bit
CREN
Note: This timing diagram shows three words appearing on the RX input. The RCxREG (receive buffer) is read after the third word,
causing the OERR (overrun) bit to be set.
BRG Clock
RCIDL
RXxIF bit
(Interrupt)
Read
RCxREG
Note 1: The ABD sequence requires the EUSART module to be configured in Asynchronous mode.
Terminating the auto-baud process early to clear an Therefore, the initial character in the transmission must
overflow condition will prevent proper detection of the be all ‘0’s. This must be ten or more bit times, 13-bit
sync character fifth rising edge. If any falling edges of times recommended for LIN bus, or any number of bit
the sync character have not yet occurred when the times for standard RS-232 devices.
ABDEN bit is cleared then those will be falsely detected Oscillator Start-up Time
as Start bits. The following steps are recommended to
Oscillator start-up time must be considered, especially
clear the overflow condition:
in applications using oscillators with longer start-up
1. Read RCxREG to clear RXxIF. intervals (i.e., LP, XT or HS/PLL mode). The Sync
2. If RCIDL is ‘0’ then wait for RDCIF and repeat Break (or wake-up signal) character must be of
step 1. sufficient length, and be followed by a sufficient
3. Clear the ABDOVF bit. interval, to allow enough time for the selected oscillator
to start and provide proper initialization of the EUSART.
33.3.3 AUTO-WAKE-UP ON BREAK WUE Bit
During Sleep mode, all clocks to the EUSART are The wake-up event causes a receive interrupt by
suspended. Because of this, the Baud Rate Generator setting the RXxIF bit. The WUE bit is cleared in
is inactive and a proper character reception cannot be hardware by a rising edge on RX/DT. The interrupt
performed. The Auto-Wake-up feature allows the condition is then cleared in software by reading the
controller to wake-up due to activity on the RX/DT line. RCxREG register and discarding its contents.
This feature is available only in Asynchronous mode.
To ensure that no actual data is lost, check the RCIDL
The Auto-Wake-up feature is enabled by setting the bit to verify that a receive operation is not in process
WUE bit of the BAUDxCON register. Once set, the before setting the WUE bit. If a receive operation is not
normal receive sequence on RX/DT is disabled, and the occurring, the WUE bit may then be set just prior to
EUSART remains in an Idle state, monitoring for a wake- entering the Sleep mode.
up event independent of the CPU mode. A wake-up
event consists of a high-to-low transition on the RX/DT
line. (This coincides with the start of a Sync Break or a
wake-up signal character for the LIN protocol.)
The EUSART module generates an RXxIF interrupt
coincident with the wake-up event. The interrupt is
generated synchronously to the Q clocks in normal CPU
operating modes (Figure 33-7), and asynchronously if
the device is in Sleep mode (Figure 33-8). The interrupt
condition is cleared by reading the RCxREG register.
The WUE bit is automatically cleared by the low-to-high
transition on the RX line at the end of the Break. This
signals to the user that the Break event is over. At this
point, the EUSART module is in IDLE mode waiting to
receive the next character.
RXxIF
Cleared due to User Read of RCxREG
Note 1: The EUSART remains in Idle while the WUE bit is set.
Note 1: If the wake-up event requires long oscillator warm-up time, the automatic clearing of the WUE bit can occur while the stposc signal is
still active. This sequence should not depend on the presence of Q clocks.
2: The EUSART remains in Idle while the WUE bit is set.
33.3.4 BREAK CHARACTER SEQUENCE 33.3.4.1 Break and Sync Transmit Sequence
The EUSART module has the capability of sending the The following sequence will start a message frame
special Break character sequences that are required by header made up of a Break, followed by an auto-baud
the LIN bus standard. A Break character consists of a Sync byte. This sequence is typical of a LIN bus
Start bit, followed by 12 ‘0’ bits and a Stop bit. master.
To send a Break character, set the SENDB and TXEN 1. Configure the EUSART for the desired mode.
bits of the TXxSTA register. The Break character 2. Set the TXEN and SENDB bits to enable the
transmission is then initiated by a write to the TXxREG. Break sequence.
The value of data written to TXxREG will be ignored 3. Load the TXxREG with a dummy character to
and all ‘0’s will be transmitted. initiate transmission (the value is ignored).
The SENDB bit is automatically reset by hardware after 4. Write ‘55h’ to TXxREG to load the Sync
the corresponding Stop bit is sent. This allows the user character into the transmit FIFO buffer.
to preload the transmit FIFO with the next transmit byte 5. After the Break has been sent, the SENDB bit is
following the Break character (typically, the Sync reset by hardware and the Sync character is
character in the LIN specification). then transmitted.
The TRMT bit of the TXxSTA register indicates when the When the TXxREG becomes empty, as indicated by
transmit operation is active or idle, just as it does during the TXxIF, the next data byte can be written to TXxREG.
normal transmission. See Figure 33-9 for the timing of
the Break character sequence.
Write to TXxREG
Dummy Write
BRG Output
(Shift Clock)
TX/CK pin
(SCKP = 1)
Write to
TXxREG Reg Write Word 1 Write Word 2
TXxIF bit
(Interrupt Flag)
TRMT bit
‘1’ ‘1’
TXEN bit
Note: Sync Master mode, SPxBRGL = 0, continuous transmission of two 8-bit words.
TX/CK pin
Write to
TXxREG reg
TXxIF bit
TRMT bit
TXEN bit
33.4.1.5 Synchronous Master Reception To initiate reception, set either SREN or CREN. Data is
sampled at the RX/DT pin on the trailing edge of the
Data is received at the RX/DT pin. The RX/DT pin
TX/CK clock pin and is shifted into the Receive Shift
output driver is automatically disabled when the
Register (RSR). When a complete character is
EUSART is configured for synchronous master receive
received into the RSR, the RXxIF bit is set and the
operation.
character is automatically transferred to the two char-
In Synchronous mode, reception is enabled by setting acter receive FIFO. The Least Significant eight bits of
either the Single Receive Enable bit (SREN of the the top character in the receive FIFO are available in
RCxSTA register) or the Continuous Receive Enable RCxREG. The RXxIF bit remains set as long as there
bit (CREN of the RCxSTA register). are unread characters in the receive FIFO.
When SREN is set and CREN is clear, only as many Note: If the RX/DT function is on an analog pin,
clock cycles are generated as there are data bits in a the corresponding ANSEL bit must be
single character. The SREN bit is automatically cleared cleared for the receiver to function.
at the completion of one character. When CREN is set,
clocks are continuously generated until CREN is
cleared. If CREN is cleared in the middle of a character
the CK clock stops immediately and the partial charac-
ter is discarded. If SREN and CREN are both set, then
SREN is cleared at the completion of the first character
and CREN takes precedence.
RX/DT
pin bit 0 bit 1 bit 2 bit 3 bit 4 bit 5 bit 6 bit 7
TX/CK pin
(SCKP = 0)
TX/CK pin
(SCKP = 1)
Write to
bit SREN
SREN bit
RXxIF bit
(Interrupt)
Read
RCxREG
Note: Timing diagram demonstrates Sync Master mode with bit SREN = 1 and bit BRGH = 0.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Note 1: The EUSART module automatically changes the pin from tri-state to drive as needed. Configure the
associated TRIS bits for TX/CK and RX/DT to 1.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
bit 7-0 RCxREG<7:0>: Lower eight bits of the received data; read-only; see also RX9D (Register 33-2)
Note 1: RCxREG (including the 9th bit) is double buffered, and data is available while new data is being received.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
bit 7-0 TXxREG<7:0>: Lower eight bits of the received data; read-only; see also RX9D (Register 33-1)
Note 1: TXxREG (including the 9th bit) is double buffered, and can be written when previous data has started
shifting.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
bit 7-0 SPxBRG<7:0>: Lower eight bits of the Baud Rate Generator
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Note 1: SPxBRGH value is ignored for all modes unless BAUDxCON<BRG16> is active.
2: Writing to SPxBRGH resets the BRG counter.
Register
Name Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
on Page
BAUD FOSC = 8.000 MHz FOSC = 4.000 MHz FOSC = 3.6864 MHz FOSC = 1.000 MHz
RATE SPBRG SPBRG SPBRG SPBRG
Actual % Actual % Actual % Actual %
value value value value
Rate Error Rate Error Rate Error Rate Error
(decimal) (decimal) (decimal) (decimal)
300 — — — 300 0.16 207 300 0.00 191 300 0.16 51
1200 1202 0.16 103 1202 0.16 51 1200 0.00 47 1202 0.16 12
2400 2404 0.16 51 2404 0.16 25 2400 0.00 23 — — —
9600 9615 0.16 12 — — — 9600 0.00 5 — — —
10417 10417 0.00 11 10417 0.00 5 — — — — — —
19.2k — — — — — — 19.20k 0.00 2 — — —
57.6k — — — — — — 57.60k 0.00 0 — — —
115.2k — — — — — — — — — — — —
BAUD FOSC = 32.000 MHz FOSC = 20.000 MHz FOSC = 18.432 MHz FOSC = 11.0592 MHz
RATE SPBRG SPBRG SPBRG SPBRG
Actual % Actual % Actual % Actual %
value value value value
Rate Error Rate Error Rate Error Rate Error
(decimal) (decimal) (decimal) (decimal)
300 — — — — — — — — — — — —
1200 — — — — — — — — — — — —
2400 — — — — — — — — — — — —
9600 9615 0.16 207 9615 0.16 129 9600 0.00 119 9600 0.00 71
10417 10417 0.00 191 10417 0.00 119 10378 -0.37 110 10473 0.53 65
19.2k 19.23k 0.16 103 19.23k 0.16 64 19.20k 0.00 59 19.20k 0.00 35
57.6k 57.14k -0.79 34 56.82k -1.36 21 57.60k 0.00 19 57.60k 0.00 11
115.2k 117.64k 2.12 16 113.64k -1.36 10 115.2k 0.00 9 115.2k 0.00 5
BAUD FOSC = 8.000 MHz FOSC = 4.000 MHz FOSC = 3.6864 MHz FOSC = 1.000 MHz
RATE SPBRG SPBRG SPBRG SPBRG
Actual % Actual % Actual % Actual %
value value value value
Rate Error Rate Error Rate Error Rate Error
(decimal) (decimal) (decimal) (decimal)
300 — — — — — — — — — 300 0.16 207
1200 — — — 1202 0.16 207 1200 0.00 191 1202 0.16 51
2400 2404 0.16 207 2404 0.16 103 2400 0.00 95 2404 0.16 25
9600 9615 0.16 51 9615 0.16 25 9600 0.00 23 — — —
10417 10417 0.00 47 10417 0.00 23 10473 0.53 21 10417 0.00 5
19.2k 19231 0.16 25 19.23k 0.16 12 19.2k 0.00 11 — — —
57.6k 55556 -3.55 8 — — — 57.60k 0.00 3 — — —
115.2k — — — — — — 115.2k 0.00 1 — — —
BAUD FOSC = 32.000 MHz FOSC = 20.000 MHz FOSC = 18.432 MHz FOSC = 11.0592 MHz
RATE SPBRG SPBRG SPBRG SPBRG
Actual % Actual % Actual % Actual %
value value value value
Rate Error Rate Error Rate Error Rate Error
(decimal) (decimal) (decimal) (decimal)
300 300.0 0.00 6666 300.0 -0.01 4166 300.0 0.00 3839 300.0 0.00 2303
1200 1200 -0.02 3332 1200 -0.03 1041 1200 0.00 959 1200 0.00 575
2400 2401 -0.04 832 2399 -0.03 520 2400 0.00 479 2400 0.00 287
9600 9615 0.16 207 9615 0.16 129 9600 0.00 119 9600 0.00 71
10417 10417 0.00 191 10417 0.00 119 10378 -0.37 110 10473 0.53 65
19.2k 19.23k 0.16 103 19.23k 0.16 64 19.20k 0.00 59 19.20k 0.00 35
57.6k 57.14k -0.79 34 56.818 -1.36 21 57.60k 0.00 19 57.60k 0.00 11
115.2k 117.6k 2.12 16 113.636 -1.36 10 115.2k 0.00 9 115.2k 0.00 5
BAUD FOSC = 8.000 MHz FOSC = 4.000 MHz FOSC = 3.6864 MHz FOSC = 1.000 MHz
RATE SPBRG SPBRG SPBRG SPBRG
Actual % Actual % Actual % Actual %
value value value value
Rate Error Rate Error Rate Error Rate Error
(decimal) (decimal) (decimal) (decimal)
300 299.9 -0.02 1666 300.1 0.04 832 300.0 0.00 767 300.5 0.16 207
1200 1199 -0.08 416 1202 0.16 207 1200 0.00 191 1202 0.16 51
2400 2404 0.16 207 2404 0.16 103 2400 0.00 95 2404 0.16 25
9600 9615 0.16 51 9615 0.16 25 9600 0.00 23 — — —
10417 10417 0.00 47 10417 0.00 23 10473 0.53 21 10417 0.00 5
19.2k 19.23k 0.16 25 19.23k 0.16 12 19.20k 0.00 11 — — —
57.6k 55556 -3.55 8 — — — 57.60k 0.00 3 — — —
115.2k — — — — — — 115.2k 0.00 1 — — —
BAUD FOSC = 32.000 MHz FOSC = 20.000 MHz FOSC = 18.432 MHz FOSC = 11.0592 MHz
RATE SPBRG SPBRG SPBRG SPBRG
Actual % Actual % Actual % Actual %
value value value value
Rate Error Rate Error Rate Error Rate Error
(decimal) (decimal) (decimal) (decimal)
300 300.0 0.00 26666 300.0 0.00 16665 300.0 0.00 15359 300.0 0.00 9215
1200 1200 0.00 6666 1200 -0.01 4166 1200 0.00 3839 1200 0.00 2303
2400 2400 0.01 3332 2400 0.02 2082 2400 0.00 1919 2400 0.00 1151
9600 9604 0.04 832 9597 -0.03 520 9600 0.00 479 9600 0.00 287
10417 10417 0.00 767 10417 0.00 479 10425 0.08 441 10433 0.16 264
19.2k 19.18k -0.08 416 19.23k 0.16 259 19.20k 0.00 239 19.20k 0.00 143
57.6k 57.55k -0.08 138 57.47k -0.22 86 57.60k 0.00 79 57.60k 0.00 47
115.2k 115.9k 0.64 68 116.3k 0.94 42 115.2k 0.00 39 115.2k 0.00 23
BAUD FOSC = 8.000 MHz FOSC = 4.000 MHz FOSC = 3.6864 MHz FOSC = 1.000 MHz
RATE SPBRG SPBRG SPBRG SPBRG
Actual % Actual % Actual % Actual %
value value value value
Rate Error Rate Error Rate Error Rate Error
(decimal) (decimal) (decimal) (decimal)
300 300.0 0.00 6666 300.0 0.01 3332 300.0 0.00 3071 300.1 0.04 832
1200 1200 -0.02 1666 1200 0.04 832 1200 0.00 767 1202 0.16 207
2400 2401 0.04 832 2398 0.08 416 2400 0.00 383 2404 0.16 103
9600 9615 0.16 207 9615 0.16 103 9600 0.00 95 9615 0.16 25
10417 10417 0 191 10417 0.00 95 10473 0.53 87 10417 0.00 23
19.2k 19.23k 0.16 103 19.23k 0.16 51 19.20k 0.00 47 19.23k 0.16 12
57.6k 57.14k -0.79 34 58.82k 2.12 16 57.60k 0.00 15 — — —
115.2k 117.6k 2.12 16 111.1k -3.55 8 115.2k 0.00 7 — — —
34.1 CLOCK SOURCE Note: The CLKRDC1 bit is reset to ‘1’. This
makes the default duty cycle 50% and not
The reference clock output module has a selectable 0%.
clock source. The CLKRCLK register (Register 34-2)
controls which input is used.
34.4 OPERATION IN SLEEP MODE
34.1.1 CLOCK SYNCHRONIZATION
The reference clock output module clock is based on
Once the reference clock enable (CLKREN) is set, the the system clock. When the device goes to Sleep, the
module is ensured to be glitch-free at start-up. module outputs will remain in their current state. This
When the reference clock output is disabled, the output will have a direct effect on peripherals using the
signal will be disabled immediately. reference clock output as an input signal.
Rev. 10-000261A
9/10/2015
CLKRDIV<2:0>
CLKREN Counter Reset
128
111
CLKREN
D Q 000
CLKRCLK<3:0>
FREEZE ENABLED(1) EN
ICD FREEZE MODE(1)
P1 P2
FOSC
CLKREN
CLKR Output
CLKRDIV[2:0] = 001
Duty Cycle
CLKRDC[1:0] = 10
(50%)
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
Note 1: Bits are valid for reference clock divider values of two or larger, the base clock cannot be further divided.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
1 = VPP/MCLR
35.1 High-Voltage Programming Entry 2 = VDD Target
Mode 3 = VSS (ground)
35.2 Low-Voltage Programming Entry Another connector often found in use with the PICkit™
Mode programmers is a standard 6-pin header with 0.1 inch
spacing. Refer to Figure 35-2.
The Low-Voltage Programming Entry mode allows the
PIC® Flash MCUs to be programmed using VDD only, For additional interface recommendations, refer to your
without high voltage. When the LVP bit of Configuration specific device programmer manual prior to PCB
Words is set to ‘1’, the low-voltage ICSP programming design.
entry is enabled. To disable the Low-Voltage ICSP It is recommended that isolation devices be used to
mode, the LVP bit must be programmed to ‘0’. The LVP separate the programming pins from other circuitry.
bit can only be reprogrammed to ‘0’ by using the High- The type of isolation is highly dependent on the specific
Voltage Programming mode. application and may include devices such as resistors,
Entry into the Low-Voltage Programming Entry mode diodes, or even jumpers. See Figure 35-3 for more
requires the following steps: information.
1. MCLR is brought to VIL.
2. A 32-bit key sequence is presented on
ICSPDAT, while clocking ICSPCLK.
Once the key sequence is complete, MCLR must be
held at VIL for as long as Program/Verify mode is to be
maintained.
If low-voltage programming is enabled (LVP = 1), the
MCLR Reset function is automatically enabled and
cannot be disabled. See Section 8.5 “MCLR” for more
information.
Pin 1 Indicator
Pin Description*
1 = VPP/MCLR
1
2
2 = VDD Target
3
4 3 = VSS (ground)
5
6 4 = ICSPDAT
5 = ICSPCLK
6 = No connect
Rev. 10-000129A
7/30/2013
External Device to be
Programming VDD Programmed
Signals
VDD VDD
VPP MCLR/VPP
VSS VSS
Data ICSPDAT
Clock ICSPCLK
* * *
To Normal Connections
CONTROL OPERATIONS
BRA k Relative Branch 2 11 001k kkkk kkkk
BRW – Relative Branch with W 2 00 0000 0000 1011
CALL k Call Subroutine 2 10 0kkk kkkk kkkk
CALLW – Call Subroutine with W 2 00 0000 0000 1010
GOTO k Go to address 2 10 1kkk kkkk kkkk
RETFIE k Return from interrupt 2 00 0000 0000 1001
RETLW k Return with literal in W 2 11 0100 kkkk kkkk
RETURN – Return from Subroutine 2 00 0000 0000 1000
INHERENT OPERATIONS
CLRWDT – Clear Watchdog Timer 1 00 0000 0110 0100 TO, PD
NOP – No Operation 1 00 0000 0000 0000
RESET – Software device Reset 1 00 0000 0000 0001
SLEEP – Go into Standby or IDLE mode 1 00 0000 0110 0011 TO, PD
TRIS f Load TRIS register with W 1 00 0000 0110 0fff
C-COMPILER OPTIMIZED
ADDFSR n, k Add Literal k to FSRn 1 11 0001 0nkk kkkk
MOVIW n mm Move Indirect FSRn to W with pre/post inc/dec 1 00 0000 0001 0nmm Z 2, 3
modifier, mm
k[n] Move INDFn to W, Indexed Indirect. 1 11 1111 0nkk kkkk Z 2
MOVWI n mm Move W to Indirect FSRn with pre/post inc/dec 1 00 0000 0001 1nmm 2, 3
modifier, mm
k[n] Move W to INDFn, Indexed Indirect. 1 11 1111 1nkk kkkk 2
Note 1:If the Program Counter (PC) is modified, or a conditional test is true, the instruction requires two cycles. The second cycle
is executed as a NOP.
2: If this instruction addresses an INDF register and the MSb of the corresponding FSR is set, this instruction will require
one additional instruction cycle.
3: See Section 36.3 “Instruction Descriptions” for detailed MOVIW and MOVWI instruction descriptions.
Description: Bit ‘b’ in register ‘f’ is cleared. Description: If bit ‘b’ in register ‘f’ is ‘1’, the next
instruction is executed.
If bit ‘b’, in register ‘f’, is ‘0’, the next
instruction is discarded, and a NOP is
executed instead, making this a 2-
cycle instruction.
DECF Decrement f
CLRF Clear f
Syntax: [ label ] DECF f,d
Syntax: [ label ] CLRF f
Operands: 0 f 127
Operands: 0 f 127
d [0,1]
Operation: 00h (f) Operation: (f) - 1 (destination)
1Z
Status Affected: Z
Status Affected: Z
Description: Decrement register ‘f’. If ‘d’ is ‘0’, the
Description: The contents of register ‘f’ are cleared
result is stored in the W register. If ‘d’
and the Z bit is set. is ‘1’, the result is stored back in
register ‘f’.
CLRW Clear W
Syntax: [ label ] CLRW
Operands: None
Operation: 00h (W)
1Z
Status Affected: Z
Description: W register is cleared. Zero bit (Z) is
set.
C register f 0 Words: 1
Cycles: 1
Example: MOVF FSR, 0
After Instruction
LSRF Logical Right Shift
W = value in FSR register
Syntax: [ label ] LSRF f {,d} Z = 1
Operands: 0 f 127
d [0,1]
Operation: 0 dest<7>
(f<7:1>) dest<6:0>,
(f<0>) C,
Status Affected: C, Z
Description: The contents of register ‘f’ are shifted
one bit to the right through the Carry
flag. A ‘0’ is shifted into the MSb. If ‘d’ is
‘0’, the result is placed in W. If ‘d’ is ‘1’,
the result is stored back in register ‘f’.
0 register f C
Postincrement FSRn++ 10
Postdecrement FSRn-- 11
RETFIE Return from Interrupt
Syntax: [ label ] RETFIE k
Description: This instruction is used to move data
between W and one of the indirect Operands: None
registers (INDFn). Before/after this Operation: TOS PC,
move, the pointer (FSRn) is updated by 1 GIE
pre/post incrementing/decrementing it.
Status Affected: None
Note: The INDFn registers are not Description: Return from Interrupt. Stack is POPed
physical registers. Any instruction that and Top-of-Stack (TOS) is loaded in
accesses an INDFn register actually the PC. Interrupts are enabled by
accesses the register at the address setting Global Interrupt Enable bit,
specified by the FSRn. GIE (INTCON<7>). This is a 2-cycle
instruction.
FSRn is limited to the range 0000h- Words: 1
FFFFh. Incrementing/decrementing it
Cycles: 2
beyond these bounds will cause it to
wrap-around. Example: RETFIE
After Interrupt
The increment/decrement operation on
PC = TOS
FSRn WILL NOT affect any Status bits. GIE = 1
Note 1: Maximum current rating requires even load distribution across I/O pins. Maximum current rating may be
limited by the device package power dissipation characterizations, see Table 37-6 to calculate device
specifications.
2: Power dissipation is calculated as follows:
PDIS = VDD x {IDD - IOH} + VDD - VOH) x IOH} + VOI x IOL
† NOTICE: Stresses above those listed under “Absolute Maximum Ratings” may cause permanent damage to the
device. This is a stress rating only and functional operation of the device at those or any other conditions above those
indicated in the operation listings of this specification is not implied. Exposure above maximum rating conditions for
extended periods may affect device reliability.
5.5
VDD (V)
2.5
2.3
0 4 10 16 32
Frequency (MHz)
Note 1:The shaded region indicates the permissible combinations of voltage and frequency.
2: Refer to Table 37-7 for each Oscillator mode’s supported frequencies.
3.6
2.5
1.8
0 4 10 16 32
Frequency (MHz)
Note 1:The shaded region indicates the permissible combinations of voltage and frequency.
2: Refer to Table 37-7 for each Oscillator mode’s supported frequencies.
Param.
Sym. Characteristic Min. Typ.† Max. Units Conditions
No.
Supply Voltage
D002 VDD 1.8 — 3.6 V FOSC 16 MHz
2.5 — 3.6 V FOSC 16 MHz
D002 VDD 2.3 — 5.5 V FOSC 16 MHz
2.5 — 5.5 V FOSC 16 MHz
RAM Data Retention(1)
D003 VDR 1.5 — — V Device in Sleep mode
D003 VDR 1.7 — — V Device in Sleep mode
Power-on Reset Release Voltage(2)
D004 VPOR — 1.6 — V BOR or LPBOR disabled(3)
D004 VPOR — 1.6 — V BOR or LPBOR disabled(3)
Power-on Reset Rearm Voltage(2)
D005 VPORR — 0.8 — V BOR or LPBOR disabled(3)
D005 VPORR — 1.5 — V BOR or LPBOR disabled(3)
VDD Rise Rate to ensure internal Power-on Reset signal(2)
D006 SVDD 0.05 — — V BOR or LPBOR disabled(3)
D006 SVDD 0.05 — — V BOR or LPBOR disabled(3)
† Data in “Typ.” column is at 3.0V, 25°C unless otherwise stated. These parameters are for design guidance
only and are not tested.
Note 1: This is the limit to which VDD can be lowered in Sleep mode without losing RAM data.
2: See Figure 37-3, POR and POR REARM with Slow Rising VDD.
3: See Table 37-11 for BOR and LPBOR trip point information.
4: = F device
VDD
VPOR
VPORR
SVDD
VSS
NPOR(1)
POR REARM
VSS
TVLOW(3) TPOR(2)
PIC16F15356/75/76/85/86
Param. Conditions
Symbol Device Characteristics Min. Typ.† Max. Units
No. VDD Note
D100 IDDXT4 XT = 4 MHz — 360 470 A 3.0V
D100 IDDXT4 XT = 4 MHz — 380 480 A 3.0V
D101 IDDHFO16 HFINTOSC = 16 MHz — 1.4 2.3 mA 3.0V
D101 IDDHFO16 HFINTOSC = 16 MHz — 1.5 2.3 mA 3.0V
D102 IDDHFOPLL HFINTOSC = 32 MHz — 2.6 3.6 mA 3.0V 32 MHz PIC16
D102 IDDHFOPLL HFINTOSC = 32 MHz — 2.7 3.7 mA 3.0V 32 MHz PIC16
D103 IDDHSPLL32 HS+PLL = 32 MHz — 2.6 3.6 mA 3.0V 32 MHz PIC16
D103 IDDHSPLL32 HS+PLL = 32 MHz — 2.7 3.7 mA 3.0V 32 MHz PIC16
D104 IDDIDLE IDLE mode, HFINTOSC = 16 MHz — 0.8 1.1 mA 3.0V
D104 IDDIDLE IDLE mode, HFINTOSC = 16 MHz — 0.8 1.2 mA 3.0V
D105 IDDDOZE(3) DOZE mode, HFINTOSC = 16 MHz, Doze — 795 — A 3.0V Typical value only.
Ratio = 16
D105 IDDDOZE(3) DOZE mode, HFINTOSC = 16 MHz, Doze — 800 — A 3.0V Typical value only.
Ratio = 16
† Data in “Typ.” column is at 3.0V, 25°C unless otherwise stated. These parameters are for design guidance only and are
not tested.
Note 1: The test conditions for all IDD measurements in active operation mode are: OSC1 = external square wave, from
rail-to-rail; all I/O pins are outputs driven low; MCLR = VDD; WDT disabled.
2: The supply current is mainly a function of the operating voltage and frequency. Other factors, such as I/O pin loading
and switching rate, oscillator type, internal code execution pattern and temperature, also have an impact on the current
consumption.
3: IDDDOZE = [IDDIDLE*(N-1)/N] + IDDHFO16/N where N = DOZE Ratio (Register 11-2).
4: PMD bits are all in the default state, no modules are disabled.
5: = F device
Param.
Sym. Characteristic Min. Typ† Max. Units Conditions
No.
VIL Input Low Voltage
I/O PORT:
D300 with TTL buffer — — 0.8 V 4.5V VDD 5.5V
D301 — — 0.15 VDD V 1.8V VDD 4.5V
D302 with Schmitt Trigger buffer — — 0.2 VDD V 2.0V VDD 5.5V
D303 with I2C levels — — 0.3 VDD V
D304 with SMBus levels — — 0.8 V 2.7V VDD 5.5V
D305 MCLR — — 0.2 VDD V
VIH Input High Voltage
I/O PORT:
D320 with TTL buffer 2 — — V 4.5V VDD 5.5V
D321 0.25 VDD + — — V 1.8V VDD 4.5V
0.8
D322 with Schmitt Trigger buffer 0.8 VDD — — V 2.0V VDD 5.5V
D323 with I2C levels 0.7 VDD — — V
D324 with SMBus levels 2.1 — — V 2.7V VDD 5.5V
D325 MCLR 0.7 VDD — — V
IIL Input Leakage Current(1)
D340 I/O Ports — ±5 ± 125 nA VSS VPIN VDD,
Pin at high-impedance, 85°C
D341 — ±5 ± 1000 nA VSS VPIN VDD,
Pin at high-impedance, 125°C
D342 MCLR(2) — ± 50 ± 200 nA VSS VPIN VDD,
Pin at high-impedance, 85°C
IPUR Weak Pull-up Current
D350 25 100 200 A VDD = 3.0V, VPIN = VSS
VOL Output Low Voltage
D360 I/O ports — — 0.6 V IOL = 10.0 mA, VDD = 3.0V
VOH Output High Voltage
D370 I/O ports VDD - 0.7 — — V IOH = 6.0 mA, VDD = 3.0V
D380 CIO All I/O pins — 5 50 pF
†Data in “Typ” column is at 3.0V, 25°C unless otherwise stated. These parameters are for design guidance only and are
not tested.
Note 1:Negative current is defined as current sourced by the pin.
2: The leakage current on the MCLR pin is strongly dependent on the applied voltage level. The specified levels represent
normal operating conditions. Higher leakage current may be measured at different input voltages.
Param.
Sym. Characteristic Typ. Units Conditions
No.
TH01 JA Thermal Resistance Junction to Ambient 60 C/W 28-pin SPDIP package
80 C/W 28-pin SOIC package
90 C/W 28-pin SSOP package
48 C/W 28-pin UQFN 4x4mm package
47.2 C/W 40-pin PDIP package
41.0 C/W 40-pin UQFN 5x5 package
46.0 C/W 44-pin TQFP package
24.4 C/W 44-pin QFN 8X8mm package
27.6 C/W 48-pin UQFN 6x6 package
— C/W 48-pin TQFP 7x7 package
TH02 JC Thermal Resistance Junction to Case 31.4 C/W 28-pin SPDIP package
24 C/W 28-pin SOIC package
24 C/W 28-pin SSOP package
12 C/W 28-pin UQFN 4x4mm package
24.70 C/W 40-pin PDIP package
5.5 C/W 40-pin UQFN 5x5 package
14.5 C/W 44-pin TQFP package
20.0 C/W 44-pin QFN 8X8mm package
6.7 C/W 48-pin UQFN 6x6 package
— C/W 48-pin TQFP 7x7 package
TH03 TJMAX Maximum Junction Temperature 150 C
TH04 PD Power Dissipation — W PD = PINTERNAL + PI/O
TH05 PINTERNAL Internal Power Dissipation — W PINTERNAL = IDD x VDD(1)
TH06 P I /O I/O Power Dissipation — W PI/O = (IOL * VOL) + (IOH * (VDD - VOH))
TH07 PDER Derated Power — W PDER = PDMAX (TJ - TA)/JA(2)
Note 1:IDD is current to run the chip alone without driving any load on the output pins.
2: TA = Ambient Temperature, TJ = Junction Temperature
Rev. 10-000133A
8/1/2013
Load Condition
Pin
CL
VSS
Q4 Q1 Q2 Q3 Q4 Q1
CLKIN
OS02 OS12 OS11
OS03
CLKOUT
(CLKOUT Mode)
Param.
Sym. Characteristic Min. Typ† Max. Units Conditions
No.
ECL Oscillator
OS1 FECL Clock Frequency — — 500 kHz
OS2 TECL_DC Clock Duty Cycle 40 — 60 %
ECM Oscillator
OS3 FECM Clock Frequency — — 4 MHz
OS4 TECM_DC Clock Duty Cycle 40 — 60 %
ECH Oscillator
OS5 FECH Clock Frequency — — 32 MHz
OS6 TECH_DC Clock Duty Cycle 40 — 60 %
LP Oscillator
OS7 FLP Clock Frequency — — 100 kHz Note 4
XT Oscillator
OS8 FXT Clock Frequency — — 4 MHz Note 4
HS Oscillator
OS9 FHS Clock Frequency — — 20 MHz
System Oscillator
OS20 FOSC System Clock Frequency — — 32 MHz (Note 2, Note 3)
OS21 FCY Instruction Frequency — FOSC/4 — MHz
OS22 TCY Instruction Period 125 1/FCY — ns
* These parameters are characterized but not tested.
† Data in “Typ” column is at 3.0V, 25°C unless otherwise stated. These parameters are for design guidance only and are
not tested.
Note 1: Instruction cycle period (TCY) equals four times the input oscillator time base period. All specified values are based on
characterization data for that particular oscillator type under standard operating conditions with the device executing
code. Exceeding these specified limits may result in an unstable oscillator operation and/or higher than expected
current consumption. All devices are tested to operate at “min” values with an external clock applied to OSC1 pin.
When an external clock input is used, the “max” cycle time limit is “DC” (no clock) for all devices.
2: The system clock frequency (FOSC) is selected by the “main clock switch controls” as described in Section 9.0
“Oscillator Module (with Fail-Safe Clock Monitor)”.
3: The system clock frequency (FOSC) must meet the voltage requirements defined in the Section 37.2 “Standard
Operating Conditions”.
4: LP, XT and HS oscillator modes require an appropriate crystal or resonator to be connected to the device. For clocking
the device with the external square wave, one of the EC mode selections must be used.
Param.
Sym. Characteristic Min. Typ† Max. Units Conditions
No.
OS50 FHFOSC Precision Calibrated HFINTOSC — 4 — MHz (Note 2)
Frequency 8
12
16
32
OS51 FHFOSCLP Low-Power Optimized HFINTOSC 0.93 1 1.07 MHz
Frequency 1.86 2 2.14 MHz
OS52 FMFOSC Internal Calibrated MFINTOSC — 500 — kHz
Frequency
OS53 FLFOSC Internal LFINTOSC Frequency — 31 — kHz (Note 3)
OS54 THFOSCST HFINTOSC — 11 20 s VREGPM = 0
Wake-up from Sleep Start-up — 50 — s VREGPM = 1
Time
OS56 TLFOSCST LFINTOSC — 0.2 — ms
Wake-up from Sleep Start-up Time
†Data in “Typ” column is at 3.0V, 25°C unless otherwise stated. These parameters are for design guidance
only and are not tested.
Note 1: To ensure these oscillator frequency tolerances, VDD and VSS must be capacitively decoupled as close to
the device as possible. 0.1 F and 0.01 F values in parallel are recommended.
2: See Figure 37-6: Precision Calibrated HFINTOSC Frequency Accuracy Over Device VDD and Tempera-
ture.
3: See Figure 38-87: LFINTOSC Frequency, PIC16LF15356/75/76/85/86 devices only and Figure 38-88:
LFINTOSC Frequency, PIC16F15356/75/76/85/86 devices only.
125
± 5%
85
± 3%
Temperature (°C)
60
± 2%
0
± 5%
-40
1.8 2.0 2.3 3.0 3.5 4.0 4.5 5.0 5.5
VDD (V)
VDD
MCLR
RST01
Internal
POR
RST04
PWRT
Time-out RST05
OSC
Start-up Time
Internal Reset(1)
Watchdog Timer
Reset(1)
RST03
RST02 RST02
I/O pins
VDD
VBOR + VHYST
VBOR
(RST08)(1)
Reset
(RST04)(1)
(due to BOR)
Note 1:64 ms delay only if PWRTE bit in the Configuration Word register is programmed to ‘1’; 2 ms
delay if PWRTE = 0.
Param.
Sym. Characteristic Min. Typ† Max. Units Conditions
No.
Param.
Sym. Characteristic Min. Typ† Max. Units Conditions
No.
AD20 TAD ADC Clock Period 1 — 9 s The requirement is to set ADCCS
correctly to produce this period/
frequency.
AD21 1 2 6 s Using FRC as the ADC clock
source ADOSC = 1
AD22 TCNV Conversion Time — 11 — TAD Set of GO/DONE bit to Clear of GO/
DONE bit
AD23 TACQ Acquisition Time — 2 — s
AD24 THCD Sample and Hold Capacitor — — — s FOSC-based clock source
Disconnect Time FRC-based clock source
* These parameters are characterized but not tested.
† Data in “Typ” column is at 3.0V, 25°C unless otherwise stated. These parameters are for design guidance only and are not
tested.
BSF ADCON0, GO
1 TCY
AD24
AD22
Q4
ADC Data 9 8 7 6 3 2 1 0
ADIF 1 TCY
GO DONE
BSF ADCON0, GO
AD24 1 TCY
AD22
Q4
AD20
ADC_clk
ADC Data 9 8 7 6 3 2 1 0
ADIF 1 TCY
GO DONE
Param.
Sym. Characteristics Min. Typ. Max. Units Comments
No.
CM01 VIOFF Input Offset Voltage — — ±50 mV VICM = VDD/2
CM02 VICM Input Common Mode Range GND — VDD V
CM03 CMRR Common Mode Input Rejection Ratio — 50 — dB
CM04 VHYST Comparator Hysteresis 15 25 35 mV
CM05 TRESP(1) Response Time, Rising Edge — 300 600 ns
Response Time, Falling Edge — 220 500 ns
CMOS6 TMCV2VO(2) Mode Change to Valid Output — — 10 µs
* These parameters are characterized but not tested.
Note 1: Response time measured with one comparator input at VDD/2, while the other input transitions from VSS to VDD.
2: A mode change includes changing any of the control register values, including module enable.
Param.
Sym. Characteristics Min. Typ. Max. Units Comments
No.
Param.
Symbol Characteristic Min. Typ. Max. Units Conditions
No.
FVR01 VFVR1 1x Gain (1.024V) -4 — +4 % VDD 2.5V, -40°C to
85°C
FVR02 VFVR2 2x Gain (2.048V) -4 — +4 % VDD 2.5V, -40°C to
85°C
FVR03 VFVR4 4x Gain (4.096V) -6 — +6 % VDD 4.75V, -40°C
to 85°C
FVR04 TFVRST FVR Start-up Time — 25 — us
FVR05 FVRA1X/FVRC1X FVR output voltage for 1x setting stored in — 1024 — mV
the DIA
FVR06 FVRA2X/FVRC2X FVR output voltage for 2x setting stored in — 2048 — mV
the DIA
FVR07 FVRA4X/FVRC4X FVR output voltage for 4x setting stored in — 4096 — mV Note 1
the DIA
Note 1: Available only on PIC16F15354/55.
Param.
Sym. Characteristics Min. Typ† Max. Units Comments
No.
ZC01 ZPCINV Voltage on Zero Cross Pin — 0.75 — V
ZC02 ZCDRV Maximum source or sink current — — 600 A
ZC04 ZCISW Response Time, Rising Edge — 1 — s
Response Time, Falling Edge — 1 — s
ZC05 ZCOUT Response Time, Rising Edge — 1 — s
Response Time, Falling Edge — 1 — s
† Data in “Typ” column is at 3.0V, 25°C unless otherwise stated. These parameters are for design guidance only and are not
tested.
T0CKI
40 41
42
T1CKI
45 46
47 49
TMR0 or
TMR1
CC01 CC02
CC03
CK
US121 US121
DT
US120 US122
Param.
Symbol Characteristic Min. Max. Units Conditions
No.
US120 TCKH2DTV SYNC XMIT (Master and Slave) — 80 ns 3.0V VDD 5.5V
Clock high to data-out valid — 100 ns 1.8V VDD 5.5V
US121 TCKRF Clock out rise time and fall time — 45 ns 3.0V VDD 5.5V
(Master mode) — 50 ns 1.8V VDD 5.5V
US122 TDTRF Data-out rise time and fall time — 45 ns 3.0V VDD 5.5V
— 50 ns 1.8V VDD 5.5V
CK
US125
DT
US126
Param.
Symbol Characteristic Min. Max. Units Conditions
No.
US125 TDTV2CKL SYNC RCV (Master and Slave)
Data-setup before CK (DT hold time) 10 — ns
US126 TCKL2DTL Data-hold after CK (DT hold time) 15 — ns
SS
SP81
SCK
(CKP = 0)
SP71 SP72
SP78 SP79
SCK
(CKP = 1)
SP79 SP78
SP80
SP75, SP76
SP74
SP73
SS
SP81
SCK
(CKP = 0)
SP71 SP72
SP79
SP73
SCK
(CKP = 1)
SP80
SP78
SP75, SP76
SP74
SP73
SS
SP70
SCK SP83
(CKP = 0)
SP71 SP72
SP78 SP79
SCK
(CKP = 1)
SP79 SP78
SP80
SP74
SP73
SP82
SS
SP70
SCK SP83
(CKP = 0)
SP71 SP72
SCK
(CKP = 1)
SP80
SP77
SP75, SP76
SDI
MSb In bit 6 - - - -1 LSb In
SP74
SP73
Param.
Symbol Characteristic Min. Typ† Max. Units Conditions
No.
SCL
SP91 SP93
SP90 SP92
SDA
Start Stop
Condition Condition
Param.
Symbol Characteristic Min. Typ Max. Units Conditions
No.
SP90* TSU:STA Start condition 100 kHz mode 4700 — — ns Only relevant for Repeated Start
Setup time 400 kHz mode 600 — — condition
SP91* THD:STA Start condition 100 kHz mode 4000 — — ns After this period, the first clock
Hold time 400 kHz mode 600 — — pulse is generated
SCL
SP90
SP106
SP107
SP91 SP92
SDA
In
SP110
SP109
SP109
SDA
Out
Param.
Symbol Characteristic Min. Max. Units Conditions
No.
SP100* THIGH Clock high time 100 kHz mode 4.0 — s Device must operate at a
minimum of 1.5 MHz
400 kHz mode 0.6 — s Device must operate at a
minimum of 10 MHz
SSP module 1.5TCY —
SP101* TLOW Clock low time 100 kHz mode 4.7 — s Device must operate at a
minimum of 1.5 MHz
400 kHz mode 1.3 — s Device must operate at a
minimum of 10 MHz
SSP module 1.5 TCY —
SP102* TR SDA and SCL rise 100 kHz mode — 1000 ns
time 400 kHz mode 20 + 0.1 CB 300 ns CB is specified to be from
10-400 pF
SP103* TF SDA and SCL fall time 100 kHz mode — 250 ns
400 kHz mode 20 + 0.1 CB 250 ns CB is specified to be from
10-400 pF
SP106* THD:DAT Data input hold time 100 kHz mode 0 — ns
400 kHz mode 0 0.9 s
SP107* TSU:DAT Data input setup time 100 kHz mode 250 — ns (Note 2)
400 kHz mode 100 — ns
SP109* TAA Output valid from 100 kHz mode — 3500 ns (Note 1)
clock 400 kHz mode — — ns
SP110* TBUF Bus free time 100 kHz mode 4.7 — s Time the bus must be free
400 kHz mode 1.3 — s before a new transmission
can start
SP111 CB Bus capacitive loading — 400 pF
* These parameters are characterized but not tested.
Note 1: As a transmitter, the device must provide this internal minimum delay time to bridge the undefined region (min. 300 ns)
of the falling edge of SCL to avoid unintended generation of Start or Stop conditions.
2: A Fast mode (400 kHz) I2C bus device can be used in a Standard mode (100 kHz) I2C bus system, but the requirement
TSU:DAT 250 ns must then be met. This will automatically be the case if the device does not stretch the low period of
the SCL signal. If such a device does stretch the low period of the SCL signal, it must output the next data bit to the SDA
line TR max. + TSU:DAT = 1000 + 250 = 1250 ns (according to the Standard mode I2C bus specification), before the SCL
line is released.
1.0 1.0
0.5 0.5
DNL (LSb)
DNL (LSb)
0.0 0.0
-0.5 -0.5
-1.0 -1.0
0 128 256 384 512 640 768 896 1024 0 128 256 384 512 640 768 896 1024
FIGURE 38-1: ADC 10-bit Mode, Single- FIGURE 38-2: ADC 10-bit Mode, Single-
Ended DNL, VDD= 3.0V, VREF = 3.0V, TAD = 1 Ended DNL, VDD= 3.0V, VREF = 3.0V, TAD = 4
uS, 25°C. uS, 25°C.
1.0 1.0
0.5 0.5
DNL (LSb)
INL (LSb)
0.0 0.0
-0.5 -0.5
-1.0 -1.0
0 128 256 384 512 640 768 896 1024 0 128 256 384 512 640 768 896 1024
FIGURE 38-3: ADC 10-bit Mode, Single- FIGURE 38-4: ADC 10-bit Mode, Single-
Ended DNL, VDD= 3.0V, VREF = 3.0V, TAD = 8 Ended INL, VDD= 3.0V, VREF = 3.0V, TAD = 1 uS,
uS, 25°C. 25°C.
2.0 2.0
1.0 1.0
1.5 1.5
1.0 1.0
0.5
0.5 0.5
DNL (LSb)
0.5
DNL (LSb)
0.0 0.0
INL (LSb)
INL (LSb)
-0.5 -0.5
0.0 0.0
-1.0 -1.0
-1.5 -1.5
-2.0 -2.0
-0.5 -0.5
0 512 1024 1536 2048 2560 3072 3584 4096 0 512 1024 1536 2048 2560 3072 3584 4096
Output Code Output Code
-1.0 -1.0
0 128 256 384 512 640 768 896 1024 0 128 256 384 512 640 768 896 1024
FIGURE 38-5: ADC 10-bit Mode, Single- FIGURE 38-6: ADC 10-bit Mode, Single-
Ended INL, VDD= 3.0V, VREF = 3.0V, TAD = 4 uS, Ended INL, VDD= 3.0V, VREF = 3.0V, TAD = 8 uS,
25°C. 25°C.
1 1
0.5 0.5
DNL (LSB)
INL (LSB)
0 0
-0.5 -0.5
Max 25°C Max 25°C
Min 25°C Min 25°C
Max -40°C Max -40°C
Min -40°C Min -40°C
Max 85°C Max 85°C
Min 85°C Min 85°C
-1 -1
0.5 0.8 1 2 4 8 0.5 0.8 1 2 4 8
TADs TADs
FIGURE 38-7: ADC 10-bit Mode, Single- FIGURE 38-8: ADC 10-bit Mode, Single-
Ended DNL, VDD= 3.0V, VREF = 3.0V Ended INL, VDD= 3.0V, VREF = 3.0V
1 2
1.5
0.5 1
0.5
DNL(LSB)
INL(LSB)
0 0
-0.5
-0.5 -1
Max 85°C Max 85°C
Max 25°C Max 25°C
Max -40°C Max -40°C
Min 85°C -1.5 Min 85°C
Min 25°C Min 25°C
Min -40°C Min -40°C
-1 -2
1.8 2.3 2.5 3 1.8 2.3 2.5 3
VREF VREF
FIGURE 38-9: ADC 10-bit Mode, Single- FIGURE 38-10: ADC 10-bit Mode, Single-
Ended DNL, VDD= 3.0V, TAD = 1 uS Ended INL, VDD= 3.0V, TAD = 1 uS
6 3
5 2.5
4 2
3 1.5
2 1
1 0.5
(LSB)
(LSB)
0 0
-1 -0.5
-2 -1
-3 -1.5
Max 85°C Max 85°C
-4 Max 25°C Max 25°C
Max -40°C
-2 Max -40°C
Min 85°C Min 85°C
-5 Min 25°C -2.5 Min 25°C
Min -40°C Min -40°C
-6 -3
1.8 2.3 2.5 3 1.8 2.3 2.5 3
VREF VREF
FIGURE 38-11: ADC 10-bit Mode, Single- FIGURE 38-12: ADC 10-bit Mode, Single-
Ended Gain Error, VDD= 3.0V, TAD = 1 uS Ended Offset Error, VDD= 3.0V, TAD = 1 uS
1 1
0.5 0.5
DNL(LSB)
INL(LSB)
0 0
-0.5 -0.5
Max 85°C Max 85°C
Max 25°C Max 25°C
Max -40°C Max -40°C
Min 85°C Min 85°C
Min 25°C Min 25°C
Min -40°C Min -40°C
-1 -1
1.8 2.3 2.5 3 1.8 2.3 2.5 3
VREF VREF
FIGURE 38-13: ADC 10-bit Mode, Single- FIGURE 38-14: ADC 10-bit Mode, Single-
Ended DNL, VDD= 3.0V, TAD = 4 uS. Ended INL, VDD= 3.0V, TAD = 4 uS.
6 1
3 0.5
1
(LSB)
(LSB)
0 0
-1
-2
-3 -0.5
Max 85°C Max 85°C
Max 25°C Max 25°C
-4
Max -40°C Max -40°C
Min 85°C Min 85°C
-5 Min 25°C Min 25°C
Min -40°C Min -40°C
-6 -1
1.8 2.3 2.5 3 1.8 2.3 2.5 3
VREF VREF
FIGURE 38-15: ADC 10-bit Mode, Single- FIGURE 38-16: ADC 10-bit Mode, Single-
Ended Gain Error, VDD= 3.0V, TAD = 4 uS Ended Offset Error, VDD= 3.0V, TAD = 4 uS
2 2
1.5 1.5
1 1
0.5 0.5
(LSB)
(LSB)
0 0
-0.5 -0.5
-1 -1
Max Max
-1.5 -1.5 Typical
Typical
Min Min
-2 -2
0.5 0.8 1 2 4 8 0.5 0.8 1 2 4 8
TADs TADs
FIGURE 38-17: ADC 10-bit Mode, Single- FIGURE 38-18: ADC 10-bit Mode, Single-
Ended Gain Error, VDD= 3.0V, VREF = 3.0V, - Ended Offset Error, VDD= 3.0V, VREF = 3.0V, -
40°C to 85°C. 40°C to 85°C
5.0 4.0
Typical 25°C
4.5
+3ı (-40°C to +125°C) 3.5
4.0 -3ı (-40°C to +125°C)
3.0
3.5
3.0 2.5
Time (us)
Time (us)
2.5 2.0
2.0
1.5
1.5
1.0
1.0 Typical 25°C
0.5 +3ı (-40°C to +125°C)
0.5
-3ı (-40°C to +125°C)
0.0 0.0
1.7 1.9 2.1 2.3 2.5 2.7 2.9 3.1 3.3 3.5 3.7 2.2 2.4 2.6 2.8 3 3.2 3.4 3.6 3.8 4 4.2 4.4 4.6 4.8 5 5.2 5.4 5.6
VDD (V)
VDD (V)
FIGURE 38-19: ADC RC Oscillator Period, FIGURE 38-20: ADC RC Oscillator Period,
PIC16LF15356/75/76/85/86 devices only. PIC16F15356/75/76/85/86 devices only.
70 5.0
Typical 25°C Typical 25°C
4.5
+3ı (-40°C to +125°C) +3 Sigma 125°C
60
4.0
3.5
50
Time (us)
3.0
Time (us)
40 2.5
2.0
30
1.5
1.0
20
0.5
10 0.0
1.6 1.8 2 2.2 2.4 2.6 2.8 3 3.2 3.4 3.6 3.8 2.6 2.7 2.8 2.9 3.0 3.1 3.2 3.3 3.4 3.5 3.6 3.7
VDD (V) VDD (V)
FIGURE 38-21: Band Gap Ready FIGURE 38-22: Brown-out Reset Response
Time, PIC16LF15356/75/76/85/86 devices only.
7
3.00
Typical 25°C +3 Sigma
2.95
6 +3 Sigma 125°C -3 Sigma
2.90
Typical
2.85
5
2.80
Time (us)
2.75
Voltage (V)
4
2.70
3 2.65
2.60
2 2.55
2.50
1 2.45
2.40
0 -60 -40 -20 0 20 40 60 80 100 120 140
2.6 2.8 3 3.2 3.4 3.6 3.8 4 4.2 4.4 4.6 4.8 5 5.2 5.4 5.6 Temperature (°C)
VDD (V)
FIGURE 38-23: Brown-out Reset Response FIGURE 38-24: Brown-out Reset Voltage,
Time, PIC16F15356/75/76/85/86 devices only. Trip Point (BORV = 00)
70.0 2.00
Typical
60.0 +3 Sigma
-3 Sigma
1.95
50.0
40.0
Voltage (mV)
Voltage (V)
1.90
30.0
20.0
1.85 +3 Sigma
-3 Sigma
10.0
Typical
0.0 1.80
-60 -40 -20 0 20 40 60 80 100 120 140 -60 -40 -20 0 20 40 60 80 100 120 140
40.0 2.60
+3 Sigma
35.0 2.50
Typical
2.40 -3 Sigma
30.0
2.30
25.0
Voltage (V)
Voltage (mV)
2.20
20.0
2.10
15.0
2.00
10.0
Typical
1.90
5.0 +3 Sigma
-3 Sigma 1.80
0.0
-60 -40 -20 0 20 40 60 80 100 120 140 1.70
-60 -40 -20 0 20 40 60 80 100 120 140
Temperature (°C)
Temperature (°C)
50 300
Typical Typical 25°C
45
+3 Sigma +3 Sigma 125°C
250
40 -3 Sigma
35
200
30
Time (ns)
Voltage (mV)
25
150
20
15
100
10
5 50
0
-60 -40 -20 0 20 40 60 80 100 120 140
0
1.7 1.9 2.1 2.3 2.5 2.7 2.9 3.1 3.3 3.5 3.7
Temperature (°C) VDD (V)
FIGURE 38-29: LPBOR Reset Hysteresis FIGURE 38-30: Comparator Response Time
Falling Edge, PIC16LF15356/75/76/85/86
devices only.
250 700
Typical 25°C
Typical 25°C
600 +3 Sigma 125°C
+3 Sigma 125°C
200
500
150
Time (ns)
Time (ns)
400
300
100
200
50
100
0
0 1.7 1.9 2.1 2.3 2.5 2.7 2.9 3.1 3.3 3.5 3.7
2.2 2.4 2.6 2.8 3.0 3.2 3.4 3.6 3.8 4.0 4.2 4.4 4.6 4.8 5.0 5.2 5.4 5.6
VDD (V)
VDD (V)
FIGURE 38-31: Comparator Response Time FIGURE 38-32: Comparator Response Time
Falling Edge, PIC16F15356/75/76/85/86 devices Rising Edge, PIC16LF15356/75/76/85/86
only. devices only.
45
900
Typical 25°C 43
800 -40°C
+3 Sigma 125°C
41
700
39
25°C
Hysteresis (mV)
600
37 85°C
Time (ns)
500
35 125°
400
33
300
31
200
29
100
27
0
25
2.2 2.4 2.6 2.8 3.0 3.2 3.4 3.6 3.8 4.0 4.2 4.4 4.6 4.8 5.0 5.2 5.4 5.6
0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5
VDD (V)
Common Mode Voltage (V)
30 30
25 25
20 20
15 15
Offset Voltage (mV)
10 10
MAX MAX
5 5
0 0
-5 MIN -5
MIN
-10 -10
-15 -15
-20 -20
0.0 0.5 1.0 1.5 2.0 2.5 3.0 0.0 0.5 1.0 1.5 2.0 2.5 3.0
FIGURE 38-35: Comparator Offset, Normal FIGURE 38-36: Comparator Offset, Normal
Power Mode (CxSP = 1), VDD = 3.0V, Typical Power Mode (CxSP = 1), VDD = 3.0V, Typical
Measured Values at 25°C. Measured Values from -40°C to 125°C.
50 30
25
45 20
15
Hysteresis (mV)
Hysteresis (mV)
40
MAX
25°C 10
125°
35 5
0
85°
30 -5
-40°C -10
25 MIN
-15
20 -20
0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
140
40
Max: Typical + 3ı (-40°C to +125°C)
120 Typical; statistical mean @ 25°C
Min: Typical - 3ı (-40°C to +125°C)
30
100
Offset Voltage (mV)
20 125°C
Time (nS)
80
MAX
10 25°C
60
0
40
-40°C
-10
20
MIN
-20 0
0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 1.7 2.0 2.3 2.6 2.9 3.2 3.5
FIGURE 38-39: Comparator Offset, Normal FIGURE 38-40: Comparator Response Time
Power Mode (CxSP = 1), VDD = 5.5V, Typical Over Voltage, Normal Power Mode (CxSP = 1),
Measured Values from -40°C to 125°C, Typical Measured Values, PIC16LF15356/75/76/
PIC16F15356/75/76/85/86 devices only. 85/86 devices only.
90 1,400
Max: Typical + 3ı (-40°C to +125°C) Max: Typical + 3ı (-40°C to +125°C)
80 Typical; statistical mean @ 25°C Typical; statistical mean @ 25°C
Min: Typical - 3ı (-40°C to +125°C) 1,200 Min: Typical - 3ı (-40°C to +125°C)
70
125°C 1,000
60
Time (nS)
Time (nS)
50 800
25°C 125°C
40
600
30 25°C
-40°C 400
20
200
10
-40°C
0 0
2.2 2.5 2.8 3.1 3.4 3.7 4.0 4.3 4.6 4.9 5.2 5.5 1.8 2 2.2 2.4 2.6 2.8 3 3.2 3.4 3.6
FIGURE 38-41: Comparator Response Time FIGURE 38-42: Comparator Output Filter
Over Voltage, Normal Power Mode (CxSP = 1), Delay Time Over Temperature, Normal Power
Typical Measured Values, PIC16F15356/75/76/ Mode (CxSP = 1), Typical Measured Values,
85/86 devices only. PIC16LF15356/75/76/85/86 devices only.
0.025
800
0.01
500
Time (nS)
DNL (LSb)
125°C 0.005
-40°C
400
25°C
0
300 85°C
25°C -0.005 125°C
200
-0.01
100
-40°C -0.015
0
2.2 2.5 2.8 3.1 3.4 3.7 4 4.3 4.6 4.9 5.2 5.5 -0.02
0 16 32 48 64 80 96 112 128 144 160 176 192 208 224 240
VDD (V) Output Code
FIGURE 38-43: Comparator Output Filter FIGURE 38-44: Typical DAC DNL Error,
Delay Time Over Temperature, Normal Power VDD = 3.0V, VREF = External 3V
Mode (CxSP = 1), Typical Measured Values,
PIC16F15356/75/76/85/86 devices only
0.00 0.45
0.4
Vref = Int. Vdd
0.4
-0.05 Vref = Ext. 1.8V
0.35 Vref = Ext. 2.0V
DNL (LSb)
-0.10 Vref = Ext. 3.0V
0.3
0.3
-0.15
DNL (LSb) 0.25 Vref = Int. Vdd
Vref = Ext. 1.8V
AbsoluteAbsolute
0.2
INL (LSb)
-0.45 0.0
0 14 28 42 56 70 84 98 112126140 154168 182196210 224238 252 -60 -40 -20 0 20 40 60 80 100 120 140
Output Code Temperature (°C)
FIGURE 38-45: Typical DAC INL Error, FIGURE 38-46: Absolute Value of DAC DNL
VDD = 3.0V, VREF = External 3V Error, VDD = 3.0V, VREF= VDD
0.90
-2.1 Vref = Int. Vdd
70
Vref = Ext. 1.8V Typical 25°C
-2.3 Vref = Ext. 2.0V
0.88 +3ı (-40°C to +125°C)
60
INL (LSb)INL (LSb)
-40 50
-2.7
0.86
AbsoluteAbsolute
25
-2.9 40
Time (us)
85
0.84 125
-3.1
30
-3.3
0.82
20
-3.5
0.0 1.0 2.0 3.0 4.0 5.0
Temperature (°C) 10 Note:
0.80 The FVR Stabiliztion Period applies when coming out of
RESET or exiting sleep mode.
0
0.78 1.6 1.8 2.0 2.2 2.4 2.6 2.8 3.0 3.2 3.4 3.6 3.8
-60.0 -40.0 -20.0 0.0 20.0 40.0 60.0 80.0 100.0 120.0 140.0 VDD (MV)
Temperature (°C)
FIGURE 38-47: Absolute Value of DAC INL FIGURE 38-48: FVR Stabilization Period,
Error, VDD = 3.0V, VREF= VDD PIC16LF15356/75/76/85/86 devices only
1.1% 1.2%
Typical -40°C Typical -40°C
Typical 25°C Typical 25°C
1.0% Typical 85°C Typical 85°C
Typical 125°C Typical 125°C
0.9% 1.0%
0.8%
0.8%
0.7%
Error (%)
Error (%)
0.6%
0.6%
0.5%
0.4%
0.4%
0.3%
0.2%
0.2%
0.1%
0.0%
2.4 2.5 2.6 2.7 2.8 2.9 3.0 3.1 3.2 3.3 3.4 3.5 3.6 3.7 0.0%
2.4 2.6 2.8 3.0 3.2 3.4 3.6 3.8 4.0 4.2 4.4 4.6 4.8 5.0 5.2 5.4 5.6
VDD (V)
VDD (V)
FIGURE 38-49: Typical FVR Voltage 1X, FIGURE 38-50: FVR Voltage Error 1X,
PIC16F15356/75/76/85/86 devices only PIC16F15356/75/76/85/86 devices only
1.0% 1.0%
0.8%
0.8%
0.6%
0.6%
Error (%)
0.4%
Error (%)
0.4%
0.2%
0.2%
0.0%
Typical -40°C
0.0% Typical -40°C
Typical 25°C
-0.2% Typical 25°C
Typical 85°C Typical 85°C
Typical 125°C Typical 125°C
-0.2%
-0.4%
2.4 2.6 2.8 3.0 3.2 3.4 3.6 3.8 4.0 4.2 4.4 4.6 4.8 5.0 5.2 5.4 5.6
2.4 2.5 2.6 2.7 2.8 2.9 3.0 3.1 3.2 3.3 3.4 3.5 3.6 3.7
VDD (V) VDD (V)
FIGURE 38-51: FVR Voltage Error 2X, FIGURE 38-52: FVR Voltage Error 2X,
PIC16LF15356/75/76/85/86 devices only PIC16F15356/75/76/85/86 devices only
1.0%
Typical -40°C 3.0%
Typical 25°C
0.8% Typical 85°C
Typical 125°C 2.0%
0.6% 1.0%
0.0%
Error (%)
0.4%
Error (%)
-1.0%
0.2%
-2.0%
0.0%
-3.0%
Typical 25°C
-0.2% -4.0% +3ı (-40°C to +125°C)
-3ı (-40°C to +125°C)
-0.4% -5.0%
4.7 4.8 4.9 5.0 5.1 5.2 5.3 5.4 5.5 5.6 1.6 1.8 2.0 2.2 2.4 2.6 2.8 3.0 3.2 3.4 3.6 3.8
VDD (V) VDD (V)
FIGURE 38-53: FVR Voltage Error 4X, FIGURE 38-54: HFINTOSC Typical
PIC16F15356/75/76/85/86 devices only Frequency Error, PIC16LF15356/75/76/85/86
devices only
500 500
Max: 85°C + 3ı Max: 85°C + 3ı
450 Typical: 25°C 450 Typical: 25°C
Max
400 400
Typical
350 350
Max
300 300
IDD (µA)
IDD (µA)
Typical 250
250
200 200
150 150
100 100
50 50
0 0
1.6 1.8 2.0 2.2 2.4 2.6 2.8 3.0 3.2 3.4 3.6 3.8 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
VDD (V)
VDD (V)
FIGURE 38-55: IDD, XT Oscillator 4 MHz, FIGURE 38-56: IDD, XT Oscillator 4 MHz,
PIC16F15356/75/76/85/86 devices only PIC16F15356/75/76/85/86 devices only
4.0 4.0
Max: 85°C + 3ı Max: 85°C + 3ı
Typical: 25°C Typical: 25°C
3.5 3.5
3.0 3.0
Max
2.5 2.5
Max
IDD (MA)
IDD (MA)
2.0 2.0
Typical
1.5 Typical 1.5
1.0 1.0
0.5 0.5
0.0 0.0
1.6 1.8 2.0 2.2 2.4 2.6 2.8 3.0 3.2 3.4 3.6 3.8 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
FIGURE 38-57: IDD, HS Oscillator 32 MHz, FIGURE 38-58: IDD, HS Oscillator 32 MHz,
PIC16LF15356/75/76/85/86 devices only PIC16F15356/75/76/85/86 devices only
4.0 4.0
Max: 85°C + 3ı Max: 85°C + 3ı
Typical: 25°C Typical: 25°C
3.5 3.5
IDD (MA)
Typical
2.0 2.0
Typical
1.5 1.5
1.0 1.0
0.5 0.5
0.0 0.0
1.6 1.8 2.0 2.2 2.4 2.6 2.8 3.0 3.2 3.4 3.6 3.8 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5
FIGURE 38-59: IDD, HFINTOSC Mode, FIGURE 38-60: IDD, HFINTOSC Mode,
FOSC = 32 MHz, PIC16LF15356/75/76/85/86 FOSC = 32 MHz, PIC16F15356/75/76/85/86
devices only devices only
2.0 2.0
Max: 85°C + 3ı Max: 85°C + 3ı
1.8 Typical: 25°C 1.8 Typical: 25°C Max
1.6 1.6
1.4 1.4
Max
1.2 1.2 Typical-
IDD (MA)
IDD (MA)
1.0 1.0
Typical
0.8 0.8
0.6 0.6
0.4 0.4
0.2 0.2
0.0 0.0
1.6 1.8 2.0 2.2 2.4 2.6 2.8 3.0 3.2 3.4 3.6 3.8 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5
FIGURE 38-61: IDD, HFINTOSC Mode, FIGURE 38-62: IDD, HFINTOSC Mode,
FOSC = 16 MHz, PIC16LF15356/75/76/85/86 FOSC = 16 MHz, PIC16F15356/75/76/85/86
devices only devices only
1,200 1,200
Max: 85°C + 3ı Max: 85°C + 3ı
Typical: 25°C Typical: 25°C
1,000 Max
1,000
Max
800 800
Typical
IDD (µA)
IDD (µA)
600 600
Typical
400 400
200 200
0 0
1.6 1.8 2.0 2.2 2.4 2.6 2.8 3.0 3.2 3.4 3.6 3.8 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5
FIGURE 38-63: IDD, HFINTOSC Idle Mode, FIGURE 38-64: IDD, HFINTOSC Idle Mode,
FOSC = 16 MHz, PIC16LF15356/75/76/85/86 FOSC = 16 MHz, PIC16F15356/75/76/85/86
devices only devices only
1,200 1,200
Max: 85°C + 3ı Max: 85°C + 3ı
Typical: 25°C Typical: 25°C Max
1,000 1,000
Max
800 800 Typical
IDD (µA)
IDD (µA)
Typical
600 600
400 400
200 200
0 0
1.6 1.8 2.0 2.2 2.4 2.6 2.8 3.0 3.2 3.4 3.6 3.8 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5
FIGURE 38-65: IDD, HFINTOSC Doze FIGURE 38-66: IDD, HFINTOSC Doze
Mode, FOSC = 16 MHz, PIC16LF15356/75/76/85/ Mode, FOSC = 16 MHz, PIC16F15356/75/76/85/
86 devices only 86 devices only
4 2.5
Typical 25°C Typical 25°C
3.5 +3ı (-40°C to +125°C) +3ı (-40°C to +125°C)
-3ı (-40°C to +125°C) 2 -3ı (-40°C to +125°C)
3
2.5
Voltage (V)
1.5
Voltage (V)
1
1.5
1
0.5
0.5
0
0
1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5
1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
VDD (V)
VDD (V)
FIGURE 38-67: Schmitt Trigger High Values FIGURE 38-68: Schmitt Trigger Low Values
1.8 50
Typical 25°C Typical 25°C
45
1.6 +3ı (-40°C to +125°C) +3 Sigma (-40°C to
-3ı (-40°C to +125°C)
40 125°C)
1.4
Voltage (V)
35
1.2
30
Time (ns)
1 25
0.8 20
0.6 15
10
0.4
5
0.2
0
0 1.5 2.5 3.5 4.5 5.5
1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 VDD (V)
VDD (V)
FIGURE 38-69: Input Level TTL Trip FIGURE 38-70: Rise Time, Slew Rate
Thresholds Control Enabled
60 30
Typical 25°C Typical 25°C
40 20
Time (ns)
Time (ns)
30 15
20 10
10 5
0 0
1.5 2.5 3.5 4.5 5.5 1.5 2.5 3.5 4.5 5.5
VDD (V) VDD (V)
FIGURE 38-71: Fall Time, Slew Rate Control FIGURE 38-72: Rise Time, Slew Rate
Enabled Control Disabled
600
20 Typical 25°C
Max: 85°C + 3ı Max.
18 +3 Sigma (-40°C to 500 Typical: 25°C
16 125°C)
14 400
IPD (nA)
12
Time (ns)
10 300
8
200
6
4 Typical
100
2
0
1.5 2.5 3.5 4.5 5.5 0
1.6 1.8 2.0 2.2 2.4 2.6 2.8 3.0 3.2 3.4 3.6 3.8
VDD (V)
VDD (V)
FIGURE 38-73: Rise Time, Slew Rate FIGURE 38-74: IPD Base, Low-Power Sleep
Control Disabled Mode, PIC16LF15356/75/76/85/86 devices only
1.0 1.4
Max: 85°C + 3ı Max: 85°C + 3ı
0.9 Typical: 25°C Typical: 25°C
Max. 1.2 Max.
0.8
0.7
1.0
0.6
IPD (µA)
IPD (µA)
Typical
0.5 Typical 0.8
0.4
0.6
0.3
0.2
0.4
0.1
0.0 0.2
1.6 1.8 2.0 2.2 2.4 2.6 2.8 3.0 3.2 3.4 3.6 3.8 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
FIGURE 38-75: IPD, Watchdog Timer FIGURE 38-76: IPD, Watchdog Timer
(WDT), PIC16LF15356/75/76/85/86 devices only (WDT), PIC16F15356/75/76/85/86 devices only
60
60
Max: 85°C + 3ı
Max: 85°C + 3ı
55 Typical: 25°C
Typical: 25°C
55
50
50
45
45 40
IPD (µA)
IPD (µA)
35 Max.
40
30
35 Max.
25 Typical
30
20
25 Typical 15
20 10
1.6 1.8 2.0 2.2 2.4 2.6 2.8 3.0 3.2 3.4 3.6 3.8 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
FIGURE 38-77: IPD, Fixed Voltage FIGURE 38-78: IPD, Fixed Voltage
Reference (FVR), PIC16LF15356/75/76/85/86 Reference (FVR), PIC16F15356/75/76/85/86
devices only devices only
14 16
Max: 85°C + 3ı Max: 85°C + 3ı
Typical: 25°C Typical: 25°C
13 14
12 12
IPD (µA)
Typical
IPD (µA)
11 10
10 8
Typical
9 6
8 4
1.6 1.8 2.0 2.2 2.4 2.6 2.8 3.0 3.2 3.4 3.6 3.8 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
FIGURE 38-79: IPD, Brown-out Reset FIGURE 38-80: IPD, Brown-out Reset
(BOR), BORV = 1, PIC16LF15356/75/76/85/86 (BOR), BORV = 1, PIC16F15356/75/76/85/86
devices only devices only
1.2 1.4
1.0
0.8
IPD (µA)
0.8
IPD (nA)
0.6
0.6
Typical
0.4
0.4
0.2
0.2
Typical
0 0.0
1.6 1.8 2.0 2.2 2.4 2.6 2.8 3.0 3.2 3.4 3.6 3.8 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
FIGURE 38-81: IPD, Low-Power Brown-out FIGURE 38-82: IPD, Low-Power Brown-out
Reset (LPBOR = 0), PIC16LF15356/75/76/85/86 Reset (LPBOR = 0), PIC16F15356/75/76/85/86
devices only devices only
40 40
IPD (µA)
32 35
Typical
34
30 Typical
33
28
32
26
31
24 30
1.6 1.8 2.0 2.2 2.4 2.6 2.8 3.0 3.2 3.4 3.6 3.8 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
30 1 Max.
Max: 85°C + 3ı 0.9
Typical: 25°C Max. Max: 85°C + 3ı
25 Typical: 25°C
0.8
0.7
20
0.6
IPD (µA)
IPD (µA)
Typical
15 0.5 Typical
0.4
10
0.3
0.2
5
0.1
0 0
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
FIGURE 38-85: Ipd Base, 01, PIC16F15356/ FIGURE 38-86: Ipd Base, 11, PIC16F15356/
75/76/85/86 devices only 75/76/85/86 devices only
36,000
36,000 Typical 25°C
Typical 25°C
35,000 +3 Sigma (-40°C to 125°C)
35,000 +3 Sigma (-40°C to 125°C)
-3 Sigma (-40°C to 125°C)
-3 Sigma (-40°C to 125°C)
34,000
34,000
33,000
33,000
Frequency (Hz)
Frequency (Hz)
32,000
32,000
31,000
31,000
30,000
30,000
29,000
29,000
28,000
28,000 2.2 2.4 2.6 2.8 3 3.2 3.4 3.6 3.8 4 4.2 4.4 4.6 4.8 5 5.2 5.4 5.6
1.7 2.0 2.3 2.6 2.9 3.2 3.5
VDD (V)
VDD (V)
4.00% 1.6
Max: Typical + 3ı (-40°C to +125°C)
3.00% Typical; statistical mean @ 25°C
Min: Typical - 3ı (-40°C to +125°C) 1.55
+3 Sigma
2.00% 1.5
1.00% 1.45
Voltage (V)
Error (%)
Typical
0.00% 1.4
-1.00% 1.35
1.64
1.8
Max: Typical + 3ı
Typical: 25°C 74.0
1.63
Min: Typical - 3ı
1.75
72.0
1.62
(V) (V)
1.7 +3 Sigma
70.0
Voltage
1.61
Time (ms)
Voltage
Typical 68.0
1.6
1.65
66.0
1.59
1.6
64.0
1.58 -3 Sigma
-40 -20 0 20 40 60 80 100 120
1.55 62.0 Typical 25°C
Temperature (°C) + 3ı (-40°C to +125°C)
- 3ı (-40°C to +125°C)
60.0
1.5
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
-60 -40 -20 0 20 40 60 80 100 120 140
VDD (V)
Temperature (°C)
6
Graph represents 3ı Limits
75.0
73.0 5
-40°C
71.0
4
69.0 Typical
VOH (V)
Time (ms)
67.0
3
65.0 125°C
63.0 2
61.0
1
Typical 25°C
59.0
+ 3ı (-40°C to +125°C)
- 3ı (-40°C to +125°C)
57.0 0
1.6 1.8 2.0 2.2 2.4 2.6 2.8 3.0 3.2 3.4 3.6 3.8 -45 -40 -35 -30 -25 -20 -15 -10 -5 0
VDD (V)
IOH (mA)
FIGURE 38-93: PWRT Period, FIGURE 38-94: VOH Vs. IOH Over
PIC16LF15356/75/76/85/86 devices only Temperature, VDD = 5.5V, PIC16F15356/75/76/
85/86 devices only
3 3.5
Graph represents 3ı Limits
Graph represents 3ı Limits
3.0
2.5
2
-40°C
2.0 Typical
VOH (V)
VOL (V)
125°C
1.5
125°C
1
Typical 1.0
-40°C
0.5
0 0.0
0 10 20 30 40 50 60 -30 -25 -20 -15 -10 -5 0
IOL (mA)
IOH (mA)
FIGURE 38-95: VOL Vs. IOL Over FIGURE 38-96: VOH Vs. IOH Over
Temperature, VDD = 5.5V, PIC16F15356/75/76/ Temperature, VDD = 3.0V
85/86 devices only
3.0 2.0
1.4
2.0 Typical -40°C
1.2
125°C
VOH (V)
VOL (V)
1.5 1.0
125°C
Typical
0.8
1.0
0.6
-40°C
0.4
0.5
0.2
0.0 0.0
0 5 10 15 20 25 30 35 40 45 50 55 60 -8 -7.5 -7 -6.5 -6 -5.5 -5 -4.5 -4 -3.5 -3 -2.5 -2 -1.5 -1 -0.5 0
FIGURE 38-97: VOL Vs. IOL Over FIGURE 38-98: VOH Vs. IOH Over
Temperature, VDD = 3.0V Temperature, VDD = 1.8V, PIC16LF15356/75/76/
85/86 devices only
1.8
18
Graph represents 3ı Limits Typical 25°C
1.6
+3ı (-40°C to +125°C)
17
1.4
1.2 16
125°C Typical -40°C
Time (us)
VOL (V)
1
15
0.8
0.6 14
0.4
13
0.2
0 12
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
VDD (V)
IOL (mA)
FIGURE 38-99: VOL Vs. IOL Over FIGURE 38-100: Wake From Sleep,
Temperature, VDD = 3.0V, PIC16F15356/75/76/ VREGPM = 0, HFINTOSC = 4 MHz,
85/86 devices only PIC16F15356/75/76/85/86 devices only
120 28
Typical 25°C Typical 25°C
110 +3ı (-40°C to +125°C) 27 +3ı (-40°C to +125°C)
100
26
90
25
80
Time (us)
Time (us)
70 24
60
23
50
22
40
30 21
20 20
1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
VDD (V) VDD (V)
FIGURE 38-101: Wake from Sleep, FIGURE 38-102: Wake from Sleep,
VREGPM = 1, HFINTOSC = 4 MHz, VREGPM = 1, HFINTOSC = 16 MHZ,
PIC16F15356/75/76/85/86 devices only PIC16F15356/75/76/85/86 devices only
120 700
Typical 25°C Typical 25°C
+3ı (-40°C to +125°C)
110 650 + 3ı (-40°C to +125°C)
100 600
90 550
Time (us)
Time (us)
80 500
450
70
400
60
350
50
300
40
2.2 2.4 2.6 2.8 3.0 3.2 3.4 3.6 3.8 4.0 4.2 4.4 4.6 4.8 5.0 5.2 5.4 5.6
1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
VDD (V)
VDD (V)
FIGURE 38-103: Wake from Sleep, FIGURE 38-104: Wake from Sleep,
VREGPM = 1, HFINTOSC = 16 MHz, VREGPM = 1, PIC16F15356/75/76/85/86
PIC16F15356/75/76/85/86 devices only devices only
700 700
Typical 25°C Typical 25°C
650 + 3ı (-40°C to +125°C) 650 + 3ı (-40°C to +125°C)
600 600
550 550
Time (us)
Time (us)
500 500
450 450
400 400
350 350
300 300
1.7 2.2 2.7 3.2 3.7 2.2 2.4 2.6 2.8 3.0 3.2 3.4 3.6 3.8 4.0 4.2 4.4 4.6 4.8 5.0 5.2 5.4 5.6
VDD (V) VDD (V)
FIGURE 38-105: Wake from Sleep, FIGURE 38-106: Wake from Sleep,
PIC16LF15356/75/76/85/86 devices only VREGPM = 1, LFINTOSC, PIC16F15356/75/76/
85/86 devices only
700 4.2
Typical 25°C
650 + 3ı (-40°C to +125°C)
600 4.1
550
Time (us)
Time (ms)
500 4.0
450
400 3.9
Typical 25°C
350 +3ı (-40°C to +125°C)
-3ı (-40°C to +125°C)
300 3.8
1.7 2.2 2.7 3.2 3.7 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
FIGURE 38-107: Wake from Sleep, FIGURE 38-108: Watchdog Timer Time-out
LFINTOSC, PIC16LF15356/75/76/85/86 devices Period, PIC16F15356/75/76/85/86 devices only
only
300.0
4.2
Typical 25°C
+ 3ı (-40°C to +125°C)
250.0
- 3ı (-40°C to +125°C)
4.0 150.0
100.0
3.9
FIGURE 38-109: Watchdog Timer Time-out FIGURE 38-110: Weak Pull-up Current,
Period, PIC16LF15356/75/76/85/86 devices only PIC16F15356/75/76/85/86 devices only
180.0 -3.450
Typical 25°C
160.0 -3.500
+ 3ı (-40°C to +125°C)
- 3ı (-40°C to +125°C) Typical
140.0
Pull-Up Current (uA)
-3.550
+3 Sigma
120.0 -3.600 -3 Sigma
Slope (mV/C)
100.0 -3.650
80.0 -3.700
60.0 -3.750
40.0 -3.800
20.0 -3.850
0.0 -3.900
1.6 1.8 2.0 2.2 2.4 2.6 2.8 3.0 3.2 3.4 3.6 3.8 -60 -40 -20 0 20 40 60 80 100 120 140
FIGURE 38-111: Weak Pull-up Current, FIGURE 38-112: High Range Temperature
PIC16LF15356/75/76/85/86 devices only Indicator Voltage Sensitivity Across Temperature
-2.300
-2.350
Typical
+3 Sigma
-2.400
-3 Sigma
Slope (mV/C)
-2.450
-2.500
-2.550
-2.600
-60 -40 -20 0 20 40 60 80 100 120 140
Temperature (oC)
The MPASM Assembler generates relocatable object • Support for the entire device instruction set
files for the MPLINK Object Linker, Intel® standard HEX • Support for fixed-point and floating-point data
files, MAP files to detail memory usage and symbol • Command-line interface
reference, absolute LST files that contain source lines • Rich directive set
and generated machine code, and COFF files for • Flexible macro language
debugging.
• MPLAB X IDE compatibility
The MPASM Assembler features include:
• Integration into MPLAB X IDE projects
• User-defined macros to streamline
assembly code
• Conditional assembly for multipurpose
source files
• Directives that allow complete control over the
assembly process
PIC16F15356
/SP e3
1525017
XXXXXXXXXXXXXXXXXXXX PIC16LF15356
XXXXXXXXXXXXXXXXXXXX /SO e3
XXXXXXXXXXXXXXXXXXXX
YYWWNNN 1525017
PIC16F15356
/SS e3
1525017
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.
28-Lead UQFN (4x4x0.5 mm) and 28-Lead QFN (6x6 mm) Example
525017
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.
XXXXXXXXXXXXXXXXXX PIC16F15375
XXXXXXXXXXXXXXXXXX /P e3
XXXXXXXXXXXXXXXXXX
YYWWNNN 1525017
PIN 1 PIN 1
PIC16
LF15375
/MV e 3
1525017
28-Lead QFN (6x6 mm) Example
PIN 1 PIN 1
XXXXXXXX PIC16
XXXXXXXX
LF15375
/MV
YYWWNNN 1525017
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.
XXXXXXXXXX 16F15376
XXXXXXXXXX /PT e3
XXXXXXXXXX
YYWWNNN 1525017
PIN 1 PIN 1
XXXXXXXXXXX 16LF15376
XXXXXXXXXXX /ML
XXXXXXXXXXX
YYWWNNN 1525017
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.
PIN 1 PIN 1
XXXXXXXX 16F15386
XXXXXXXX /MV e3
YYWWNNN 1525017
XXXXXXX 16F15386
XXXYYWW /PT1525 e3
NNN 017
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.
*
K%
6#/
##*
! K
' * *%*
**
HVV666+
+V
K
NOTE 1
E1
1 2 3
A A2
L c
A1 b1
b e eB
X*# Y9[?
+#\+*# Y Y] ^
Y$+5
'!# Y _
!* G9
**! ` `
%%! K K## ;
G#**! ` `
$%
*$%
j%* ? ; ;;
%%! Kj%* ? _
]"
\* ; ;{
**! \ ;
\% K## _
X
\%j%* 5
\6
\%j%* 5 _
]"
6
7 G ` ` ;
"#
!"#$%&'*$
+"
/5$*+$#*5 *%6*** %
7' *9
*
#*
; +##%?%* $%+%'#
*
$##%'#
*
$###*& %@
#%
+#%*
?B
G9H G# +#
* & *"$#66*$**
#
6 9G
Note: For the most current package drawings, please see the Microchip Packaging Specification located at
http://www.microchip.com/packaging
Note: For the most current package drawings, please see the Microchip Packaging Specification located at
http://www.microchip.com/packaging
Note: For the most current package drawings, please see the Microchip Packaging Specification located at
http://www.microchip.com/packaging
$%
&
'*
&!
"# J
*+#* $
*
K%
6#/
##*
! K
' * *%*
**
HVV666+
+V
K
D
N
E
E1
1 2
b
NOTE 1
e
c
A A2
φ
A1
L1 L
X*# \\??
+#\+*# Y Y] ^
Y$+5
'!# Y _
!* {G9
]"
[* ` `
%%! K K## { _
*%'' ` `
]"
j%* ? _ _
%%! Kj%* ? ; {
]"
\*
J*\* \
J*
* \ ?J
\% K## `
J* | | _|
\%j%* 5 ` ;_
"#
!"#$%&'*$
+"
/5$*+$#*5 *%6*** %
+##%?%* $%+%'#
*
$##%'#
*
$###*& %++
#%
; +#%*
?B
G9H G# +#
* & *"$#66*$**
#
?JH '
+#/$#$6*$**
/'
'
+*
$
##
6 9;G
Note: For the most current package drawings, please see the Microchip Packaging Specification located at
http://www.microchip.com/packaging
Note: For the most current package drawings, please see the Microchip Packaging Specification located at
http://www.microchip.com/packaging
Note: For the most current package drawings, please see the Microchip Packaging Specification located at
http://www.microchip.com/packaging
*
K%
6#/
##*
! K
' * *%*
**
HVV666+
+V
K
NOTE 1
E1
1 2 3
A A2
L c
b1
A1
b e eB
X*# Y9[?
+#\+*# Y Y] ^
Y$+5
'!# Y
!* G9
**! ` `
%%! K K## `
G#**! ` `
$%
*$%
j%* ? ` {
%%! Kj%* ? _ ` _
]"
\* _ `
**! \ `
\% K## _ `
X
\%j%* 5 ; `
\6
\%j%* 5 ` ;
]"
6
7 G ` `
"#
!"#$%&'*$
+"
/5$*+$#*5 *%6*** %
7' *9
*
#*
; +##%?%* $%+%'#
*
$##%'#
*
$###*& %@
#%
+#%*
?B
G9H G# +#
* & *"$#66*$**
#
6 9{G
Note: For the most current package drawings, please see the Microchip Packaging Specification located at
http://www.microchip.com/packaging
Note: For the most current package drawings, please see the Microchip Packaging Specification located at
http://www.microchip.com/packaging
Note: For the most current package drawings, please see the Microchip Packaging Specification located at
http://www.microchip.com/packaging
4 57 " 9 ; ,<, 45"!
=$ *'' >
9$
"# J
*+#* $
*
K%
6#/
##*
! K
' * *%*
**
HVV666+
+V
K
Note: For the most current package drawings, please see the Microchip Packaging Specification located at
http://www.microchip.com/packaging
D A
D1 B
NOTE 2
(DATUM A)
(DATUM B)
E1 E
NOTE 1 A A
2X
N
0.20 H A B
2X 1 2 3
0.20 H A B 4X 11 TIPS
TOP VIEW
0.20 C A B
A A2
C
SEATING PLANE
0.10 C A1
SIDE VIEW
1 2 3
NOTE 1
44 X b
e 0.20 C A B
BOTTOM VIEW
Microchip Technology Drawing C04-076C Sheet 1 of 2
Note: For the most current package drawings, please see the Microchip Packaging Specification located at
http://www.microchip.com/packaging
L θ
(L1)
SECTION A-A
Units MILLIMETERS
Dimension Limits MIN NOM MAX
Number of Leads N 44
Lead Pitch e 0.80 BSC
Overall Height A - - 1.20
Standoff A1 0.05 - 0.15
Molded Package Thickness A2 0.95 1.00 1.05
Overall Width E 12.00 BSC
Molded Package Width E1 10.00 BSC
Overall Length D 12.00 BSC
Molded Package Length D1 10.00 BSC
Lead Width b 0.30 0.37 0.45
Lead Thickness c 0.09 - 0.20
Lead Length L 0.45 0.60 0.75
Footprint L1 1.00 REF
Foot Angle θ 0° 3.5° 7°
Notes:
1. Pin 1 visual index feature may vary, but must be located within the hatched area.
2. Exact shape of each corner is optional.
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.
44-Lead Plastic Thin Quad Flatpack (PT) - 10X10X1 mm Body, 2.00 mm Footprint [TQFP]
Note: For the most current package drawings, please see the Microchip Packaging Specification located at
http://www.microchip.com/packaging
C1
44
1
2
G
C2
Y1
X1 E
SILK SCREEN
Units MILLIMETERS
Dimension Limits MIN NOM MAX
Contact Pitch E 0.80 BSC
Contact Pad Spacing C1 11.40
Contact Pad Spacing C2 11.40
Contact Pad Width (X44) X1 0.55
Contact Pad Length (X44) Y1 1.50
Distance Between Pads G 0.25
Notes:
1. Dimensioning and tolerancing per ASME Y14.5M
BSC: Basic Dimension. Theoretically exact value shown without tolerances.
Microchip Technology Drawing No. C04-2076B
44-Lead Plastic Quad Flat, No Lead Package (ML) - 8x8 mm Body [QFN or VQFN]
Note: For the most current package drawings, please see the Microchip Packaging Specification located at
http://www.microchip.com/packaging
D A B
N
NOTE 1
1
2
E
(DATUM B)
(DATUM A)
2X
0.20 C
2X
0.20 C TOP VIEW
0.10 C A1
C
SEATING A
PLANE 44X
A3 0.08 C
SIDE VIEW
L
0.10 C A B
D2
0.10 C A B
E2
K
2
1
NOTE 1 N
44X b
e 0.07 C A B
0.05 C
BOTTOM VIEW
Microchip Technology Drawing C04-103D Sheet 1 of 2
44-Lead Plastic Quad Flat, No Lead Package (ML) - 8x8 mm Body [QFN or VQFN]
Note: For the most current package drawings, please see the Microchip Packaging Specification located at
http://www.microchip.com/packaging
Units MILLIMETERS
Dimension Limits MIN NOM MAX
Number of Pins N 44
Pitch e 0.65 BSC
Overall Height A 0.80 0.90 1.00
Standoff A1 0.00 0.02 0.05
Terminal Thickness A3 0.20 REF
Overall Width E 8.00 BSC
Exposed Pad Width E2 6.25 6.45 6.60
Overall Length D 8.00 BSC
Exposed Pad Length D2 6.25 6.45 6.60
Terminal Width b 0.20 0.30 0.35
Terminal Length L 0.30 0.40 0.50
Terminal-to-Exposed-Pad K 0.20 - -
Notes:
1. Pin 1 visual index feature may vary, but must be located within the hatched area.
2. Package is saw singulated
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.
44-Lead Plastic Quad Flat, No Lead Package (ML) - 8x8 mm Body [QFN or VQFN]
Note: For the most current package drawings, please see the Microchip Packaging Specification located at
http://www.microchip.com/packaging
C1
X2
EV
44
G2
1
2
ØV
EV
C2 Y2
G1
Y1
E SILK SCREEN
X1
Note: For the most current package drawings, please see the Microchip Packaging Specification located at
http://www.microchip.com/packaging
Note: For the most current package drawings, please see the Microchip Packaging Specification located at
http://www.microchip.com/packaging
Note: For the most current package drawings, please see the Microchip Packaging Specification located at
http://www.microchip.com/packaging
48X TIPS
0.20 C A-B D
D
D1
D1
2
A B
E1 E
E1
A A 2
E1
4 N
NOTE 1 1 2 4X
D1 0.20 H A-B D
4
48x b
e 0.08 C A-B D
TOP VIEW
0.10 C H
C A2
A
SEATING
PLANE 0.08 C
A1 SIDE VIEW
Note: For the most current package drawings, please see the Microchip Packaging Specification located at
http://www.microchip.com/packaging
E T
L
(L1)
SECTION A-A
Units MILLIMETERS
Dimension Limits MIN NOM MAX
Number of Leads N 48
Lead Pitch e 0.50 BSC
Overall Height A - - 1.20
Standoff A1 0.05 - 0.15
Molded Package Thickness A2 0.95 1.00 1.05
Foot Length L 0.45 0.60 0.75
Footprint L1 1.00 REF
Foot Angle I 0° 3.5° 7°
Overall Width E 9.00 BSC
Overall Length D 9.00 BSC
Molded Package Width E1 7.00 BSC
Molded Package Length D1 7.00 BSC
Lead Thickness c 0.09 - 0.16
Lead Width b 0.17 0.22 0.27
Mold Draft Angle Top D 11° 12° 13°
Mold Draft Angle Bottom E 11° 12° 13°
Notes:
1. Pin 1 visual index feature may vary, but must be located within the hatched area.
2. Chamfers at corners are optional; size may vary.
3. Dimensions D1 and E1 do not include mold flash or protrusions. Mold flash or
protrusions shall not exceed 0.25mm 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.
5. Datums A-B and D to be determined at center line between leads where leads exit
plastic body at datum plane H
Microchip Technology Drawing C04-300-PT Rev A Sheet 2 of 2
Note: For the most current package drawings, please see the Microchip Packaging Specification located at
http://www.microchip.com/packaging
C1
C2 G
SILK SCREEN
48
Y1
1 2
X1
E
Units MILLIMETERS
Dimension Limits MIN NOM MAX
Contact Pitch E 0.50 BSC
Contact Pad Spacing C1 8.40
Contact Pad Spacing C2 8.40
Contact Pad Width (X48) X1 0.30
Contact Pad Length (X48) Y1 1.50
Distance Between Pads G 0.20
Notes:
1. Dimensioning and tolerancing per ASME Y14.5M
BSC: Basic Dimension. Theoretically exact value shown without tolerances.
2. For best soldering results, thermal vias, if used, should be filled or tented to avoid solder loss during
reflow process
Revision A (12/2016)
Initial release of the document.
Revision B (07/2018)
Updated Register 5-4 and 20-3 (ADACT). Updated
Equation 19-1 (sensor temperature), Updated Register
18-1 (FVRCON), Updated 19.2.1.1, Removed Exam-
ple 19-1 (Temp Sens),
Replaced PGC/PGD with ICSPCLK/ICSPDAT;
Revised Section 9.2.2.3 LFINSTOSC; Revised Table 4-
5, 15-1 and 15-2 (PPS Input Signal Routing Options);
Table 15-6 Summary of Registers/PPS Module;
Revised Example 20-1 ADC Conversion; Added note
to Section 20.1.2 Channel Selection; Revised Section
27.0 Timer2 Module; Table 37-11, revised RST06.
Note the following details of the code protection feature on Microchip devices:
• Microchip products meet the specification contained in their particular Microchip Data Sheet.
• 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 Microchip’s 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 Microchip’s 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.
QUALITY MANAGEMENT SYSTEM © 2018, Microchip Technology Incorporated, All Rights Reserved.
ISBN: 978-1-5224-3330-9
CERTIFIED BY DNV
== ISO/TS 16949 ==
10/25/17