PIC16F1503
PIC16F1503
MSSP (I2C/SPI)
Flash (words)
Comparators
Data SRAM
(8/16-bit)
EUSART
Debug(1)
(bytes)
Timers
I/O’s(2)
PWM
CWG
NCO
DAC
CLC
XLP
Device
Note: For other small form-factor package availability and marking information, please visit
http://www.microchip.com/packaging or contact your local sales office.
PIC16(L)F1503
RA4 3 12 RA1/ICSPCLK
MCLR/VPP/RA3 4 11 RA2
RC5 5 10 RC0
RC4 6 9 RC1
RC3 7 8 RC2
Vss
NC
NC
16 15 14 13
RA5 1 12 RA0/ICSPDAT
RA4 2 PIC16(L)F1503 11 RA1/ICSPCLK
MCLR/VPP/RA3 3 10 RA2
RC5 4 9 RC0
5 6 7 8
RC4
RC3
RC2
RC1
Comparator
Reference
Interrupt
Pull-Up
MSSP
Timer
Basic
PWM
CWG
NCO
ADC
CLC
I/O
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.
PIC12(L)F1501
PIC16(L)F1503
PIC16(L)F1507
PIC16(L)F1508
PIC16(L)F1509
Peripheral
Rev. 10-000039B
12/16/2013
Program
Flash Memory
RAM
PORTA
CLKOUT
Timing
Generation
CPU
CLKIN INTRC
Oscillator
(Note 3)
PORTC
MCLR
Temp ADC
MSSP1 TMR2 TMR1 TMR0 C2 C1 DAC FVR
Indicator 10-bit
Rev. 10-000055A
7/30/2013
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)
Addr MUX
Instruction Reg
Indirect
Direct Addr 7 Addr
12
5 12
BSR Reg
15
FSR0 Reg
15 FSR1 Reg
STATUS Reg
8
3 MUX
Power-up
Instruction
Timer
Decode and
Power-on
Control
Reset ALU
8
Watchdog
CLKIN Timer
Timing
Generation Brown-out
CLKOUT Reset W Reg
Internal
Oscillator VDD VSS
Block
Stack Level 1
EXAMPLE 3-1: RETLW INSTRUCTION
constants
BRW ;Add Index in W to
Stack Level 15 ;program counter to
;select data
RETLW DATA0 ;Index0 data
Reset Vector 0000h
RETLW DATA1 ;Index1 data
RETLW DATA2
RETLW DATA3
Interrupt Vector 0004h
On-chip 0005h my_function
Program Page 0
07FFh ;… LOTS OF CODE…
Memory
MOVLW DATA_INDEX
Rollover to Page 0 0800h
call constants
;… THE CONSTANT IS IN W
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.
6Fh
70h
Common RAM
(16 bytes)
7Fh
The memory maps for Bank 0 through Bank 31 are shown in the tables in this section.
01Ah TMR2 09Ah OSCSTAT 11Ah — 19Ah — 21Ah — 29Ah — 31Ah — 39Ah —
01Bh PR2 09Bh ADRESL 11Bh — 19Bh — 21Bh — 29Bh — 31Bh — 39Bh —
01Ch T2CON 09Ch ADRESH 11Ch — 19Ch — 21Ch — 29Ch — 31Ch — 39Ch —
01Dh — 09Dh ADCON0 11Dh APFCON 19Dh — 21Dh — 29Dh — 31Dh — 39Dh —
01Eh — 09Eh ADCON1 11Eh — 19Eh — 21Eh — 29Eh — 31Eh — 39Eh —
01Fh — 09Fh ADCON2 11Fh — 19Fh — 21Fh — 29Fh — 31Fh — 39Fh —
020h 0A0h General 120h 1A0h 220h 2A0h 320h 3A0h
Purpose
Register
General
0BFh 32 Bytes
Purpose Unimplemented Unimplemented Unimplemented Unimplemented Unimplemented Unimplemented
0C0h
Register Read as ‘0’ Read as ‘0’ Read as ‘0’ Read as ‘0’ Read as ‘0’ Read as ‘0’
PIC16(L)F1503
80 Bytes Unimplemented
Read as ‘0’
06Fh 0EFh 16Fh 1EFh 26Fh 2EFh 36Fh 3EFh
070h 0F0h 170h 1F0h 270h 2F0h 370h 3F0h
Common RAM Common RAM Common RAM Common RAM Common RAM Common RAM Common RAM
Common RAM (Accesses (Accesses (Accesses (Accesses (Accesses (Accesses (Accesses
70h – 7Fh) 70h – 7Fh) 70h – 7Fh) 70h – 7Fh) 70h – 7Fh) 70h – 7Fh) 70h – 7Fh)
DS40001607D-page 19
PIC16(L)F1503
BANK 8 BANK 9 BANK 10 BANK 11 BANK 12 BANK 13 BANK 14 BANK 15
400h 480h 500h 580h 600h 680h 700h 780h
Core Registers Core Registers Core Registers Core Registers Core Registers Core Registers Core Registers Core Registers
(Table 3-2) (Table 3-2) (Table 3-2) (Table 3-2) (Table 3-2) (Table 3-2) (Table 3-2) (Table 3-2)
40Bh 48Bh 50Bh 58Bh 60Bh 68Bh 70Bh 78Bh
40Ch — 48Ch — 50Ch — 58Ch — 60Ch — 68Ch — 70Ch — 78Ch —
40Dh — 48Dh — 50Dh — 58Dh — 60Dh — 68Dh — 70Dh — 78Dh —
40Eh — 48Eh — 50Eh — 58Eh — 60Eh — 68Eh — 70Eh — 78Eh —
40Fh — 48Fh — 50Fh — 58Fh — 60Fh — 68Fh — 70Fh — 78Fh —
410h — 490h — 510h — 590h — 610h — 690h — 710h — 790h —
411h — 491h — 511h — 591h — 611h PWM1DCL 691h CWG1DBR 711h — 791h —
412h — 492h — 512h — 592h — 612h PWM1DCH 692h CWG1DBF 712h — 792h —
413h — 493h — 513h — 593h — 613h PWM1CON 693h CWG1CON0 713h — 793h —
414h — 494h — 514h — 594h — 614h PWM2DCL 694h CWG1CON1 714h — 794h —
415h — 495h — 515h — 595h — 615h PWM2DCH 695h CWG1CON2 715h — 795h —
416h — 496h — 516h — 596h — 616h PWM2CON 696h — 716h — 796h —
417h — 497h — 517h — 597h — 617h PWM3DCL 697h — 717h — 797h —
418h — 498h NCO1ACCL 518h — 598h — 618h PWM3DCH 698h — 718h — 798h —
419h — 499h NCO1ACCH 519h — 599h — 619h PWM3CON 699h — 719h — 799h —
41Ah — 49Ah NCO1ACCU 51Ah — 59Ah — 61Ah PWM4DCL 69Ah — 71Ah — 79Ah —
41Bh — 49Bh NCO1INCL 51Bh — 59Bh — 61Bh PWM4DCH 69Bh — 71Bh — 79Bh —
41Ch — 49Ch NCO1INCH 51Ch — 59Ch — 61Ch PWM4CON 69Ch — 71Ch — 79Ch —
41Dh — 49Dh — 51Dh — 59Dh — 61Dh — 69Dh — 71Dh — 79Dh —
41Eh — 49Eh NCO1CON 51Eh — 59Eh — 61Eh — 69Eh — 71Eh — 79Eh —
Status
PIC16(L)F1503
70h – 7Fh) 70h – 7Fh) 70h – 7Fh) 70h – 7Fh) 70h – 7Fh) 70h – 7Fh) 70h – 7Fh) 70h – 7Fh)
CFFh CFFh D7Fh DFFh E7Fh EFFh F7Fh FFFh
Bank 30 Bank 31
F0Ch — F8Ch
F0Dh —
F0Eh — Unimplemented
Read as ‘0’
F0Fh CLCDATA
F10h CLC1CON
FE3h
F11h CLC1POL
FE4h STATUS_SHAD
F12h CLC1SEL0
FE5h WREG_SHAD
F13h CLC1SEL1
FE6h BSR_SHAD
F14h CLC1GLS0
FE7h PCLATH_SHAD
F15h CLC1GLS1
FE8h FSR0L_SHAD
F16h CLC1GLS2
FE9h FSR0H_SHAD
F17h CLC1GLS3
FEAh FSR1L_SHAD
F18h CLC2CON
FEBh FSR1H_SHAD
F19h CLC2POL
FECh —
F1Ah CLC2SEL0
F1Bh CLC2SEL1 FEDh STKPTR
F1Ch CLC2GLS0 FEEh TOSL
F1Dh CLC2GLS1 FEFh TOSH
F1Eh CLC2GLS2
F1Fh CLC2GLS3
F20h
Unimplemented
Read as ‘0’
F6Fh
Bank 0-31
x00h or Addressing this location uses contents of FSR0H/FSR0L to address data memory
INDF0 xxxx xxxx uuuu uuuu
x80h (not a physical register)
x01h or Addressing this location uses contents of FSR1H/FSR1L to address data memory
INDF1 xxxx xxxx uuuu uuuu
x81h (not a physical register)
x02h or
PCL Program Counter (PC) Least Significant Byte 0000 0000 0000 0000
x82h
x03h or
STATUS — — — TO PD Z DC C ---1 1000 ---q quuu
x83h
x04h or
FSR0L Indirect Data Memory Address 0 Low Pointer 0000 0000 uuuu uuuu
x84h
x05h or
FSR0H Indirect Data Memory Address 0 High Pointer 0000 0000 0000 0000
x85h
x06h or
FSR1L Indirect Data Memory Address 1 Low Pointer 0000 0000 uuuu uuuu
x86h
x07h or
FSR1H Indirect Data Memory Address 1 High Pointer 0000 0000 0000 0000
x87h
x08h or
BSR — — — BSR<4:0> ---0 0000 ---0 0000
x88h
x09h or
WREG Working Register 0000 0000 uuuu uuuu
x89h
x0Ah or
PCLATH — Write Buffer for the upper 7 bits of the Program Counter -000 0000 -000 0000
x8Ah
x0Bh or
INTCON GIE PEIE TMR0IE INTE IOCIE TMR0IF INTF IOCIF 0000 0000 0000 0000
x8Bh
Legend: x = unknown, u = unchanged, q = value depends on condition, - = unimplemented, read as ‘0’, r = reserved.
Shaded locations are unimplemented, read as ‘0’.
Bank 0
00Ch PORTA — — RA5 RA4 RA3 RA2 RA1 RA0 --xx xxxx --xx xxxx
00Dh — Unimplemented — —
00Eh PORTC — — RC5 RC4 RC3 RC2 RC1 RC0 --xx xxxx --xx xxxx
00Fh — Unimplemented — —
010h — Unimplemented — —
011h PIR1 TMR1GIF ADIF — — SSP1IF — TMR2IF TMR1IF 00-- 0-00 00-- 0-00
012h PIR2 — C2IF C1IF — BCL1IF NCO1IF — — -00- 00-- -00- 00--
013h PIR3 — — — — — — CLC2IF CLC1IF ---- --00 ---- --00
014h — Unimplemented — —
015h TMR0 Holding Register for the 8-bit Timer0 Count xxxx xxxx uuuu uuuu
016h TMR1L Holding Register for the Least Significant Byte of the 16-bit TMR1 Count xxxx xxxx uuuu uuuu
017h TMR1H Holding Register for the Most Significant Byte of the 16-bit TMR1 Count xxxx xxxx uuuu uuuu
018h T1CON TMR1CS<1:0> T1CKPS<1:0> — T1SYNC — TMR1ON 0000 -0-0 uuuu -u-u
019h T1GCON TMR1GE T1GPOL T1GTM T1GSPM T1GGO/ T1GVAL T1GSS<1:0> 0000 0x00 uuuu uxuu
DONE
01Ah TMR2 Timer2 Module Register 0000 0000 0000 0000
01Bh PR2 Timer2 Period Register 1111 1111 1111 1111
01Ch T2CON — T2OUTPS<3:0> TMR2ON T2CKPS<1:0> -000 0000 -000 0000
01Dh
to — Unimplemented — —
01Fh
Bank 1
08Ch TRISA — — TRISA5 TRISA4 —(2) TRISA2 TRISA1 TRISA0 --11 1111 --11 1111
08Dh — Unimplemented — —
08Eh TRISC — — TRISC5 TRISC4 TRISC3 TRISC2 TRISC1 TRISC0 --11 1111 --11 1111
08Fh — Unimplemented — —
090h — Unimplemented — —
091h PIE1 TMR1GIE ADIE — — SSP1IE — TMR2IE TMR1IE 0000 0-00 0000 0-00
092h PIE2 — C2IE C1IE — BCL1IE NCO1IE — — 000- 00-- 000- 00--
093h PIE3 — — — — — — CLC2IE CLC1IE ---- --00 ---- --00
094h — Unimplemented — —
095h OPTION_REG WPUEN INTEDG TMR0CS TMR0SE PSA PS<2:0> 1111 1111 1111 1111
096h PCON STKOVF STKUNF — RWDT RMCLR RI POR BOR 00-1 11qq qq-q qquu
097h WDTCON — — WDTPS<4:0> SWDTEN --01 0110 --01 0110
098h — Unimplemented — —
099h OSCCON — IRCF<3:0> — SCS<1:0> -011 1-00 -011 1-00
09Ah OSCSTAT — — — HFIOFR — — LFIOFR HFIOFS ---0 --00 ---q --qq
09Bh ADRESL ADC Result Register Low xxxx xxxx uuuu uuuu
09Ch ADRESH ADC Result Register High xxxx xxxx uuuu uuuu
09Dh ADCON0 — CHS<4:0> GO/DONE ADON -000 0000 -000 0000
09Eh ADCON1 ADFM ADCS<2:0> — — ADPREF<1:0> 0000 --00 0000 --00
09Fh ADCON2 TRIGSEL<3:0> — — — — 0000 ---- 0000 ----
Legend: x = unknown, u = unchanged, q = value depends on condition, - = unimplemented, r = reserved. Shaded locations are unimplemented, read as ‘0’.
Note 1: PIC16F1503 only.
2: Unimplemented, read as ‘1’.
Bank 2
10Ch LATA — — LATA5 LATA4 — LATA2 LATA1 LATA0 --xx -xxx --uu -uuu
10Dh — Unimplemented — —
10Eh LATC — — LATC5 LATC4 LATC3 LATC2 LATC1 LATC0 --xx xxxx --uu uuuu
10Fh — Unimplemented — —
110h — Unimplemented — —
111h CM1CON0 C1ON C1OUT C1OE C1POL — C1SP C1HYS C1SYNC 0000 -100 0000 -100
112h
to — Unimplemented — —
114h
115h CMOUT — — — — — — MC2OUT MC1OUT ---- --00 ---- --00
116h BORCON SBOREN BORFS — — — — — BORRDY 10-- ---q uu-- ---u
117h FVRCON FVREN FVRRDY TSEN TSRNG CDAFVR<1:0> ADFVR<1:0> 0q00 0000 0q00 0000
118h DAC1CON0 DACEN — DACOE1 DACOE2 — DACPSS — — 0-00 -0-- 0-00 -0--
119h DAC1CON1 — — — DACR<4:0> ---0 0000 ---0 0000
11Ah
to — Unimplemented — —
11Ch
11Dh APFCON — — SDOSEL SSSEL T1GSEL — CLC1SEL NCO1SEL --00 0-00 --00 0-00
11Eh — Unimplemented — —
11Fh — Unimplemented — —
Bank 3
18Ch ANSELA — — — ANSA4 — ANSA2 ANSA1 ANSA0 ---1 -111 ---1 -111
18Dh — Unimplemented — —
18Eh ANSELC — — — — ANSC3 ANSC2 ANSC1 ANSC0 ---- 1111 ---- 1111
18Fh — Unimplemented — —
190h — Unimplemented — —
191h PMADRL Flash Program Memory Address Register Low Byte 0000 0000 0000 0000
192h PMADRH —(2) Flash Program Memory Address Register High Byte 1000 0000 1000 0000
193h PMDATL Flash Program Memory Read Data Register Low Byte xxxx xxxx uuuu uuuu
194h PMDATH — — Flash Program Memory Read Data Register High Byte --xx xxxx --uu uuuu
195h PMCON1 —(2) CFGS LWLO FREE WRERR WREN WR RD 1000 x000 1000 q000
196h PMCON2 Flash Program Memory Control Register 2 0000 0000 0000 0000
197h VREGCON(1) — — — — — — VREGPM Reserved ---- --01 ---- --01
198h
to — Unimplemented — —
19Fh
Legend: x = unknown, u = unchanged, q = value depends on condition, - = unimplemented, r = reserved. Shaded locations are unimplemented, read as ‘0’.
Note 1: PIC16F1503 only.
2: Unimplemented, read as ‘1’.
Bank 4
20Ch WPUA — — WPUA5 WPUA4 WPUA3 WPUA2 WPUA1 WPUA0 --11 1111 --11 1111
20Dh
to — Unimplemented — —
212h
213h SSP1MSK MSK<7:0> 1111 1111 1111 1111
214h SSP1STAT SMP CKE D/A P S R/W UA BF 0000 0000 0000 0000
215h SSP1CON1 WCOL SSPOV SSPEN CKP SSPM<3:0> 0000 0000 0000 0000
216h SSP1CON2 GCEN ACKSTAT ACKDT ACKEN RCEN PEN RSEN SEN 0000 0000 0000 0000
217h SSP1CON3 ACKTIM PCIE SCIE BOEN SDAHT SBCDE AHEN DHEN 0000 0000 0000 0000
218h
to — Unimplemented — —
21Fh
Bank 5
28Ch
to — Unimplemented — —
29Fh
Bank 6
30Ch
to — Unimplemented — —
31Fh
Bank 7
38Ch
to — Unimplemented — —
390h
391h IOCAP — — IOCAP5 IOCAP4 IOCAP3 IOCAP2 IOCAP1 IOCAP0 --00 0000 --00 0000
392h IOCAN — — IOCAN5 IOCAN4 IOCAN3 IOCAN2 IOCAN1 IOCAN0 --00 0000 --00 0000
393h IOCAF — — IOCAF5 IOCAF4 IOCAF3 IOCAF2 IOCAF1 IOCAF0 --00 0000 --00 0000
394h
to — Unimplemented — —
39Fh
Bank 8
40Ch
to — Unimplemented — —
41Fh
Bank 9
48Ch
to — Unimplemented — —
497h
498h NCO1ACCL NCO1ACC<7:0> 0000 0000 0000 0000
499h NCO1ACCH NCO1ACC<15:8> 0000 0000 0000 0000
49Ah NCO1ACCU NCO1ACC<19:16> 0000 0000 0000 0000
49Bh NCO1INCL NCO1INC<7:0> 0000 0001 0000 0001
49Ch NCO1INCH NCO1INC<15:8> 0000 0000 0000 0000
49Dh — Unimplemented — —
49Eh NCO1CON N1EN N1OE N1OUT N1POL — — — N1PFM 0000 ---0 0000 ---0
49Fh NCO1CLK N1PWS<2:0> — — — N1CKS<1:0> 0000 --00 0000 --00
Legend: x = unknown, u = unchanged, q = value depends on condition, - = unimplemented, r = reserved. Shaded locations are unimplemented, read as ‘0’.
Note 1: PIC16F1503 only.
2: Unimplemented, read as ‘1’.
Banks 14-29
x0Ch/ — Unimplemented — —
x8Ch
—
x1Fh/
x9Fh
Bank 30
F0Ch
to — Unimplemented — —
F0Eh
F0Fh CLCDATA — — — — — — MLC2OUT MLC1OUT ---- --00 ---- --00
F10h CLC1CON LC1EN LC1OE LC1OUT LC1INTP LC1INTN LC1MODE<2:0> 0000 0000 0000 0000
F11h CLC1POL LC1POL — — — LC1G4POL LC1G3POL LC1G2POL LC1G1POL 0--- xxxx 0--- uuuu
F12h CLC1SEL0 — LC1D2S<2:0> — LC1D1S<2:0> -xxx -xxx -uuu -uuu
F13h CLC1SEL1 — LC1D4S<2:0> — LC1D3S<2:0> -xxx -xxx -uuu -uuu
F14h CLC1GLS0 LC1G1D4T LC1G1D4N LC1G1D3T LC1G1D3N LC1G1D2T LC1G1D2N LC1G1D1T LC1G1D1N xxxx xxxx uuuu uuuu
F15h CLC1GLS1 LC1G2D4T LC1G2D4N LC1G2D3T LC1G2D3N LC1G2D2T LC1G2D2N LC1G2D1T LC1G2D1N xxxx xxxx uuuu uuuu
F16h CLC1GLS2 LC1G3D4T LC1G3D4N LC1G3D3T LC1G3D3N LC1G3D2T LC1G3D2N LC1G3D1T LC1G3D1N xxxx xxxx uuuu uuuu
F17h CLC1GLS3 LC1G4D4T LC1G4D4N LC1G4D3T LC1G4D3N LC1G4D2T LC1G4D2N LC1G4D1T LC1G4D1N xxxx xxxx uuuu uuuu
F18h CLC2CON LC2EN LC2OE LC2OUT LC2INTP LC2INTN LC2MODE<2:0> 0000 0000 0000 0000
F19h CLC2POL LC2POL — — — LC2G4POL LC2G3POL LC2G2POL LC2G1POL 0--- xxxx 0--- uuuu
F1Ah CLC2SEL0 — LC2D2S<2:0> — LC2D1S<2:0> -xxx -xxx -uuu -uuu
F1Bh CLC2SEL1 — LC2D4S<2:0> — LC2D3S<2:0> -xxx -xxx -uuu -uuu
F1Ch CLC2GLS0 LC2G1D4T LC2G1D4N LC2G1D3T LC2G1D3N LC2G1D2T LC2G1D2N LC2G1D1T LC2G1D1N xxxx xxxx uuuu uuuu
F1Dh CLC2GLS1 LC2G2D4T LC2G2D4N LC2G2D3T LC2G2D3N LC2G2D2T LC2G2D2N LC2G2D1T LC2G2D1N xxxx xxxx uuuu uuuu
F1Eh CLC2GLS2 LC2G3D4T LC2G3D4N LC2G3D3T LC2G3D3N LC2G3D2T LC2G3D2N LC2G3D1T LC2G3D1N xxxx xxxx uuuu uuuu
F1Fh CLC2GLS3 LC2G4D4T LC2G4D4N LC2G4D3T LC2G4D3N LC2G4D2T LC2G4D2N LC2G4D1T LC2G4D1N xxxx xxxx uuuu uuuu
F20h
to — Unimplemented — —
F6Fh
Legend: x = unknown, u = unchanged, q = value depends on condition, - = unimplemented, r = reserved. Shaded locations are unimplemented, read as ‘0’.
Note 1: PIC16F1503 only.
2: Unimplemented, read as ‘1’.
Rev. 10-000043A
7/30/2013
Rev. 10-000043B
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-000043D
7/30/2013
Rev. 10-000044A
7/30/2013
0x0000 0x0000
Traditional
Data Memory
0x0FFF 0x0FFF
0x1000
Reserved
0x1FFF
0x2000
Linear
Data Memory
0x29AF
0x29B0
Reserved
0x7FFF
FSR
0x8000 0x0000
Address
Range
Program
Flash Memory
0xFFFF 0x7FFF
Note: Not all memory regions are completely implemented. Consult device memory tables for memory limits.
Rev. 10-000056A
7/31/2013
From Opcode
4 BSR 0 6 0 7 FSRxH 0 7 FSRxL 0
0 0 0 0
0x7F
Bank 0 Bank 1 Bank 2 Bank 31
7 FSRnH 0 7 FSRnL 0
7 FSRnH 0 7 FSRnL 0 1
0 0 1
Location Select
Location Select 0x8000
0x2000 0x0000
0x020
Bank 0
0x06F
0x0A0
Bank 1
Program
0x0EF
Flash
0x120 Memory
Bank 2 (low 8 bits)
0x16F
0xF20
Bank 30 0x7FFF
0xF6F 0xFFFF
0x29AF
Legend:
R = Readable bit P = Programmable bit U = Unimplemented bit, read as ‘1’
‘0’ = Bit is cleared ‘1’ = Bit is set -n = Value when blank or after Bulk Erase
Note 1: Enabling Brown-out Reset does not automatically enable Power-up Timer.
2: Once enabled, code-protect can only be disabled by bulk erasing the device.
Legend:
R = Readable bit P = Programmable bit U = Unimplemented bit, read as ‘1’
‘0’ = Bit is cleared ‘1’ = Bit is set -n = Value when blank or after Bulk Erase
Note 1: The LVP bit cannot be programmed to ‘0’ when Programming mode is entered via LVP.
2: See VBOR parameter for specific trip point voltages.
4.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 10.4 “User ID, Device ID and Configuration
Word Access” for more information on accessing these
memory locations. For more information on checksum
calculation, see the “PIC12(L)F1501/PIC16(L)F150X
Memory Programming Specification” (DS41573).
R R R R R R R R
DEV<2:0> REV<4:0>
bit 7 bit 0
Legend:
R = Readable bit
‘1’ = Bit is set ‘0’ = Bit is cleared
Rev. 10-000030C
7/30/2013
Sleep
(2)
EC
CLKIN FOSC(1)
IRCF<3:0>
HFINTOSC
16 MHz 4
Start-up 8 MHz
Control Logic 4 MHz Clock
2 MHz Control
16 MHz 1 MHz
Prescaler
Oscillator (1)
HFINTOSC *500 kHz 3 2
Fast Start-up *250 kHz FOSC<2:0> SCS<1:0>
Oscillator *125 kHz
62.5 kHz
*31.25 kHz
*31 kHz
LFINTOSC
31 kHz LFINTOSC(1)
to WDT, PWRT, and
Oscillator other Peripherals
FRC
600 kHz FRC(1) to ADC and
Oscillator other Peripherals
5.2.1.1 EC Mode
The External Clock (EC) mode allows an externally
generated logic level signal to be the system clock
source. When operating in this mode, an external clock
source is connected to the OSC1 input.
OSC2/CLKOUT is available for general purpose I/O or
CLKOUT. Figure 5-2 shows the pin connections for EC
mode.
EC mode has three power modes to select from through
the FOSC bits in the Configuration Words:
• ECH – High power, 4-20 MHz
• ECM – Medium power, 0.5-4 MHz
• ECL – Low power, 0-0.5 MHz
LFINTOSC
bits IRCF<3:0> of the OSCCON register (Register 5-1)
FOSC
TMR0
TMR1
TMR2
FRC
HFINTOSC
Oscillator Delay(1) 2-cycle Sync Running
LFINTOSC
System Clock
HFINTOSC
2-cycle Sync Running
LFINTOSC
System Clock
LFINTOSC HFINTOSC
LFINTOSC turns off unless WDT is enabled(2)
LFINTOSC
Oscillator Delay(1) 2-cycle Sync Running
HFINTOSC
IRCF <3:0> =0 0
System Clock
Note 1: See Table 5-2, “Oscillator Switching Delays” for more information.
2: LFINTOSC will continue to run if a peripheral has selected it as the clock source. See
Section 5.2.2.4 “Peripheral Clock Sources”.
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 = Conditional
Stack Underflow
Stack Overlfow
MCLRE
VPP/MCLR
Sleep
WDT
Time-out Device
Reset
Power-on
Reset
VDD
BOR
Active(1)
Brown-out R
Power-up
Reset
Timer
LFINTOSC
LPBOR PWRTE
Reset
6.2.1 BOR IS ALWAYS ON BOR protection is not active during Sleep. The device
wake-up will be delayed until the BOR is ready.
When the BOREN bits of Configuration Words are pro-
grammed to ‘11’, the BOR is always on. The device
6.2.3 BOR CONTROLLED BY SOFTWARE
start-up will be delayed until the BOR is ready and VDD
is higher than the BOR threshold. When the BOREN bits of Configuration Words are
programmed to ‘01’, the BOR is controlled by the
BOR protection is active during Sleep. The BOR does
SBOREN bit of the BORCON register. The device
not delay wake-up from Sleep.
start-up is not delayed by the BOR ready condition or
the VDD level.
6.2.2 BOR IS OFF IN SLEEP
BOR protection begins as soon as the BOR circuit is
When the BOREN bits of Configuration Words are pro-
ready. The status of the BOR circuit is reflected in the
grammed to ‘10’, the BOR is on, except in Sleep. The
BORRDY bit of the BORCON register.
device start-up will be delayed until the BOR is ready
and VDD is higher than the BOR threshold. BOR protection is unchanged by Sleep.
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
Rev. 10-000032B
7/30/2013
VDD
Internal POR
TPWRT
Power-up Timer
MCLR
Internal RESET
Int. Oscillator
FOSC
Begin Execution
code execution (1) code execution (1)
Internal Oscillator, PWRTEN = 0 Internal Oscillator, PWRTEN = 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.
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
TMR0IF Wake-up
TMR0IE (If in Sleep mode)
INTF
Peripheral Interrupts INTE
(TMR1IF) PIR1<0>
IOCIF
(TMR1IE) PIE1<0> Interrupt
IOCIE to CPU
PEIE
PIRn<7>
GIE
PIEn<7>
Fosc
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 Q1 Q2 Q3 Q4
Interrupt Sampled
during Q1
Interrupt
GIE
Interrupt
GIE
Interrupt
GIE
Interrupt
GIE
Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4
FOSC
CLKOUT
(3)
INT pin
(1)
(1)
INTF (4) 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
Note 1: Interrupt flag bits are set when an interrupt condition occurs, regardless of the state of its corresponding
enable bit or the Global Interrupt Enable bit, GIE of the INTCON register. User software should ensure the
appropriate interrupt flag bits are clear prior to enabling an interrupt.
2: Bit PEIE of the INTCON register must be set to enable any peripheral interrupt.
3: The IOCIF Flag bit is read-only and cleared when all the interrupt-on-change flags in the IOCxF registers
have been cleared by software.
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
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)
Low-Power Sleep mode allows the user to optimize the • Brown-out Reset (BOR)
operating current in Sleep. Low-Power Sleep mode can • Watchdog Timer (WDT)
be selected by setting the VREGPM bit of the • External interrupt pin/Interrupt-on-change pins
VREGCON register, putting the LDO and reference • Timer1 (with external clock source)
circuitry in a low-power state whenever the device is in
Sleep. The Complementary Waveform Generator (CWG), the
Numerically Controlled Oscillator (NCO) and the Con-
8.2.1 SLEEP CURRENT VS. WAKE-UP figurable Logic Cell (CLC) modules can utilize the
TIME HFINTOSC oscillator as either a clock source or as an
input source. Under certain conditions, when the
In the Default Operating mode, the LDO and reference HFINTOSC is selected for use with the CWG, NCO or
circuitry remain in the normal configuration while in CLC modules, the HFINTOSC will remain active
Sleep. The device is able to exit Sleep mode quickly during Sleep. This will have a direct effect on the
since all circuits remain active. In Low-Power Sleep Sleep mode current.
mode, when waking up from Sleep, an extra delay time
is required for these circuits to return to the normal con- Please refer to sections Section 23.5 “Operation
figuration and stabilize. During Sleep”, 24.7 “Operation In Sleep” and 25.10
“Operation During Sleep” for more information.
The Low-Power Sleep mode is beneficial for applica-
tions that stay in Sleep mode for long periods of time.
The Normal mode is beneficial for applications that Note: The PIC16LF1503 does not have a con-
need to wake from Sleep quickly and frequently. figurable Low-Power Sleep mode.
PIC16LF1503 is an unregulated device
and is always in the lowest power state
when in Sleep, with no wake-up time pen-
alty. This device has a lower maximum
VDD and I/O voltage than the
PIC16F1503. See Section
28.0 “Electrical Specifications” for
more information.
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
WDTE<1:0> = 01
SWDTEN
WDTE<1:0> = 10
Sleep WDTPS<4:0>
11 X X Active
Awake Active
10 X
Sleep Disabled
1 X Active
01
0 X Disabled
00 X X Disabled
TABLE 9-2: WDT CLEARING CONDITIONS
Conditions WDT
WDTE<1:0> = 00
WDTE<1:0> = 01 and SWDTEN = 0
WDTE<1:0> = 10 and enter Sleep
Cleared
CLRWDT Command
Oscillator Fail Detected
Exit Sleep + System Clock = INTOSC, EXTCLK
Change INTOSC divider (IRCF bits) Unaffected
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
End
Read Operation
Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4
Flash Data INSTR (PC) INSTR (PC + 1) PMDATH,PMDATL INSTR (PC + 3) INSTR (PC + 4)
INSTR(PC + 1) INSTR(PC + 2)
INSTR(PC - 1) BSF PMCON1,RD instruction ignored instruction ignored INSTR(PC + 3) INSTR(PC + 4)
executed here executed here Forced NOP Forced NOP executed here executed here
executed here executed here
RD bit
PMDATH
PMDATL
Register
Unlock Sequence
(See Note 1)
Re-enable Interrupts
(GIE = 1)
End
Erase Operation
MOVLW 0AAh ;
MOVWF PMCON2 ; Write AAh
BSF PMCON1,WR ; Set WR bit to begin erase
NOP ; NOP instructions are forced as processor starts
NOP ; row erase of program memory.
;
; The processor stalls until the erase process is complete
; after erase processor continues with 3rd instruction
Rev. 10-000004B
7 6 0 7 4 3 0 7 5 0 7 0 7/25/2013
14
Write Latch #0 Write Latch #1 Write Latch #14 Write Latch #15
00h 01h 0Eh 0Fh
PMADRL<3:0>
14 14 14 14
Status
PIC16(L)F1503
7FEh 7FE0h 7FE1h 7FEEh 7FEFh
Row 7FFh 7FF0h 7FF1h 7FFEh 7FFFh
Address
PMADRH<6:0>: Decode Flash Program Memory
PMADRL<7:4>
DS40001607D-page 86
800h 8000h - 8003h 8004h – 8005h 8006h 8007h – 8008h 8009h - 801Fh
DEVICE ID Configuration
USER ID 0 - 3 reserved reserved
CFGS = 1 Dev / Rev Words
Configuration Memory
PIC16(L)F1503
FIGURE 10-6: FLASH MEMORY WRITE FLOWCHART
Rev. 10-000049A
7/30/2013
Start
Write Operation
Determine number of
words to be written into Enable Write/Erase
Program or Configuration Operation (WREN = 1)
Memory. The number of
words cannot exceed the
number of words per row
(word_cnt)
Load the value to write
(PMDATH:PMDATL)
Disable Interrupts
(GIE = 0)
Update the word counter Write Latches to Flash
(word_cnt--) (LWLO = 0)
Select
Program or Config.
Memory (CFGS)
Unlock Sequence
Last word to Yes (See Note 1)
write ?
Select Row Address
(PMADRH:PMADRL)
No
CPU stalls while Write
operation completes
Unlock Sequence (2 ms typical)
Select Write Operation (See Note 1)
(FREE = 0)
Re-enable Interrupts
(GIE = 1)
Increment Address
(PMADRH:PMADRL++)
End
Write Operation
START_WRITE
BCF PMCON1,LWLO ; No more loading latches - Actually start Flash program
; memory write
MOVLW 0AAh ;
Required
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
TABLE 10-2: USER ID, DEVICE ID AND CONFIGURATION WORD ACCESS (CFGS = 1)
Address Function Read Access Write Access
8000h-8003h User IDs Yes Yes
8006h Device ID/Revision ID Yes No
8007h-8008h Configuration Words 1 and 2 Yes No
Start
Verify Operation
Read Operation
(See Note 1)
PMDAT = 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 PMDAT<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 PMADR<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
To digital peripherals
TABLE 11-1: PORT AVAILABILITY PER ANSELx
DEVICE
To analog peripherals
PORTB
PORTA
PORTC
VSS
Device
PIC16(L)F1503 ● ●
The Data Latch (LATx registers) is useful for
read-modify-write operations on the value that the I/O
pins are driving.
A write operation to the LATx register has the same
effect as a write to the corresponding PORTx register.
A read of the LATx register reads of the values held in
the I/O PORT latches, while a read of the PORTx
register reads the actual I/O pin value.
Ports that support analog inputs have an associated
ANSELx register. When an ANSEL bit is set, the digital
input buffer associated with that bit is disabled.
Disabling the input buffer prevents analog signal levels
on the pin between a logic high and low from causing
excessive current in the logic input circuitry. A
simplified model of a generic I/O port, without the
interfaces to other peripherals, is shown in Figure 11-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
Note 1: Writes to PORTA are actually written to corresponding LATA register. Reads from PORTA 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 PORTA are actually written to corresponding LATA register. Reads from PORTA 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
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: Global WPUEN bit of the OPTION_REG register must be cleared for individual pull-ups to be enabled.
2: The weak pull-up device is automatically disabled if the pin is configured as an output.
3: For the WPUA3 bit, when MCLRE = 1, weak pull-up is internally enabled, but not reported here.
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. Reads from PORTC 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
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.
IOCANx D Q
R Q4Q1
edge
detect
RAx
to data bus
data bus = S
IOCAFx
IOCAPx D Q
0 or 1
D Q
R
write IOCAFx
IOCIE
Q2
IOC interrupt
to CPU core
from all other
IOCnFx individual
pin detectors
FOSC
Q1 Q1 Q1
Q2 Q2 Q2
Q3 Q3 Q3
Q4 Q4 Q4
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
Rev. 10-000053A
8/6/2013
2
ADFVR<1:0>
1x
FVR_buffer1
2x
4x (To ADC Module)
2
CDAFVR<1:0>
1x
FVR_buffer2
2x
4x (To Comparators)
FVREN
+_ FVRRDY
Note 1
Note 1: Any peripheral requiring the Fixed Reference (see Table 13-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
Note 1: To minimize current consumption when the FVR is disabled, the FVR buffers should be turned off by clear-
ing the Buffer Gain Selection bits.
2: FVRRDY is always ‘1’ for the PIC16F1503 devices.
3: See Section 14.0 “Temperature Indicator Module” for additional information.
4: Fixed Voltage Reference output cannot exceed VDD.
TABLE 13-2: SUMMARY OF REGISTERS ASSOCIATED WITH THE FIXED VOLTAGE REFERENCE
Register
Name Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
on page
FVRCON FVREN FVRRDY TSEN TSRNG CDAFVR>1:0> ADFVR<1:0> 110
Legend: Shaded cells are unused by the Fixed Voltage Reference module.
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
ADC
ADCS<2:0
Clock 20 MHz 16 MHz 8 MHz 4 MHz 1 MHz
>
Source
Fosc/2 000 100 ns 125 ns 250 ns 500 ns 2.0 s
Fosc/4 100 200 ns 250 ns 500 ns 1.0 s 4.0 s
Fosc/8 001 400 ns 500 ns 1.0 s 2.0 s 8.0 s
Fosc/16 101 800 ns 1.0 s 2.0 s 4.0 s 16.0 s
Fosc/32 010 1.6 s 2.0 s 4.0 s 8.0 s 32.0 s
Fosc/64 110 3.2 s 4.0 s 8.0 s 16.0 s 64.0 s
FRC 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
Legend: Shaded cells are outside of recommended range.
Note: The TAD period when using the FRC clock source can fall within a specified range, (see TAD parameter).
The TAD period when using the FOSC-based clock source can be configured for a more precise TAD period.
However, the FRC clock source must be used when conversions are to be performed with the device in
Sleep mode.
Rev. 10-000035A
7/30/2013
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)
Rev. 10-000054A
7/30/2013
ADRESH ADRESL
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: When selecting the VREF+ pin as the source of the positive reference, be aware that a minimum voltage
specification exists. See Section 28.0 “Electrical Specifications” 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
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
V AP P LI ED 1 – -------------------------- = V CHOLD
1
;[1] VCHOLD charged to within 1/2 lsb
n+1
2 –1
–TC
----------
RC
V AP P LI ED 1 – e = V CHOLD ;[2] VCHOLD charge response to VAPPLIED
– Tc
---------
V AP P LI ED 1 – e = V A PP LIE D 1 – -------------------------- ;combining [1] and [2]
RC 1
n+1
2 –1
T C = – C HOLD R IC + R SS + R S ln(1/2047)
= – 12.5pF 1k + 7k + 10k ln(0.0004885)
= 1.72 µs
Therefore:
T A CQ = 2µs + 1.72 µs + 50°C- 25°C 0.05 µs/°C
= 4.97µs
Note 1: The reference voltage (VRPOS) has no effect on the equation, since it cancels itself out.
2: The charge holding capacitor (CHOLD) is not discharged after each conversion.
3: The maximum recommended impedance for analog sources is 10 k. This is required to meet the pin
leakage specification.
VDD
Sampling
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
(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+
VDD 0 VSOURCE+
VREF+ 1 DACR<4:0>
5
R
DACPSS R
DACEN R
R
32-to-1 MUX
32 DACx_output
To Peripherals
Steps
R DACxOUT1 (1)
DACOE1
R
DACxOUT2 (1)
VSOURCE- DACOE2
VSS
DACR 4:0
DACx_output = VSOURCE+ – VSOURCE- ----------------------------- + VSOURCE-
5
2
Note: See the DACxCON0 register for the available VSOURCE+ and VSOURCE- selections.
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-000027A
8/5/2013
CxINTP
CxNCH<2:0> 3 CxON(1) Interrupt
Rising
CxIN0- 000 Edge set bit
CxIF
CxIN1- 001 Interrupt CxINTN
VDD
Analog
VT § 0.6V
RS < 10K Input pin RIC
To Comparator
ILEAKAGE(1)
VA CPIN VT § 0.6V
5pF
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
• 8-bit timer/counter register (TMR0) 8-Bit Counter mode using the T0CKI pin is selected by
setting the TMR0CS bit in the OPTION_REG register to
• 3-bit prescaler (independent of Watchdog Timer)
‘1’.
• Programmable internal or external clock source
The rising or falling transition of the incrementing edge
• Programmable external clock edge selection
for either input source is determined by the TMR0SE bit
• Interrupt on overflow in the OPTION_REG register.
• TMR0 can be used to gate Timer1
Figure 18-1 is a block diagram of the Timer0 module.
TMR0CS 8/5/2013
Fosc/4 PSA
T0CKI(1) 0 T0_overflow
1 T0CKI
TMR0
1 Prescaler 0 FOSC/2 Sync Circuit Q1
write R
to
TMR0
TMR0SE set bit
PS<2:0>
TMR0IF
Note 1: The T0CKI prescale output frequency should not exceed FOSC/8.
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
000 1:2
001 1:4
010 1:8
011 1 : 16
100 1 : 32
101 1 : 64
110 1 : 128
111 1 : 256
T1GSPM
T1G 00
T0_overflow 01
1
C1OUT_sync 10 0 Single Pulse D Q T1GVAL
0
C2OUT_sync 11 1 Acq. Control
Q1
D Q
T1GPOL T1GGO/DONE
CK Q
TMR1ON Interrupt
set bit
R
T1GTM det TMR1GIF
TMR1GE
set flag bit
TMR1IF
TMR1ON
EN
(2)
TMR1
T1_overflow Synchronized Clock Input
TMR1H TMR1L Q D 0
1
T1CLK
T1SYNC
TMR1CS<1:0>
LFINTOSC 11
(1)
T1CKI 10 Prescaler
Fosc Synchronize(3)
01 1,2,4,8
Internal Clock det
00
2
Fosc/4 Fosc/2
Internal Clock T1CKPS<1:0> Internal Sleep
Clock Input
T1CKI = 1
when TMR1
Enabled
T1CKI = 0
when TMR1
Enabled
TMR1GE
T1GPOL
t1g_in
T1CKI
T1GVAL
TMR1GE
T1GPOL
T1GTM
t1g_in
T1CKI
T1GVAL
TMR1GE
T1GPOL
T1GSPM
Cleared by hardware on
T1GGO/ Set by software falling edge of T1GVAL
DONE
Counting enabled on
rising edge of T1G
t1g_in
T1CKI
T1GVAL
Cleared by
TMR1GIF Cleared by software Set by hardware on software
falling edge of T1GVAL
TMR1GE
T1GPOL
T1GSPM
T1GTM
Cleared by hardware on
T1GGO/ Set by software falling edge of T1GVAL
DONE Counting enabled on
rising edge of T1G
t1g_in
T1CKI
T1GVAL
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
T2_match
Prescaler To Peripherals
TMR2 R
Fosc/4 1:1, 1:4, 1:16, 1:64
2
Postscaler set bit
T2CKPS<1:0> Comparator
1:1 to 1:16 TMR2IF
PR2 T2OUTPS<3:0>
FOSC/4
1:4
Prescale
0x03
PR2
Note 1: The Pulse Width of T2_match is equal to the scaled input of TMR2.
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-000076A
12/16/2013
Data bus
Read Write
8 8
SSPxBUF
2 (CKP, CKE)
clock select
SSx
SSPM<3:0>
Control 4
Enable Edge
enable
(T2_match)
2
SCK_out
Edge Prescaler
SCK
enable
TOSC
4, 16, 64
Baud Rate
TRIS bit Generator
(SSPxADD)
Rev. 10-000077A
7/30/2013
Internal data
bus
[SSPM <3:0>]
Read Write
8 8 4
Baud Rate
SSPxBUF Generator
(SSPxADD)
SDAx 8
SDAx in Shift clock
SSPxSR
Clock arbitrate/BCOL detect
MSb LSb
Clock Cntl
Receive Enable (RCEN)
Read Write
8 8
SSPxBUF
8
8
SCLx
Shift clock
SDAx SSPxSR
MSb LSb
8
SSPxMSK
8
SSPxADD
Rev. 10-000079A
8/1/2013
SCKx SCKx
SPI Master SDOx SDIx SPI Slave
SDIx SDOx #1
General I/O SSx
General I/O
General I/O SCKx
SDIx SPI Slave
SDOx #2
SSx
SCKx
SDIx SPI Slave
SDOx #3
SSx
21.2.1 SPI MODE REGISTERS During transmission, the SSPxBUF is not buffered. A
write to SSPxBUF will write to both SSPxBUF and
The MSSP module has five registers for SPI mode SSPxSR.
operation. These are:
• MSSP STATUS register (SSPxSTAT)
• MSSP Control Register 1 (SSPxCON1)
• MSSP Control Register 3 (SSPxCON3)
• MSSP Data Buffer register (SSPxBUF)
• MSSP Address register (SSPxADD)
• MSSP Shift register (SSPxSR)
(Not directly accessible)
SSPxCON1 and SSPxSTAT are the control and
STATUS registers in SPI mode operation. The
SSPxCON1 register is readable and writable. The
lower six bits of the SSPxSTAT are read-only. The
upper two bits of the SSPxSTAT are read/write.
In SPI master mode, SSPxADD can be loaded with a
value used in the Baud Rate Generator. More informa-
tion on the Baud Rate Generator is available in
Section21.7 “Baud Rate Generator”.
SSPxSR is the shift register used for shifting data in
and out. SSPxBUF provides indirect access to the
SSPxSR register. SSPxBUF is the buffer register to
which data bytes are written, and from which data
bytes are read.
In receive operations, SSPxSR and SSPxBUF
together create a buffered receiver. When SSPxSR
receives a complete byte, it is transferred to SSPxBUF
and the SSPxIF interrupt is set.
Rev. 10-000080A
7/30/2013
Slave Select
General I/O SSx
Processor 1 (optional) Processor 2
Write to
SSPxBUF
SCKx
(CKP = 0
CKE = 0)
SCKx
(CKP = 1
CKE = 0)
4 Clock
SCKx Modes
(CKP = 0
CKE = 1)
SCKx
(CKP = 1
CKE = 1)
Input
Sample
(SMP = 1)
SSPxIF
SSPxSR to
SSPxBUF
Rev. 10-000082A
7/30/2013
SCK SCK
SPI Master SDOx SDIx SPI Slave
SDIx SDOx #1
SCK
SDIx SPI Slave
SDOx #2
SSx
SCK
SDIx SPI Slave
SDOx #3
SSx
SSx
SCKx
(CKP = 0
CKE = 0)
SCKx
(CKP = 1
CKE = 0)
Write to
SSPxBUF
Shift register SSPxSR
and bit count are reset
SSPxBUF to
SSPxSR
SDIx bit 0
bit 7 bit 7
Input
Sample
SSPxIF
Interrupt
Flag
SSPxSR to
SSPxBUF
SSx
Optional
SCKx
(CKP = 0
CKE = 0)
SCKx
(CKP = 1
CKE = 0)
Write to
SSPxBUF
Valid
SDOx bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0
SDIx
bit 7 bit 0
Input
Sample
SSPxIF
Interrupt
Flag
SSPxSR to
SSPxBUF
Write Collision
detection active
SSx
Not Optional
SCKx
(CKP = 0
CKE = 1)
SCKx
(CKP = 1
CKE = 1)
Write to
SSPxBUF
Valid
SDOx bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0
SDIx
bit 7 bit 0
Input
Sample
SSPxIF
Interrupt
Flag
SSPxSR to
SSPxBUF
Write Collision
detection active
The I2C bus can operate with one or more master The transition of a data bit is always performed while
devices and one or more slave devices. the SCLx line is held low. Transitions that occur while
the SCLx line is held high are used to indicate Start and
There are four potential modes of operation for a given Stop bits.
device:
If the master intends to write to the slave, then it repeat-
• Master Transmit mode edly sends out a byte of data, with the slave responding
(master is transmitting data to a slave) after each byte with an ACK bit. In this example, the
• Master Receive mode master device is in Master Transmit mode and the
(master is receiving data from a slave) slave is in Slave Receive mode.
• Slave Transmit mode If the master intends to read from the slave, then it
(slave is transmitting data to a master) repeatedly receives a byte of data from the slave, and
• Slave Receive mode responds after each byte with an ACK bit. In this exam-
(slave is receiving data from the master) ple, the master device is in Master Receive mode and
To begin communication, a master device starts out in the slave is Slave Transmit mode.
Master Transmit mode. The master device sends out a On the last byte of data communicated, the master
Start bit followed by the address byte of the slave it device may end the transmission by sending a Stop bit.
intends to communicate with. This is followed by a sin- If the master device is in Receive mode, it sends the
gle Read/Write bit, which determines whether the mas- Stop bit in place of the last ACK bit. A Stop bit is indi-
ter intends to transmit to or receive data from the slave cated by a low-to-high transition of the SDAx line while
device. the SCLx line is held high.
If the requested slave exists on the bus, it will respond In some cases, the master may want to maintain con-
with an Acknowledge bit, otherwise known as an ACK. trol of the bus and re-initiate another transmission. If
The master then continues in either Transmit mode or so, the master device may send another Start bit in
Receive mode and the slave continues in the comple- place of the Stop bit or last ACK bit when it is in receive
ment, either in Receive mode or Transmit mode, mode.
respectively.
The I2C bus specifies three message protocols;
A Start bit is indicated by a high-to-low transition of the
• Single message where a master writes data to a
SDAx line while the SCLx line is held high. Address and
slave.
data bytes are sent out, Most Significant bit (MSb) first.
The Read/Write bit is sent out as a logical one when the • Single message where a master reads data from
master intends to read data from the slave, and is sent a slave.
out as a logical zero when it intends to write data to the • Combined message where a master initiates a
slave. minimum of two writes, or two reads, or a
combination of writes and reads, to one or more
slaves.
The I2C specification defines a Start condition as a A Restart is valid any time that a Stop would be valid.
transition of SDAx from a high to a low state while A master can issue a Restart if it wishes to hold the
SCLx line is high. A Start condition is always gener- bus after terminating the current transfer. A Restart
ated by the master and signifies the transition of the has the same effect on the slave that a Start would,
bus from an Idle to an Active state. Figure 21-12 resetting all slave logic and preparing it to clock in an
shows wave forms for Start and Stop conditions. address. The master may want to address the same or
A bus collision can occur on a Start condition if the another slave. Figure 21-13 shows the wave form for a
module samples the SDAx line low before asserting it Restart condition.
low. This does not conform to the I2C Specification that In 10-bit Addressing Slave mode a Restart is required
states no bus collision can occur on a Start. for the master to clock data out of the addressed
slave. Once a slave has been fully addressed, match-
21.4.6 STOP CONDITION ing both high and low address bytes, the master can
A Stop condition is a transition of the SDAx line from issue a Restart and the high address byte with the
low-to-high state while the SCLx line is high. R/W bit set. The slave logic will then hold the clock
and prepare to clock out data.
Note: At least one SCLx low time must appear
After a full match with R/W clear in 10-bit mode, a prior
before a Stop is valid, therefore, if the SDAx
match flag is set and maintained. Until a Stop condi-
line goes low then high again while the SCLx
tion, a high address with R/W clear, or high address
line stays high, only the Start condition is
match fails.
detected.
21.4.8 START/STOP CONDITION INTERRUPT
MASKING
SDAx
SCLx
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
DS40001607D-page 172
Bus Master sends
Stop condition
From Slave to Master
PIC16(L)F1503
SCLx
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
SCLx
BF
First byte
SSPxBUF is read of data is
available
in SSPxBUF
SSPOV
SSPxIF
BF
First byte
of data is
SSPxBUF is read available
in SSPxBUF
SSPOV
DS40001607D-page 173
PIC16(L)F1503
Master Releases SDAx Master sends
to slave for ACK sequence Stop condition
FIGURE 21-16:
DS40001607D-page 174
SCLx
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
PIC16(L)F1503
SSPxIF
If AHEN = 1: SSPxIF is set on
SSPxIF is set 9th falling edge of Cleared by software No interrupt
SCLx, after ACK after not ACK
BF from Slave
Address is
read from Data is read from SSPxBUF
ACKDT SSBUF
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 SCLx is released
and SCLx is stretched hardware on 8th falling
edge of SCLx
ACKTIM
P
I2C SLAVE, 7-BIT ADDRESS, RECEPTION (SEN = 0, AHEN = 1, DHEN = 1)
Stop condition
Master releases
R/W = 0 SDAx to slave for ACK sequence
Receiving Address Receive Data Receive Data ACK
SDAx 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
SCLx
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 No interrupt after
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
I2C SLAVE, 7-BIT ADDRESS, RECEPTION (SEN = 1, AHEN = 1, DHEN = 1)
DS40001607D-page 175
PIC16(L)F1503
PIC16(L)F1503
21.5.3 SLAVE TRANSMISSION 21.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.
sent by the slave on the ninth bit. Figure 21-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 SDAx and
and the SCLx pin is held low (see SCLx.
Section21.5.6 “Clock Stretching” for more detail). By 2. S bit of SSPxSTAT is set; SSPxIF is set if inter-
stretching the clock, the master will be unable to assert rupt on Start detect is enabled.
another clock pulse until the slave is done preparing 3. Matching address with R/W bit set is received by
the transmit 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 SCLx pin should be released by setting the CKP bit 5. SSPxIF bit is cleared by user.
of the SSPxCON1 register. The eight data bits are
6. Software reads the received address from
shifted out on the falling edge of the SCLx input. This
SSPxBUF, clearing BF.
ensures that the SDAx signal is valid during the SCLx
high time. 7. R/W is set so CKP was automatically cleared
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 SCLx 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 releasing SCLx, allowing the mas-
transfer is complete. In this case, when the not ACK is ter 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 SDAx line was master is loaded into the ACKSTAT register.
low (ACK), the next transmit data must be loaded into 11. SSPxIF bit is cleared.
the SSPxBUF register. Again, the SCLx 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 SCLx (ninth) rather than the
falling.
21.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 SDAx 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 BCLxIF bit of the PIRx 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 BCLxIF bit
to handle a slave bus collision.
SCLx
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
BF
BF is automatically
Received address Data to transmit is cleared after 8th falling
is read from SSPxBUF loaded into SSPxBUF edge of SCLx
CKP
When R/W is set CKP is not
SCLx is always held for not
held low after 9th SCLx Set by software ACK
falling edge
ACKSTAT
Indicates an address
has been received
DS40001607D-page 177
PIC16(L)F1503
PIC16(L)F1503
21.5.3.3 7-bit Transmission with Address
Hold Enabled
Setting the AHEN bit of the SSPxCON3 register
enables additional clock stretching and interrupt gen-
eration after the eighth falling edge of a received
matching address. Once a matching address has
been clocked in, CKP is cleared and the SSPxIF inter-
rupt is set.
Figure 21-19 displays a standard waveform of a 7-bit
Address Slave Transmission with AHEN enabled.
1. Bus starts idle.
2. Master sends Start condition; the S bit of
SSPxSTAT is set; SSPxIF is set if interrupt on
Start detect is enabled.
3. Master sends matching address with R/W bit
set. After the eighth falling edge of the SCLx line
the CKP bit is cleared and SSPxIF interrupt is
generated.
4. Slave software clears SSPxIF.
5. 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.
6. Slave reads the address value from the
SSPxBUF register clearing the BF bit.
7. Slave software decides from this information if it
wishes to ACK or not ACK and sets the ACKDT
bit of the SSPxCON2 register accordingly.
8. Slave sets the CKP bit releasing SCLx.
9. Master clocks in the ACK value from the slave.
10. Slave hardware automatically clears the CKP bit
and sets SSPxIF after the ACK if the R/W bit is
set.
11. Slave software clears SSPxIF.
12. Slave loads value to transmit to the master into
SSPxBUF setting the BF bit.
Note: SSPxBUF cannot be loaded until after the
ACK.
13. Slave sets the CKP bit, releasing the clock.
14. Master clocks out the data from the slave and
sends an ACK value on the ninth SCLx pulse.
15. Slave hardware copies the ACK value into the
ACKSTAT bit of the SSPxCON2 register.
16. Steps 10-15 are repeated for each byte transmit-
ted to the master from the slave.
17. 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 SCLx
line to receive a Stop.
SCLx
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
BF BF is automatically
Received address Data to transmit is cleared after 8th falling
is read from SSPxBUF loaded into SSPxBUF edge of SCLx
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 SCLx
address. cleared after ACK
ACKTIM
I2C SLAVE, 7-BIT ADDRESS, TRANSMISSION (AHEN = 1)
R/W
D/A
DS40001607D-page 179
PIC16(L)F1503
PIC16(L)F1503
21.5.4 SLAVE MODE 10-BIT ADDRESS 21.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 DHEN set is the same as with 7-bit modes. The only
10-bit Addressing mode. difference is the need to update the SSPxADD register
Figure 21-20 is used as a visual reference for this using the UA bit. All functionality, specifically when the
description. CKP bit is cleared and SCLx line is held low are the
same. Figure 21-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 21-22 shows a standard waveform for a slave
1. Bus starts idle. transmitter in 10-bit Addressing mode.
2. Master sends Start condition; S bit of SSPxSTAT
is set; SSPxIF is set if interrupt on Start detect is
enabled.
3. Master sends matching high address with R/W
bit clear; UA bit of the SSPxSTAT register is set.
4. Slave sends ACK and SSPxIF is set.
5. Software clears the SSPxIF bit.
6. Software reads received address from
SSPxBUF clearing the BF flag.
7. Slave loads low address into SSPxADD,
releasing SCLx.
8. 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
SDAx
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
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
SCLx is held low and releases SCLx
CKP
DS40001607D-page 181
PIC16(L)F1503
Receive First Address Byte R/W = 0 Receive Second Address Byte Receive Data Receive Data
FIGURE 21-21:
DS40001607D-page 182
SCLx 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
PIC16(L)F1503
SSPxIF
Set by hardware Cleared by software Cleared by software
on 9th falling edge
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
SDAx 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
SSPxIF
BF
Indicates an address
has been received
I2C SLAVE, 10-BIT ADDRESS, TRANSMISSION (SEN = 0, AHEN = 0, DHEN = 0)
DS40001607D-page 183
PIC16(L)F1503
PIC16(L)F1503
21.5.6 CLOCK STRETCHING 21.5.6.2 10-bit Addressing Mode
Clock stretching occurs when a device on the bus In 10-bit Addressing mode, when the UA bit is set, the
holds the SCLx line low, effectively pausing communi- clock is always stretched. This is the only time the
cation. The slave may stretch the clock to allow more SCLx is stretched without CKP being cleared. SCLx is
time to handle data or prepare a response for the mas- released immediately after a write to SSPxADD.
ter device. A master device is not concerned with
Note: Previous versions of the module did not
stretching as anytime it is active on the bus and not
stretch the clock if the second address byte
transferring data it is stretching. Any stretching done
did not match.
by a slave is invisible to the master software and han-
dled by the hardware that generates SCLx. 21.5.6.3 Byte NACKing
The CKP bit of the SSPxCON1 register is used to con-
trol stretching in software. Any time the CKP bit is When the AHEN bit of SSPxCON3 is set; CKP is
cleared, the module will wait for the SCLx line to go cleared by hardware after the eighth falling edge of
low and then hold it. Setting CKP will release SCLx SCLx for a received matching address byte. When the
and allow more communication. DHEN bit of SSPxCON3 is set, CKP is cleared after
the eighth falling edge of SCLx for received data.
21.5.6.1 Normal Clock Stretching Stretching after the eighth falling edge of SCLx allows
Following an ACK if the R/W bit of SSPxSTAT is set, a the slave to look at the received address or data and
read request, the slave hardware will clear CKP. This decide if it wants to ACK the received data.
allows the slave time to update SSPxBUF with data to 21.5.7 CLOCK SYNCHRONIZATION AND
transfer to the master. If the SEN bit of SSPxCON2 is THE CKP BIT
set, the slave hardware will always stretch the clock
after the ACK sequence. Once the slave is ready, CKP Any time the CKP bit is cleared, the module will wait
is set by software and communication resumes. for the SCLx line to go low and then hold it. However,
clearing the CKP bit will not assert the SCLx output
Note 1: The BF bit has no effect on if the clock will
low until the SCLx output is already sampled low.
be stretched or not. This is different than
Therefore, the CKP bit will not assert the SCLx line
previous versions of the module that
until an external I2C master device has already
would not stretch the clock, clear CKP, if
asserted the SCLx line. The SCLx output will remain
SSPxBUF was read before the ninth fall-
low until the CKP bit is set and all other devices on the
ing edge of SCLx.
I2C bus have released SCLx. This ensures that a write
2: Previous versions of the module did not to the CKP bit will not violate the minimum high time
stretch the clock for a transmission if requirement for SCLx (see Figure 21-23).
SSPxBUF was loaded before the ninth
falling edge of SCLx. It is now always
cleared for read requests.
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
SDAx DX DX ‚ – 1
SCLx
Master device
CKP asserts clock
Master device
releases clock
WR
SSPxCON1
SCLx
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’
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 SDAx ended with a Stop condition or with a Repeated Start
and SCKx pins must be configured as inputs. The condition. Since the Repeated Start condition is also
MSSP peripheral hardware will override the output the beginning of the next serial transfer, the I2C bus will
driver TRIS controls when necessary to drive the pins not be released.
low. In Master Transmitter mode, serial data is output
Master mode of operation is supported by interrupt through SDAx, while SCLx outputs the serial clock. The
generation on the detection of the Start and Stop con- first byte transmitted contains the slave address of the
ditions. The Stop (P) and Start (S) bits are cleared from receiving device (seven bits) and the Read/Write (R/W)
a Reset or when the MSSPx module is disabled. Con- bit. In this case, the R/W bit will be logic ‘0’. Serial data
trol of the I 2C bus may be taken when the P bit is set, is transmitted eight bits at a time. After each byte is
or the bus is idle. transmitted, an Acknowledge bit is received. Start and
Stop conditions are output to indicate the beginning
In Firmware Controlled Master mode, user code and the end of a serial transfer.
conducts all I 2C bus operations based on Start and
Stop bit condition detection. Start and Stop condition In Master Receive mode, the first byte transmitted
detection is the only active circuitry in this mode. All contains the slave address of the transmitting device
other communication is done by the user software (seven bits) and the R/W bit. In this case, the R/W bit
directly manipulating the SDAx and SCLx lines. will be logic ‘1’. Thus, the first byte transmitted is a 7-bit
slave address followed by a ‘1’ to indicate the receive
The following events will cause the SSPx Interrupt Flag bit. Serial data is received via SDAx, while SCLx out-
bit, SSPxIF, to be set (SSPx interrupt, if enabled): puts the serial clock. Serial data is received eight bits at
• Start condition detected a time. After each byte is received, an Acknowledge bit
is transmitted. Start and Stop conditions indicate the
• Stop condition detected
beginning and end of transmission.
• Data transfer byte transmitted/received
A Baud Rate Generator is used to set the clock
• Acknowledge transmitted/received
frequency output on SCLx. See Section21.7 “Baud
• Repeated Start generated Rate Generator” for more detail.
Note 1: The MSSPx module, when configured in
I2C Master mode, does not allow queue-
ing 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 detec-
tion is masked and an interrupt is gener-
ated when the SEN/PEN bit is cleared and
the generation is complete.
SDAx DX DX ‚ – 1
BRG decrements on
Q2 and Q4 cycles
BRG
03h 02h 01h 00h (hold off) 03h 02h
Value
TBRG
SCLx
S
TBRG
BF (SSPxSTAT<0>)
PEN
R/W
I2C MASTER MODE WAVEFORM (TRANSMISSION, 7 OR 10-BIT ADDRESS)
DS40001607D-page 191
PIC16(L)F1503
PIC16(L)F1503
21.6.7 I2C MASTER MODE RECEPTION 21.6.7.4 Typical Receive Sequence:
Master mode reception (Figure 21-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 MSSPx 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 SCLx pin changes 5. Address is shifted out the SDAx pin until all eight
(high-to-low/low-to-high) and data is shifted into the bits are transmitted. Transmission begins as
SSPxSR. After the falling edge of the eighth clock, the soon as SSPxBUF is written to.
receive enable flag is automatically cleared, the con- 6. The MSSP module shifts in the ACK bit from the
tents of the SSPxSR are loaded into the SSPxBUF, the slave device and writes its value into the
BF flag bit is set, the SSPxIF flag bit is set and the Baud ACKSTAT bit of the SSPxCON2 register.
Rate Generator is suspended from counting, holding 7. The MSSP module generates an interrupt at the
SCLx low. The MSSP is now in Idle state awaiting the end of the ninth clock cycle by setting the
next command. When the buffer is read by the CPU, SSPxIF bit.
the BF flag bit is automatically cleared. The user can 8. User sets the RCEN bit of the SSPxCON2 regis-
then send an Acknowledge bit at the end of reception ter and the master clocks in a byte from the slave.
by setting the Acknowledge Sequence Enable, ACKEN
9. After the eighth falling edge of SCLx, SSPxIF
bit of the SSPxCON2 register.
and BF are set.
21.6.7.1 BF Status Flag 10. Master clears SSPxIF and reads the received
byte from SSPxBUF, clears BF.
In receive operation, the BF bit is set when an address
or data byte is loaded into SSPxBUF from SSPxSR. It 11. Master sets ACK value sent to slave in ACKDT
is cleared when the SSPxBUF register is read. bit of the SSPxCON2 register and initiates the
ACK by setting the ACKEN bit.
21.6.7.2 SSPOV Status Flag 12. Masters ACK is clocked out to the slave and
In receive operation, the SSPOV bit is set when eight SSPxIF is set.
bits are received into the SSPxSR and the BF flag bit is 13. User clears SSPxIF.
already set from a previous reception. 14. Steps 8-13 are repeated for each received byte
from the slave.
21.6.7.3 WCOL Status Flag 15. Master sends a not ACK or Stop to end
If the user writes the SSPxBUF when a receive is communication.
already in progress (i.e., SSPxSR is still shifting in a
data byte), the WCOL bit is set and the contents of the
buffer are unchanged (the write does not occur).
begin Start condition ACK from Master Set ACKEN, start Acknowledge sequence
Master configured as a receiver SDAx = ACKDT = 0 SDAx = 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
SDAx 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
Set P bit
Cleared by software Cleared by software Cleared by software Cleared by software (SSPxSTAT<4>)
SDAx = 0, SCLx = 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
I2C MASTER MODE WAVEFORM (RECEPTION, 7-BIT ADDRESS)
RCEN
Master configured as a receiver RCEN cleared ACK from Master RCEN cleared
by programming SSPxCON2<3> (RCEN = 1) automatically SDAx = ACKDT = 0 automatically
DS40001607D-page 193
PIC16(L)F1503
PIC16(L)F1503
21.6.8 ACKNOWLEDGE SEQUENCE 21.6.9 STOP CONDITION TIMING
TIMING A Stop bit is asserted on the SDAx 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 SCLx pin is receive/transmit, the SCLx 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 SDAx pin. If the user wishes to the master will assert the SDAx line low. When the
generate an Acknowledge, then the ACKDT bit should SDAx 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 SCLx pin will be brought high
Rate Generator then counts for one rollover period and one TBRG (Baud Rate Generator rollover count)
(TBRG) and the SCLx pin is deasserted (pulled high). later, the SDAx pin will be deasserted. When the SDAx
When the SCLx pin is sampled high (clock arbitration), pin is sampled high while SCLx is high, the P bit of the
the Baud Rate Generator counts for TBRG. The SCLx 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 21-31).
matically cleared, the Baud Rate Generator is turned off
and the MSSP module then goes into Idle mode 21.6.9.1 WCOL Status Flag
(Figure 21-30). If the user writes the SSPxBUF when a Stop sequence
is in progress, then the WCOL bit is set and the
21.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 the WCOL bit is set and
the contents of the buffer are unchanged (the write
does not occur).
SCLx 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.
SDAx ACK
P
TBRG TBRG TBRG
SCLx brought high after TBRG
SDAx asserted low before rising edge of clock
to setup Stop condition
SDAx
BCLxIF
SDAx
SCLx
Set SEN, enable Start SEN cleared automatically because of bus collision.
condition if SDAx = 1, SCLx = 1 SSP module reset into Idle state.
SEN
SDAx sampled low before
Start condition. Set BCLxIF.
S bit and SSPxIF set because
BCLxIF SDAx = 0, SCLx = 1.
SSPxIF and BCLxIF are
cleared by software
SSPxIF
TBRG TBRG
SDAx
FIGURE 21-35: BRG RESET DUE TO SDA ARBITRATION DURING START CONDITION
SDAx = 0, SCLx = 1
Set S Set SSPxIF
Less than TBRG
TBRG
SCLx S
SCLx pulled low after BRG
time-out
SEN
Set SEN, enable Start
sequence if SDAx = 1, SCLx = 1
BCLxIF ‘0’
SSPxIF
SDAx = 0, SCLx = 1, Interrupts cleared
set SSPxIF by software
SDAx
SCLx
RSEN
BCLxIF
Cleared by software
S ‘0’
SSPxIF ‘0’
TBRG TBRG
SDAx
SCLx
S ‘0’
SSPxIF
PEN
BCLxIF
P ‘0’
SSPxIF ‘0’
SDAx
PEN
BCLxIF
P ‘0’
SSPxIF ‘0’
4
SSPM <3:0> SSPxADD<7:0>
8
4 Reload
SSPM <3:0>
SCLx Control Reload
8
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 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 SDAx and SCLx 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)
SCKx Release Control:
1 = Initiate Stop condition on SDAx and SCLx 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 SDAx and SCLx 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 SDAx and SCLx 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 21-6: SSPxADD: MSSP 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
ADD<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 pat-
tern 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 ADD<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:
Rev. 10-000022A
8/5/2013
PWMx_out
To Peripherals
10-bit Latch
(Not visible to user)
PWMxOE
Comparator R Q
0
PWMx
1
S Q
TMR2 Module
R PWMxPOL 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.
All PWM outputs associated with Timer2 are set when Equation 22-3 is used to calculate the PWM duty cycle
TMR2 is cleared. Each PWMx is cleared when TMR2 ratio.
is equal to the value specified in the corresponding
PWMxDCH (8 MSb) and PWMxDCL<7:6> (2 LSb) reg- EQUATION 22-2: PULSE WIDTH
isters. When the value is greater than or equal to PR2,
the PWM output is never cleared (100% duty cycle). Pulse Width = PWMxDCH:PWMxDCL<7:6>
22.1.3 PWM PERIOD The 8-bit timer TMR2 register is concatenated with the
The PWM period is specified by the PR2 register of two Least Significant bits of 1/FOSC, adjusted by the
Timer2. The PWM period can be calculated using the Timer2 prescaler to create the 10-bit time base. The
formula of Equation 22-1. system clock is used if the Timer2 prescaler is set to 1:1.
Figure 22-2 shows a waveform of the PWM signal when
EQUATION 22-1: PWM PERIOD the duty cycle is set for the smallest possible pulse.
TMR2 = 0
TMR2 = PWMxDC
TMR2 = PR2
log 4 PR2 + 1
Resolution = ------------------------------------------ bits
log 2
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-000025A
8/1/2013
LCxOUT
D Q
MLCxOUT
Q1
LCx_in[0]
LCx_in[1]
to Peripherals
LCx_in[2]
Input Data Selection Gates(1)
LCx_in[3]
LCx_in[4] LCxEN LCxOE
LCx_in[5] lcxg1
TRIS Control
LCx_in[6] lcxg2 Logic lcxq LCx_out
LCx_in[7]
lcxg3 Function CLCx
LCx_in[8] (2)
LCx_in[9] lcxg4
LCx_in[10]
LCxPOL
LCx_in[11]
LCx_in[12]
LCxMODE<2:0> Interrupt
LCx_in[13]
LCx_in[14] det
LCx_in[15]
LCXINTP
set bit
LCXINTN CLCxIF
Interrupt
det
Data Selection
LCx_in[0] 00000
Data GATE 1
lcxd1T LCxD1G1T
lcxd1N LCxD1G1N
LCx_in[31] 11111
LCxD2G1T
LCxD1S<4:0>
LCxD2G1N lcxg1
LCx_in[0] 00000
LCxD3G1T
LCxG1POL
lcxd2T
LCxD3G1N
lcxd2N
LCxD4G1T
LCx_in[31] 11111
LCxD2S<4:0> LCxD4G1N
LCx_in[0] 00000
Data GATE 2
lcxg2
lcxd3T
(Same as Data GATE 1)
lcxd3N
Data GATE 3
LCx_in[31] 11111
lcxg3
LCxD3S<4:0>
(Same as Data GATE 1)
lcxd4N
LCx_in[31] 11111
LCxD4S<4: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
lcxg4
lcxg2 J Q lcxq S
lcxg2 D Q lcxq
lcxg1
lcxg4 K
R
lcxg3 LE
R
lcxg3
lcxg1
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: See Table 23-1 for signal names associated with inputs.
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 Table 23-1 for signal names associated with inputs.
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
PIC16(L)F1503
NCOxINCH NCOxINCL Rev. 10-000028A
7/30/2013
16
(1)
INCBUFH INCBUFL
16
20
NCO_overflow Adder
HFINTOSC 00
20
FOSC 01 NCOx_clk
NCOxACCU NCOxACCH NCOxACCL
LCx_out 10 20
NCO1CLK 11
NCO_interrupt set bit
NxCKS<1:0>
2 NCOxIF
Fixed Duty
Cycle Mode
Circuitry
NxOE
D Q D Q 0 TRIS bit
Status
_ NCOx
1
Q
NxPFM NxPOL
NCOx_out
To Peripherals
EN S Q
_ D Q NxOUT
2011-2015 Microchip Technology Inc.
Ripple
R Q
Counter
Pulse Q1
R Frequency
3 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)F1503
24.2 Fixed Duty Cycle (FDC) Mode 24.5 Interrupts
In Fixed Duty Cycle (FDC) mode, every time the When the accumulator overflows (NCO_overflow), the
accumulator overflows (NCO_overflow), the output is NCOx Interrupt Flag bit, NCOxIF, of the PIRx register is
toggled. This provides a 50% duty cycle, provided that set. To enable the interrupt event (NCO_interrupt), the
the increment value remains constant. For more following bits must be set:
information, see Figure 24-2. • NxEN bit of the NCOxCON register
The FDC mode is selected by clearing the NxPFM bit • NCOxIE bit of the PIEx register
in the NCOxCON register. • PEIE bit of the INTCON register
• GIE bit of the INTCON register
24.3 Pulse Frequency (PF) Mode The interrupt must be cleared by software by clearing
the NCOxIF bit in the Interrupt Service Routine.
In Pulse Frequency (PF) mode, every time the accumu-
lator overflows (NCO_overflow), the output becomes
active for one or more clock periods. Once the clock 24.6 Effects of a Reset
period expires, the output returns to an inactive state. All of the NCOx registers are cleared to zero as the
This provides a pulsed output. result of a Reset.
The output becomes active on the rising clock edge
immediately following the overflow event. For more 24.7 Operation In Sleep
information, see Figure 24-2.
The value of the active and inactive states depends on The NCO module operates independently from the
the polarity bit, NxPOL in the NCOxCON register. system clock and will continue to run during Sleep,
provided that the clock source selected remains
The PF mode is selected by setting the NxPFM bit in
active.
the NCOxCON register.
The HFINTOSC remains active during Sleep when the
24.3.1 OUTPUT PULSE WIDTH CONTROL NCO module is enabled and the HFINTOSC is
When operating in PF mode, the active state of the out- selected as the clock source, regardless of the system
put can vary in width by multiple clock periods. Various clock source selected.
pulse widths are selected with the NxPWS<2:0> bits in
In other words, if the HFINTOSC is simultaneously
the NCOxCLK register.
selected as the system clock and the NCO clock
When the selected pulse width is greater than the source, when the NCO is enabled, the CPU will go idle
accumulator overflow time frame, the output of the
during Sleep, but the NCO will continue to operate and
NCOx operation is indeterminate.
the HFINTOSC will remain active.
This will have a direct effect on the Sleep mode current.
24.4 Output Polarity Control
The last stage in the NCOx module is the output polar- 24.8 Alternate Pin Locations
ity. The NxPOL bit in the NCOxCON register selects the
output polarity. Changing the polarity while the inter- This module incorporates I/O pins that can be moved to
rupts are enabled will cause an interrupt for the result- other locations with the use of the alternate pin function
ing output transition. register, APFCON. To determine which pins can be
moved and what their default locations are upon a
The NCOx output can be used internally by source Reset, see Section 11.1 “Alternate Pin Function” for
code or other peripherals. Accomplish this by reading
more information.
the NxOUT (read-only) bit of the NCOxCON register.
The NCOx output signal is available to the following
peripherals:
• CLC
• CWG
PIC16(L)F1503
Rev. 10-000029A
11/7/2013
x
k
e
x
ent 4000h 4000h 4000h
e
x
ator 00000h 04000h 08000h FC000h 00000h 04000h 08000h FC000h 00000h 04000h 08000h
e
erflow
Status
errupt
utput
2011-2015 Microchip Technology Inc.
ode
utput
de
WS =
utput
de
WS =
PIC16(L)F1503
24.9 Register Definitions: NCOx Control Registers
REGISTER 24-1: NCOxCON: NCOx CONTROL REGISTER
R/W-0/0 R/W-0/0 R-0/0 R/W-0/0 U-0 U-0 U-0 R/W-0/0
NxEN NxOE NxOUT NxPOL — — — NxPFM
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
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: Write the NCOxINCH register first, then the NCOxINCL register. See 24.1.4 “Increment Registers” for
more information.
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: Write the NCOxINCH register first, then the NCOxINCL register. See 24.1.4 “Increment Registers” for
more information.
The CWG module allows the following clock sources 25.4.2 POLARITY CONTROL
to be selected:
The polarity of each CWG output can be selected
• Fosc (system clock) independently. When the output polarity bit is set, the
• HFINTOSC (16 MHz only) corresponding output is active-high. Clearing the output
The clock sources are selected using the G1CS0 bit of polarity bit configures the corresponding output as
the CWGxCON0 register (Register 25-1). active-low. However, polarity does not affect the
override levels. Output polarity is selected with the
GxPOLA and GxPOLB bits of the CWGxCON0 register.
PIC16(L)F1503
Rev. 10-000123A
7/9/2015
2
GxASDLA
00
1 GxASDLA = 01
‘0' 10
xCS
‘1' 11
CWGxDBR
FOSC cwg_clock
6
OSC
CWGxA
1
3 EN
GxIS =
0
R
TRISx
sync S Q GxPOLA GxOEA
sync Input Source
CWGxDBF
_out
_out 6
_out R Q
Status
_out
_out GxOEB
_out EN
= TRISx
R 0
1
GxPOLB CWGxB
pin)
SFLT
00
sync
SC1 ‘0' 10
2011-2015 Microchip Technology Inc.
Auto-Shutdown GxASE
sync Source ‘1' 11
SC2 S shutdown
S Q D Q
_out 2
GxASDLB
LC2
GxASDLB = 01
GxASE Data Bit R Q
WRITE
GxARSEN set dominate
PIC16(L)F1503
FIGURE 25-2: TYPICAL CWG OPERATION WITH PWM1 (NO AUTO-SHUTDOWN)
cwg_clock
PWM1
CWGxA
cwg_clock
Input Source
CWGxA
CWGxB
FIGURE 25-4: DEAD-BAND OPERATION, CWGxDBR = 03H, CWGxDBF = 04H, SOURCE SHORTER THAN DEAD BAND
Status
cwg_clock
Input Source
CWGxA
CWGxB
PIC16(L)F1503
DS40001607D-page 240
PIC16(L)F1503
25.8 Dead-Band Uncertainty 25.9 Auto-Shutdown Control
When the rising and falling edges of the input source Auto-shutdown is a method to immediately override the
triggers the dead-band counters, the input may be asyn- CWG output levels with specific overrides that allow for
chronous. This will create some uncertainty in the dead- safe shutdown of the circuit. The shutdown state can be
band time delay. The maximum uncertainty is equal to either cleared automatically or held until cleared by
one CWG clock period. Refer to Equation 25-1 for more software.
detail.
25.9.1 SHUTDOWN
EQUATION 25-1: DEAD-BAND The shutdown state can be entered by either of the
UNCERTAINTY following two methods:
• Software generated
• External Input
1
TDEADBAND_UNCERTAINTY = -----------------------------
Fcwg_clock 25.9.1.1 Software Generated Shutdown
Setting the GxASE bit of the CWGxCON2 register will
force the CWG into the shutdown state.
When auto-restart is disabled, the shutdown state will
Example: persist as long as the GxASE bit is set.
When auto-restart is enabled, the GxASE bit will clear
automatically and resume operation on the next rising
Fcwg_clock = 16 MHz edge event. See Figure 25-6.
PIC16(L)F1503
Shutdown Event Ceases GxASE Cleared by Software
CWG Input
Source
Shutdown Source
GxASE
No Shutdown
Shutdown Output Resumes
Status
FIGURE 25-6: SHUTDOWN FUNCTIONALITY, AUTO-RESTART ENABLED (GxARSEN = 1,GxASDLA = 01, GxASDLB = 01)
CWG Input
Source
Shutdown Source
2011-2015 Microchip Technology Inc.
GxASE
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
26.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 26-2.
The Low-Voltage Programming Entry mode allows the
PIC® Flash MCUs to be programmed using VDD only,
without high voltage. When the LVP bit of Configuration
Words is set to ‘1’, the ICSP Low-Voltage Programming
Entry mode is enabled. To disable the Low-Voltage
ICSP mode, the LVP bit must be programmed to ‘0’.
Entry into the Low-Voltage Programming Entry mode
requires the following steps:
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 6.5 “MCLR” for more
information.
The LVP bit can only be reprogrammed to ‘0’ by using
the High-Voltage Programming mode.
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
For additional interface recommendations, refer to your It is recommended that isolation devices be used to
specific device programmer manual prior to PCB separate the programming pins from other circuitry.
design. The type of isolation is highly dependent on the specific
application and may include devices such as resistors,
diodes, or even jumpers. See Figure 26-3 for more
information.
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
OPCODE only
13 0
OPCODE
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
OPTION – Load OPTION_REG register with W 1 00 0000 0110 0010
RESET – Software device Reset 1 00 0000 0000 0001
SLEEP – Go into Standby 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 kkkk
k[n] Move INDFn to W, Indexed Indirect. 1 11 1111 0nkk 1nmm Z 2
MOVWI n mm Move W to Indirect FSRn with pre/post inc/dec 1 00 0000 0001 kkkk 2, 3
modifier, mm
k[n] Move W to INDFn, Indexed Indirect. 1 11 1111 1nkk 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 Table in the 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.
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
Before Instruction
W = 0x07
After Instruction
W = value of k8
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 28-6 to calculate device
specifications.
2: Power dissipation is calculated as follows: PDIS = VDD x {IDD – IOH} + {(VDD – VOH) x IOH} + (VOl 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.
Rev. 10-000130A
8/6/2013
5.5
VDD (V)
2.5
2.3
0 16 20
Frequency (MHz)
Note 1: The shaded region indicates the permissible combinations of voltage and frequency.
2: Refer to Table 28-8 for each Oscillator mode’s supported frequencies.
Rev. 10-000131A
8/5/2013
3.6
VDD (V)
2.5
1.8
0 16 20
Frequency (MHz)
Note 1: The shaded region indicates the permissible combinations of voltage and frequency.
2: Refer to Table 28-8 for each Oscillator mode’s supported frequencies.
PIC16F1503
Param. Sym. Characteristic Min. Typ† Max. Units Conditions
No.
D001 VDD Supply Voltage
VDDMIN VDDMAX
1.8 — 3.6 V FOSC 16 MHz
2.5 — 3.6 V FOSC 20 MHz
D001 2.3 — 5.5 V FOSC 16 MHz
2.5 — 5.5 V FOSC 20 MHz
D002* VDR RAM Data Retention Voltage(1)
1.5 — — V Device in Sleep mode
D002* 1.7 — — V Device in Sleep mode
D002A* VPOR Power-on Reset Release Voltage(2)
— 1.6 — V
D002A* — 1.6 — V
(2)
D002B* VPORR* Power-on Reset Rearm Voltage
— 0.8 — V
D002B* — 1.5 — V
D003 VFVR Fixed Voltage Reference Voltage
1x gain (1.024V nominal) VDD 2.5V, -40°C TA +85°C
2x gain (2.048V nominal) -4 — +4 % VDD 2.5V, -40°C TA +85°C
4x gain (4.096V nominal) -3 — +7 % VDD 4.75V, -40°C TA +85°C
D004* SVDD VDD Rise Rate(2) 0.05 — — V/ms Ensures that the Power-on Reset
signal is released properly.
*
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: This is the limit to which VDD can be lowered in Sleep mode without losing RAM data.
2: See Figure 28-3, POR and POR REARM with Slow Rising VDD.
VDD
VPOR
VPORR
SVDD
VSS
NPOR(1)
POR REARM
VSS
TVLOW(3) TPOR(2)
PIC16F1503
PIC16F1503
D022 Base IPD — 0.25 3.0 10 A 2.3 WDT, BOR, FVR and SOSC
— 0.30 4.0 12 A 3.0 disabled, all Peripherals inactive,
Low-Power Sleep mode
— 0.40 6.0 15 A 5.0
D022A Base IPD — 9.8 16 18 A 2.3 WDT, BOR, FVR and SOSC
— 10.3 18 20 A 3.0 disabled, all Peripherals inactive,
Normal-Power Sleep mode,
— 11.5 21 26 A 5.0
VREGPM = 0
D023 — 0.26 2.0 9.0 A 1.8 WDT Current
— 0.44 3.0 10 A 3.0
D023 — 0.43 6.0 15 A 2.3 WDT Current
— 0.53 7.0 20 A 3.0
— 0.64 8.0 22 A 5.0
D023A — 15 28 30 A 1.8 FVR Current
— 18 30 33 A 3.0
D023A — 18 33 35 A 2.3 FVR Current
— 19 35 37 A 3.0
— 20 37 39 A 5.0
D024 — 6.0 17 20 A 3.0 BOR Current
D024 — 7.0 17 30 A 3.0 BOR Current
— 8.0 20 40 A 5.0
D24A — 0.1 4.0 10 A 3.0 LPBOR Current
D24A — 0.35 5.0 14 A 3.0 LPBOR Current
— 0.45 8.0 17 A 5.0
* 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: The peripheral current can be determined by subtracting the base IPD current from this limit. Max. values should be
used when calculating total current consumption.
2: The power-down current in Sleep mode does not depend on the oscillator type. Power-down current is measured with
the part in Sleep mode, with all I/O pins in high-impedance state and tied to VSS.
3: ADC clock source is FRC.
— 280 — — A 5.0
D027 — 7 22 25 A 1.8 Comparator,
— 8 23 27 A 3.0 CxSP = 0
— 19 38 40 A 5.0
* 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: The peripheral current can be determined by subtracting the base IPD current from this limit. Max. values should be
used when calculating total current consumption.
2: The power-down current in Sleep mode does not depend on the oscillator type. Power-down current is measured with
the part in Sleep mode, with all I/O pins in high-impedance state and tied to VSS.
3: ADC clock source is FRC.
Param.
Sym. Characteristic Min. Typ† Max. Units Conditions
No.
VIL Input Low Voltage
I/O PORT:
D030 with TTL buffer — — 0.8 V 4.5V VDD 5.5V
D030A — — 0.15 VDD V 1.8V VDD 4.5V
D031 with Schmitt Trigger buffer — — 0.2 VDD V 2.0V VDD 5.5V
with I2C™ levels — — 0.3 VDD V
with SMbus levels — — 0.8 V 2.7V VDD 5.5V
D032 MCLR — — 0.2 VDD V
VIH Input High Voltage
I/O PORT:
D040 with TTL buffer 2.0 — — V 4.5V VDD 5.5V
D040A 0.25 VDD + — — V 1.8V VDD 4.5V
0.8
D041 with Schmitt Trigger buffer 0.8 VDD — — V 2.0V VDD 5.5V
with I2C™ levels 0.7 VDD — — V
with SMbus levels 2.1 — — V 2.7V VDD 5.5V
D042 MCLR 0.8 VDD — — V
IIL Input Leakage Current(1)
D060 I/O Ports — ±5 ± 125 nA VSS VPIN VDD,
Pin at high-impedance, 85°C
— ±5 ± 1000 nA VSS VPIN VDD,
Pin at high-impedance, 125°C
D061 MCLR(2) — ± 50 ± 200 nA VSS VPIN VDD,
Pin at high-impedance, 85°C
IPUR Weak Pull-up Current
D070* 25 100 200 A VDD = 3.3V, VPIN = VSS
25 140 300 A VDD = 5.0V, VPIN = VSS
VOL Output Low Voltage
D080 I/O Ports IOL = 8 mA, VDD = 5V
— — 0.6 V IOL = 6 mA, VDD = 3.3V
IOL = 1.8 mA, VDD = 1.8V
VOH Output High Voltage
D090 I/O Ports IOH = 3.5 mA, VDD = 5V
VDD - 0.7 — — V IOH = 3 mA, VDD = 3.3V
IOH = 1 mA, VDD = 1.8V
Capacitive Loading Specifications on Output Pins
D101A* CIO All I/O pins — — 50 pF
*
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: 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.
TH01 JA Thermal Resistance Junction to Ambient 70 C/W 14-pin PDIP package
95.3 C/W 14-pin SOIC package
100 C/W 14-pin TSSOP package
55.3 C/W 16-pin QFN 3X3X0.9mm package
52.3 C/W 16-pin UQFN 3X3X0.5mm package
TH02 JC Thermal Resistance Junction to Case 32.75 C/W 14-pin PDIP package
31 C/W 14-pin SOIC package
24.4 C/W 14-pin TSSOP package
10 C/W 16-pin QFN 3X3X0.9mm package
11 C/W 16-pin UQFN 3X3X0.5mm 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 PI/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.
3: 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.
OS01 FOSC External CLKIN Frequency(1) DC — 0.5 MHz External Clock (ECL)
DC — 4 MHz External Clock (ECM)
DC — 20 MHz External Clock (ECH)
OS02 TOSC External CLKIN Period(1) 50 — ns External Clock (EC)
OS03 TCY Instruction Cycle Time(1) 200 TCY DC ns TCY = 4/FOSC
* 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 con-
sumption. All devices are tested to operate at “min” values with an external clock applied to CLKIN pin. When an external
clock input is used, the “max” cycle time limit is “DC” (no clock) for all devices.
Param. Freq.
Sym. Characteristic Min. Typ† Max. Units Conditions
No. Tolerance
OS08 HFOSC Internal Calibrated HFINTOSC ±2% — 16.0 — MHz VDD = 3.0V, TA = 25°C,
Frequency(1) (Note 2)
OS09 LFOSC Internal LFINTOSC Frequency — — 31 — kHz (Note 3)
OS10* TIOSC ST HFINTOSC — — 5 15 s
Wake-up from Sleep Start-up Time
OS10A* TLFOSC ST LFINTOSC — — 0.5 — ms -40°C TA +125°C
Wake-up from Sleep Start-up Time
*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: 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 28-6: “HFINTOSC Frequency Accuracy over Device VDD and Temperature”,
Figure 29-60: “HFINTOSC Accuracy Over Temperature, VDD = 1.8V, PIC16LF1503 Only”, and
Figure 29-61: “HFINTOSC Accuracy Over Temperature, 2.3V VDD 5.5V”.
3: See Figure 29-58: “LFINTOSC Frequency over VDD and Temperature, PIC16LF1503 Only”, and
Figure 29-59: “LFINTOSC Frequency over VDD and Temperature, PIC16F1503”.
Rev. 10-000135A
7/30/2013
125
±12%
85
-4.5% to +7%
Temperature (°C)
60
25
±4.5%
±12%
-40
1.8 2.3 5.5
VDD (V)
Note: See Figure 29-60: “HFINTOSC Accuracy Over Temperature, VDD = 1.8V, PIC16LF1503 Only”, and Figure 29-61:
“HFINTOSC Accuracy Over Temperature, 2.3V VDD 5.5V”.
FOSC
OS11 OS12
OS20
CLKOUT OS21
OS19 OS16 OS18
OS13 OS17
I/O pin
(Input)
OS15 OS14
I/O pin Old Value New Value
(Output)
OS18, OS19
Param.
Sym. Characteristic Min. Typ† Max. Units Conditions
No.
VDD
MCLR
30
Internal
POR
33
PWRT
Time-out
Internal Reset(1)
Watchdog Timer
Reset(1)
31
34
34
I/O pins
Param.
Sym. Characteristic Min. Typ† Max. Units Conditions
No.
VDD
VBOR and VHYST
VBOR
37
Reset
33
(due to BOR)
T0CKI
40 41
42
T1CKI
45 46
47 49
TMR0 or
TMR1
Param.
Sym. Characteristic Min. Typ† Max. Units Conditions
No.
40* TT0H T0CKI High Pulse Width No Prescaler 0.5 TCY + 20 — — ns
With Prescaler 10 — — ns
41* TT0L T0CKI Low Pulse Width No Prescaler 0.5 TCY + 20 — — ns
With Prescaler 10 — — ns
42* TT0P T0CKI Period Greater of: — — ns N = prescale value
20 or TCY + 40
N
45* TT1H T1CKI High Synchronous, No Prescaler 0.5 TCY + 20 — — ns
Time Synchronous, with Prescaler 15 — — ns
Asynchronous 30 — — ns
46* TT1L T1CKI Low Synchronous, No Prescaler 0.5 TCY + 20 — — ns
Time Synchronous, with Prescaler 15 — — ns
Asynchronous 30 — — ns
47* TT1P T1CKI Input Synchronous Greater of: — — ns N = prescale value
Period 30 or TCY + 40
N
Asynchronous 60 — — ns
49* TCKEZTMR1 Delay from External Clock Edge to Timer 2 TOSC — 7 TOSC — Timers in Sync
Increment mode
* 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.
Rev. 10-000031A
7/30/2013
Note 1: See FIGURE 23-1:, Configurable Logic Cell Block Diagram, to identify specific CLC signals.
Param.
Sym. Characteristic Min. Typ† Max. Units Conditions
No.
CLC01* TCLCIN CLC input time — 7 — ns
CLC02* TCLC CLC module input to output propagation time — 24 — ns VDD = 1.8V
— 12 — ns VDD > 3.6V
CLC03* TCLCOUT CLC output time Rise Time — OS18 — — (Note 1)
Fall Time — OS19 — — (Note 1)
CLC04* FCLCMAX CLC maximum switching frequency — 45 — MHz
* 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:See Table 28-9 for OS18 and OS19 rise and fall times.
BSF ADCON0, GO
1 TCY
AD133
AD131
Q4
AD130
ADC_clk
ADC Data 9 8 7 6 3 2 1 0
ADIF 1 TCY
GO DONE
BSF ADCON0, GO
AD133 1 TCY
AD131
Q4
AD130
ADC_clk
ADC Data 9 8 7 6 3 2 1 0
ADIF 1 TCY
GO DONE
Sampling Stopped
AD132
Sample
Note 1:If the ADC clock source is selected as FRC, a time of TCY is added before the ADC clock starts. This allows the
SLEEP instruction to be executed.
Param.
Sym. Characteristic Min. Typ† Max. Units Conditions
No.
AD130* TAD ADC Clock Period (TADC) 1.0 — 6.0 s FOSC-based
ADC Internal FRC Oscillator Period (TFRC) 1.0 2.0 6.0 s ADCS<2:0> = x11 (ADC FRC mode)
AD131 TCNV Conversion Time — 11 — TAD Set GO/DONE bit to conversion
(not including Acquisition Time)(1) complete
AD132* TACQ Acquisition Time — 5.0 — s
AD133* THCD Holding Capacitor Disconnect Time — 1/2 TAD — FOSC-based
— 1/2 TAD + 1TCY — ADCS<2:0> = x11 (ADC FRC mode)
* 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: The ADRES register may be read on the following TCY cycle.
Param.
Sym. Characteristics Min. Typ. Max. Units Comments
No.
DAC01* CLSB Step Size — VDD/32 — V
DAC02* CACC Absolute Accuracy — — 1/2 LSb
DAC03* CR Unit Resistor Value (R) — 5K —
DAC04* CST Settling Time(2) — — 10 s
* These parameters are characterized but not tested.
Note 1: See Section 29.0 “DC and AC Characteristics Graphs and Charts” for operating characterization.
2: Settling time measured while DACR<4:0> transitions from ‘00000’ to ‘01111’.
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
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
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
Setup time 400 kHz mode 600 — — Start condition
SP91* THD:STA Start condition 100 kHz mode 4000 — — ns After this period, the first
Hold time 400 kHz mode 600 — — clock pulse is generated
SP92* TSU:STO Stop condition 100 kHz mode 4700 — — ns
Setup time 400 kHz mode 600 — —
SP93 THD:STO Stop condition 100 kHz mode 4000 — — ns
Hold time 400 kHz mode 600 — —
* These parameters are characterized but not tested.
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.5TCY —
SP102* TR SDA and SCL rise 100 kHz mode — 1000 ns
time 400 kHz mode 20 + 0.1CB 300 ns CB is specified to be from
10-400 pF
SP103* TF SDA and SCL fall 100 kHz mode — 250 ns
time 400 kHz mode 20 + 0.1CB 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 100 kHz mode 250 — ns (Note 2)
time 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.
14
Max.
12
10
Typical
8
IDD (µA)
Max: 85°C + 3ı
2 Typical: 25°C
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)
FIGURE 29-2: IDD, EXTERNAL CLOCK (ECL), LOW-POWER MODE, FOSC = 32 kHz, PIC16F1503
ONLY
25
Max.
20
Typical
15
IDD (µA)
10
Max: 85°C + 3ı
5 Typical: 25°C
0
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
VDD (V)
50
45 Max: 85°C + 3ı
Typical: 25°C
40
Max.
35
30
Typical
IDD (µA)
25
20
15
10
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)
FIGURE 29-4: IDD, EXTERNAL CLOCK (ECL), LOW-POWER MODE, FOSC = 500 kHz,
PIC16F1503 ONLY
60
Max.
50
40 Typical
IDD (µA)
30
20
Max: 85°C + 3ı
10 Typical: 25°C
0
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
VDD (V)
300
150
100
1 MHz
50
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)
FIGURE 29-6: IDD MAXIMUM, EXTERNAL CLOCK (ECM), MEDIUM POWER MODE,
PIC16LF1503 ONLY
350
250 4 MHz
200
IDD (µA)
150
100
1 MHz
50
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)
350
4 MHz
300 Typical: 25°C
250
IDD (µA)
200
150
1 MHz
100
50
0
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
VDD (V)
FIGURE 29-8: IDD MAXIMUM, EXTERNAL CLOCK (ECM), MEDIUM POWER MODE, PIC16F1503
ONLY
400
4 MHz
350 Max: 85°C + 3ı
300
250
IDD (µA)
200
1 MHz
150
100
50
0
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
VDD (V)
1.4
20 MHz
1.2 Typical: 25°C
1.0 16 MHz
IDD (mA)
0.8
0.6
8 MHz
0.4
0.2
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
VDD (V)
1.6
20 MHz
1.4 Max: 85°C + 3ı
1.2 16 MHz
1.0
IDD (mA)
0.8
8 MHz
0.6
0.4
0.2
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
VDD (V)
1.4
20 MHz
1.2 Typical: 25°C
16 MHz
1.0
0.8
IDD (mA)
8 MHz
0.6
0.4
0.2
0.0
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
VDD (V)
1.6
20 MHz
1.4 Max: 85°C + 3ı
1.2 16 MHz
1.0
IDD (mA)
0.8
8 MHz
0.6
0.4
0.2
0.0
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
VDD (V)
12
8
IDD (µA)
6 Typical
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)
25
Max.
20
Typical
IDD (µA)
15
10
Max: 85°C + 3ı
5 Typical: 25°C
0
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
VDD (V)
400
Max: 85°C + 3ı
350 Typical: 25°C Max.
300
250 Typical
IDD (µA)
200
150
100
50
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)
250
200
150
100
50
0
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
VDD (V)
1.4
16 MHz
1.0
IDD (mA)
0.8
8 MHz
0.6
4 MHz
0.4
0.2
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
VDD (V)
1.6
16 MHz
1.2
1.0
IDD (mA)
8 MHz
0.8
0.6 4 MHz
0.4
0.2
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
VDD (V)
1.2
1.0 16 MHz
0.8
IDD (mA)
8 MHz
0.6
4 MHz
0.4
0.0
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
VDD (V)
1.4
1.2 16 MHz
1.0
0.8
IDD (mA)
8 MHz
0.6
4 MHz
0.4
0.0
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
VDD (V)
450
Max: 85°C + 3
M 3ı
400
Typical: 25°C Max.
350
300
D (nA)
250
IPD
200
150
100
Typical
50
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)
FIGURE 29-22: IPD BASE, LOW-POWER SLEEP MODE, VREGPM = 1, PIC16F1503 ONLY
600
Max.
Max: 85°C + 3ı
500 Typical: 25°C
400
IPD (nA)
300
Typical
200
100
0
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
VDD (V)
2.0
1.4 Max.
1.2
(µA)
IPD (µA
1.0
0.8
08
0.6 Typical
0.4
0.2
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
VDD (V)
1.4
Max
Max.
1.2
1.0
A)
0.8
IPD (µA
Typical
0.6
0.4
Max: 85°C + 3ı
0.2
Typical: 25°C
0.0
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
VDD (V)
45
Max: 85°C + 3ı
40
Typical: 25°C
35
Max.
30
25 Typical
A)
IPD (µA
20
15
10
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)
30
25 Max.
20
Typical
IPD (µA)
15
10
Max: 85°C + 3ı
5 Typical: 25°C
0
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
VDD (V)
10
Max.
9
Max: 85°C + 3ı
8 Typical: 25°C
7
Typical
6
D (µA)
5
IPD
0
16
1.6 1
1.8
8 2
2.0
0 2
2.2
2 2
2.4
4 2
2.6
6 2
2.8
8 3
3.0
0 3
3.2
2 3
3.4
4 3
3.6
6 3
3.8
8
VDD (V)
12
8
Typical
IPD (µA)
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)
12
M
Max.
Max: 85°C + 3ı
10 Typical: 25°C
8
Typical
IPD (µA)
0
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
VDD (V)
14
Max
Max.
12 Max: 85°C + 3ı
Typical: 25°C
10
Typical
8
IPD (µA)
0
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
VDD (V)
14
12 Max.
10
IPD (µA)
8
Typical
6
Max: 85°C + 3ı
2 Typical: 25°C
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)
FIGURE 29-32: IPD, COMPARATOR, LOW-POWER MODE (CxSP = 0), PIC16F1503 ONLY
30
25
Max.
20
IPD (µA)
Typical
yp
15
10
5 Max: 85°C + 3ı
Typical: 25°C
0
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
VDD (V)
40
35 Max.
30
25
A)
IPD (µA
20 Typical
15
10
Max: 85°C + 3ı
5
Typical: 25 C
25°C
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)
FIGURE 29-34: IPD, COMPARATOR, NORMAL POWER MODE (CxSP = 1), PIC16F1503 ONLY
60
50
Max.
40
A)
IPD (µA
30
Typical
20
Max: 85°C + 3ı
10 Typical: 25°C
0
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
VDD (V)
Max: 125°C + 3ı
5 Typical: 25°C
Min: -40°C - 3ı
4
VOH (V)
Min. (-40°C)
3
Typical (25°C)
2
Max. (125°C)
0
-45 -40 -35 -30 -25 -20 -15 -10 -5 0
IOH (mA)
FIGURE 29-36: VOL vs. IOL OVER TEMPERATURE, VDD = 5.5V, PIC16F1503 ONLY
Typical (25°C)
3
VOL (V)
Min. (-40°C)
2
0
0 10 20 30 40 50 60 70 80 90 100
IOL (mA)
3.5
Max: 125°C + 3ı
3.0 Typical: 25°C
Min: -40°C - 3ı
2.5
VOH (V)
2.0
1.5
1.0
Min. (-40°C) Typical (25°C) Max. (125°C)
0.5
0.0
-15 -13 -11 -9 -7 -5 -3 -1
IOH (mA)
3.0
Max: 125°C + 3ı
2.5 Typical: 25°C
Min: -40°C - 3ı
2.0
Min. (-40°C)
VOL (V)
1.0
0.5
0.0
0 5 10 15 20 25 30 35 40
IOL (mA)
2.0
1.2
VOH (V)
0.8
0.6
0.4
0.2
0.0
-4.5 -4.0 -3.5 -3.0 -2.5 -2.0 -1.5 -1.0 -0.5 0.0
IOH (mA)
FIGURE 29-40: VOL vs. IOL OVER TEMPERATURE, VDD = 1.8V, PIC16LF1503 ONLY
1.8
1.2
VOL (V)
1.0
0.8
Max. (125°C) Typical (25°C) Min. (-40°C)
0.6
0.4
0.2
0.0
0 1 2 3 4 5 6 7 8 9 10
IOL (mA)
1.70
1.68
Max.
1.66
1.64 Typical
1.62
Voltage (V)
Min.
1.60
1.58
1.56
1.50
-60 -40 -20 0 20 40 60 80 100 120 140
Temperature (°C)
1.46
Voltage (V)
1.44
Typical
1.42
1.40
Min.
1.38
1.36
1.34
-60 -40 -20 0 20 40 60 80 100 120 140
Temperature (°C)
2.00
Max.
1.95
Voltage (V)
Typical
1.90
1.85 Min.
Max: Typical + 3ı
Min: Typical - 3ı
1.80
-60 -40 -20 0 20 40 60 80 100 120 140
Temperature (°C)
60
50 Max.
Max: Typical + 3ı
40 Typical: 25°C
Min: Typical - 3ı
Voltage (mV)
Typical
30
20
Min.
10
0
-60 -40 -20 0 20 40 60 80 100 120 140
Temperature (°C)
2.60
2.55 Max.
2.50
Typical
Voltage (V)
2.45
Min.
2.40
Max: Typical + 3ı
2.35 Min: Typical - 3ı
2.30
-60 -40 -20 0 20 40 60 80 100 120 140
Temperature (°C)
70
Max.
60
Max: Typical + 3ı
50 Typical: 25°C
Min: Typical - 3ı
Voltage (mV)
40
Typical
30
20
Min.
10
0
-60 -40 -20 0 20 40 60 80 100 120 140
Temperature (°C)
2.80
2.75
Max.
2.70
Voltage (V)
Typical
2.65
Min.
Max: Typical + 3ı
2.60 Min: Typical - 3ı
2.55
-60 -40 -20 0 20 40 60 80 100 120 140
Temperature (°C)
2.50
Max.
Max: Typical + 3ı
2.40
Min: Typical - 3ı
2.30
Typical
Voltage (V)
2.20
2.10
2.00
Min.
1.90
1.80
-60 -40 -20 0 20 40 60 80 100 120 140
Temperature (°C)
45
25
Min.
20
15
10
0
-60 -40 -20 0 20 40 60 80 100 120 140
Temperature (°C)
24
22 Max.
20
Time (ms)
18 Typical
16
Min.
14
100
80
Time (ms)
70 Typical
60
Min.
50
40
1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
VDD (V)
60
Max: Typical + 3ı
50 Typical: statistical mean @ 25°C
Max.
40
Typical
Time (us)
30
20
Note:
The FVR Stabilization Period applies when:
1) coming out of RESET or exiting Sleep mode for PIC12/16LFxxxx devices.
10 2) when exiting sleep mode with VREGPM = 1 for PIC12/16Fxxxx devices
In all other cases, the FVR is stable when released from RESET.
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)
40
35
Max.
30
Hysteresis (mV)
25
Typical
20
15
Min.
10 Max: Typical + 3ı
Typical: 25°C
5 Min: Typical - 3ı
0
1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
VDD (V)
7
Max.
6
Hysteresis (mV)
5
Typical
4
2
Max: Typical + 3ı Min.
1 Typical: 25°C
Min: Typical - 3ı
0
1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
VDD (V)
350
300
250
Max.
Time (ns)
200
Typical
150
100
Max: Typical + 3ı
50 Typical: 25°C
0
1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
VDD (V)
400
250
Time (ns)
Max. (125°C)
200
150
Typical (25°C)
100
Min. (-40°C)
50
0
1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
VDD (V)
50
40
30
Max.
20
Offset Voltage (mV)
10
Typical
0
Min.
-10
-20
-50
0.0 1.0 2.0 3.0 4.0 5.0
Common Mode Voltage (V)
36
34
Max.
32
30
Typical
Frequency (kHz)
28
26 Min.
24
Max: Typical + 3ı (-40°C to +125°C)
22 Typical: statistical mean @ 25°C
Min: Typical - 3ı (-40°C to +125°C)
20
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)
FIGURE 29-59: LFINTOSC FREQUENCY OVER VDD AND TEMPERATURE, PIC16F1503 ONLY
36
34
Max.
32
30
Frequency (kHz)
Typical
28
26 Min.
24
Max: Typical + 3ı (-40°C to +125°C)
22 Typical: statistical mean @ 25°C
Min: Typical - 3ı (-40°C to +125°C)
20
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
VDD (V)
8%
6% Max: Typical + 3ı
Typical: statistical mean Max.
4% Min: Typical - 3ı
2%
Accuracy (%)
0% Typical
-2%
-4%
-6% Min.
-8%
-10%
-60 -40 -20 0 20 40 60 80 100 120 140
Temperature (°C)
8%
6% Max: Typical + 3ı
Typical: statistical mean
4% Min: Typical - 3ı Max.
Accuracy (%)
2%
Typical
0%
-2% Min.
-4%
-6%
-8%
-10%
-60 -40 -20 0 20 40 60 80 100 120 140
Temperature (°C)
5.0
4.5
Max.
4.0
3.5
3.0 Typical
Time (us)
2.5
2.0
1.5
Max: 85°C + 3ı
1.0 Typical: 25°C
0.5
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
VDD (V)
35
Max.
30
Typical
25
Time (us)
20
15
10
5 Max: 85°C + 3ı
Typical: 25°C
0
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
VDD (V)
FIGURE 29-64: SLEEP MODE, WAKE PERIOD WITH HFINTOSC SOURCE, VREGPM = 0,
PIC16F1503 ONLY
12
Max.
10
8
Time (us)
Typical
6
2 Max: 85°C + 3ı
Typical: 25°C
0
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
VDD (V)
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
XXXXXXXXXXXXXX PIC16F1503
XXXXXXXXXXXXXX -I/P e3
YYWWNNN 1110017
XXXXXXXXXXX PIC16F1503
XXXXXXXXXXX -I/SL e3
YYWWNNN 1110017
XXXXXXXX F1503IST
YYWW 1110
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.
* Standard PICmicro® device marking consists of Microchip part number, year code, week code and
traceability code. For PICmicro device marking beyond this, certain price adders apply. Please check
with your Microchip Sales Office. For QTP devices, any special marking adders are included in QTP
price.
XXXX MGDX
XYYW X111
WNNN 1017
XXXX AADX
XYYW X111
WNNN 1017
5
'("' #
'
6$
+")
""'
6
& ' '$'
''
477+++(
(7
6
NOTE 1
E1
1 2 3
A A2
L c
A1
b1
b e eB
8'" 9-:/
(";('" 9 9< =
9#(*
&" 9
' 3-
'' > >
$$ 6 6"" 2 . 2
3"'' 2 > >
#$
'#$
?$' / . .2
$$ 6?$' / 2 @
<!
;' .2 2 2
'' ; 2 . 2
;$ 6"" @ 2
8
;$?$' * 2 B
;+
;$?$' * @
<!
+
, 3 > > .
!"#$%&'#
(!
)*#'(#"'* '$+''' $
,& '-
'
"'
. (""$/$' #$($&"
'
#""$&"
'
#"""'% $0
"$
("$'
/12
3-43" ("
' % '!#"++'#''
"
+ -23
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
5
'("' #
'
6$
+")
""'
6
& ' '$'
''
477+++(
(7
6
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
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
16-Lead Ultra Thin Quad Flat Pack, No Lead (MV) - 3x3x0.50 mm Body (UQFN)
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
2
E
(DATUM B)
(DATUM A)
2X
0.20 C
2X
0.20 C
TOP VIEW
0.10 C
C A1
A
SEATING
PLANE
(A3) 0.08 C
SIDE VIEW
0.10 C A B
D2
0.10 C A B
K
E2
2
L
NOTE 1 N
16 X b
e 0.07 C A B
0.05 C
BOTTOM VIEW
Microchip Technology Drawing C04-211A Sheet 1 of 2
16-Lead Ultra Thin Quad Flat Pack, No Lead (MV) - 3x3x0.50 mm Body (UQFN)
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 16
Pitch e 0.50 BSC
Overall Height A 0.45 0.50 0.55
Standoff A1 0.00 0.02 0.05
Terminal Thickness (A3) 0.15 REF
Overall Width E 3.00 BSC
Exposed Pad Width E2 1.50 1.60 1.70
Overall Length D 3.00 BSC
Exposed Pad Length D2 1.50 1.60 1.70
Terminal Width b 0.20 0.25 0.30
Terminal Length L 0.25 0.35 0.45
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.
16-Lead Ultra Thin Quad Flat Pack, No Lead (MV) - 3x3x0.50 mm Body (UQFN)
Note: For the most current package drawings, please see the Microchip Packaging Specification located at
http://www.microchip.com/packaging
C2
X2
C2 Y2 E
X1
Y1
SILK SCREEN
Units MILLIMETERS
Dimension Limits MIN NOM MAX
Contact Pitch E 0.50 BSC
Optional Center Pad Width X2 1.70
Optional Center Pad Length Y2 1.70
Contact Pad Spacing C1 2.90
Contact Pad Spacing C2 2.90
Contact Pad Width (X16) X1 0.30
Contact Pad Length (X16) Y1 0.80
Notes:
1. Dimensioning and tolerancing per ASME Y14.5M
BSC: Basic Dimension. Theoretically exact value shown without tolerances.
Microchip Technology Drawing C04-2211A
Revision A (9/2011)
Original release.
Revision B (8/2013)
Removed “Preliminary” status.
Revision C (02/2014)
Updated Electrical Specifications and added Charac-
terization Data.
Revision D (10/2015)
Added Section 3.2 High Endurance Flash. Updated
Equation 15-1; Figure 25-1; Register 25-3; Sections
23.1.5, 25.9.1.2, 25.11.1, and 28.1; and Table 25-2.
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 Microchip received ISO/TS-16949:2009 certification for its worldwide
headquarters, design and wafer fabrication facilities in Chandler and
CERTIFIED BY DNV Tempe, Arizona; Gresham, Oregon and design centers in California
and India. The Company’s quality system processes and procedures
== ISO/TS 16949 ==
are for its PIC® MCUs and dsPIC® DSCs, KEELOQ® code hopping
devices, Serial EEPROMs, microperipherals, nonvolatile memory and
analog products. In addition, Microchip’s quality system for the design
and manufacture of development systems is ISO 9001:2000 certified.