Chip Data Sheet (Signal Generator)
Chip Data Sheet (Signal Generator)
Chip Data Sheet (Signal Generator)
Remappable Peripherals
Comparators
10-Bit A/D
PMP/PSP
Program
Memory
Remappable
(bytes)
(bytes)
SRAM
JTAG
Compare/
I2C™
Pins
UART w/
(ch)
Capture
Output
Timers
16-Bit
Device
IrDA®
Input
PWM
Pins
SPI
PIC24FJ16GA002 28 16K 4K 16 5 5 5 2 2 2 10 2 Y Y
PIC24FJ32GA002 28 32K 8K 16 5 5 5 2 2 2 10 2 Y Y
PIC24FJ48GA002 28 48K 8K 16 5 5 5 2 2 2 10 2 Y Y
PIC24FJ64GA002 28 64K 8K 16 5 5 5 2 2 2 10 2 Y Y
PIC24FJ16GA004 44 16K 4K 26 5 5 5 2 2 2 13 2 Y Y
PIC24FJ32GA004 44 32K 8K 26 5 5 5 2 2 2 13 2 Y Y
PIC24FJ48GA004 44 48K 8K 26 5 5 5 2 2 2 13 2 Y Y
PIC24FJ64GA004 44 64K 8K 26 5 5 5 2 2 2 13 2 Y Y
MCLR 1 28 VDD
AN0/VREF+/CN2/RA0 2 27 VSS
AN1/VREF-/CN3/RA1 3 26 AN9/RP15/CN11/PMCS1/RB15
PIC24FJXXGA002
PGED1/AN2/C2IN-/RP0/CN4/RB0 4 25 AN10/CVREF/RTCC/RP14/CN12/PMWR/RB14
PGEC1/AN3/C2IN+/RP1/CN5/RB1 5 24 AN11/RP13/CN13/PMRD/RB13
AN4/C1IN-/SDA2/RP2/CN6/RB2 6 23 AN12/RP12/CN14/PMD0/RB12
AN5/C1IN+/SCL2/RP3/CN7/RB3 7 22 PGEC2/TMS/RP11/CN15/PMD1/RB11
VSS 8 21 PGED2/TDI/RP10/CN16/PMD2/RB10
OSCI/CLKI/CN30/RA2 9 20 VCAP/VDDCORE
OSCO/CLKO/CN29/PMA0/RA3 10 19 DISVREG
SOSCI/RP4/PMBE/CN1/RB4 11 18 TDO/SDA1/RP9/CN21/PMD3/RB9
SOSCO/T1CK/CN0/PMA1/RA4 12 17 TCK/SCL1/RP8/CN22/PMD4/RB8
VDD 13 16 RP7/INT0/CN23/PMD5/RB7
PGED3/ASDA1/RP5/CN27/PMD7/RB5 14 15 PGEC3/ASCL1/RP6/CN24/PMD6/RB6
28-Pin QFN(1)
AN10/CVREF/RTCC/RP14/CN12/PMWR/RB14
AN9/RP15/CN11/PMCS1/RB15
AN0/VREF+/CN2/RA0
AN1/VREF-/CN3/RA1
MCLR
VDD
VSS
28 27 26 25 24 23 22
PGED1/AN2/C2IN-/RP0/CN4/RB0 1 21 AN11/RP13/CN13/PMRD/RB13
PGEC1/AN3/C2IN+/RP1/CN5/RB1 2 20 AN12/RP12/CN14/PMD0/RB12
AN4/C1IN-/SDA2/RP2/CN6/RB2 3 19 PGEC2/TMS/RP11/CN15/PMD1/RB11
AN5/C1IN+/SCL2/RP3/CN7/RB3 4 PIC24FJXXGA002 18 PGED2/TDI/RP10/CN16/PMD2/RB10
VSS 5 17 VCAP/VDDCORE
OSCI/CLKI/CN30/RA2 6 16 DISVREG
OSCO/CLKO/CN29/PMA0/RA3 7 15 TDO/SDA1/RP9/CN21/PMD3/RB9
8 9 10 11 12 13 14
RP7/INT0/CN23/PMD5/RB7
PGED3/ASDA1/RP5/CN27/PMD7/RB5
SOSCO/T1CK/CN0/PMA1/RA4
SOSCI/RP4/PMBE/CN1/RB4
VDD
TCK/SCL1/RP8/CN22/PMD4/RB8
PGEC3/ASCL1/RP6/CN24/PMD6/RB6
Legend: RPn represents remappable peripheral pins. Gray shading indicates 5.5V tolerant input pins.
Note 1: Back pad on QFN devices should be connected to Vss.
44-Pin QFN(1)
PGED3/ASDA1/RP5/CN27/PMD7/RB5
PGEC3/ASCL1/RP6/CN24/PMD6/RB6
SCL1/RP8/CN22/PMD4/RB8
RP7/INT0/CN23/PMD5/RB7
SOSCO/T1CK/CN0/RA4
RP19/CN28/PMBE/RC3
RP21/CN26/PMA3/RC5
RP20/CN25/PMA4/RC4
TDI/PMA9/RA9
VDD
VSS
44
43
42
41
40
39
38
37
36
35
34
SDA1/RP9/CN21/PMD3/RB9 1 33 SOSCI/RP4/CN1/RB4
RP22/CN18/PMA1/RC6 2 32 TDO/PMA8/RA8
RP23/CN17/PMA0/RC7 3 31 OSCO/CLKO/CN29/RA3
RP24/CN20/PMA5/RC8 4 30 OSCI/CLKI/CN30/RA2
RP25/CN19/PMA6/RC9 5 29 VSS
DISVREG 6 PIC24FJXXGA004 28 VDD
VCAP/VDDCORE 7 27 AN8/RP18/CN10/PMA2/RC2
PGED2/RP10/CN16/PMD2/RB10 8 26 AN7/RP17/CN9/RC1
PGEC2/RP11/CN15/PMD1/RB11 9 25 AN6/RP16/CN8/RC0
AN12/RP12/CN14/PMD0/RB12 10 24 AN5/C1IN+/SCL2/RP3/CN7/RB3
AN11/RP13/CN13/PMRD/RB13 11 23 AN4/C1IN-/SDA2/RP2/CN6/RB2
12
13
14
15
16
17
18
19
20
21
22
MCLR
AVSS
AN0/VREF+/CN2/RA0
TMS/PMA10/RA10
AN1/VREF-/CN3/RA1
PGED1/AN2/C2IN-/RP0/CN4/RB0
PGEC1/AN3/C2IN+/RP1/CN5/RB1
TCK/PMA7/RA7
AN10/CVREF/RTCC/RP14/CN12/PMWR/RB14
AVDD
AN9/RP15/CN11/PMCS1/RB15
Legend: RPn represents remappable peripheral pins. Gray shading indicates 5.5V tolerant input pins.
Note 1: Back pad on QFN devices should be connected to Vss.
44-Pin TQFP
PGED3/RP5/ASDA1/CN27/PMD7/RB5
PGEC3/RP6/ASCL1/CN24/PMD6/RB6
SCL1/RP8/CN22/PMD4/RB8
RP7/INT0/CN23/PMD5/RB7
SOSCO/T1CK/CN0/RA4
RP19/CN28/PMBE/RC3
RP21/CN26/PMA3/RC5
RP20/CN25/PMA4/RC4
TDI/PMA9/RA9
VDD
VSS
38
44
43
42
41
40
39
37
36
35
34
SDA1/RP9/CN21/PMD3/RB9 1 33 SOSCI/RP4/CN1/RB4
RP22/CN18/PMA1/RC6 2 32 TDO/PMA8/RA8
RP23/CN17/PMA0/RC7 3 31 OSCO/CLKO/CN29/RA3
RP24/CN20/PMA5/RC8 4 30 OSCI/CLKI/CN30/RA2
RP25/CN19/PMA6/RC9 5 29 VSS
DISVREG 6 PIC24FJXXGA004 28 VDD
VCAP/VDDCORE 7 27 AN8/RP18/CN10/PMA2/RC2
PGED2/RP10/CN16/PMD2/RB10 8 26 AN7/RP17/CN9/RC1
PGEC2/RP11/CN15/PMD1/RB11 9 25 AN6/RP16/CN8/RC0
AN12/RP12/CN14/PMD0/RB12 10 24 AN5/C1IN+/SCL2/RP3/CN7/RB3
AN11/RP13/CN13/PMRD/RB13 11 23 AN4/C1IN-/SDA2/RP2/CN6/RB2
12
13
14
15
16
17
18
19
20
21
22
MCLR
AVSS
AN0/VREF+/CN2/RA0
TMS/PMA10/RA10
TCK/PMA7/RA7
AN10/CVREF/RTCC/RP14/CN12/PMWR/RB14
AN1/VREF-/CN3/RA1
PGED1/AN2/C2IN-/RP0/CN4/RB0
PGEC1/AN3/C2IN+/RP1/CN5/RB1
AVDD
AN9/RP15/CN11/PMCS1/RB15
Legend: RPn represents remappable peripheral pins. Gray shading indicates 5.5V tolerant input pins.
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 Web site; http://www.microchip.com
• Your local Microchip sales office (see last page)
When contacting a sales office, please specify which device, revision of silicon and data sheet (include literature number) you are
using.
16GA002
32GA002
48GA002
64GA002
16GA004
32GA004
48GA004
64GA004
Features
16
8 16 16
EA MUX 16
Address Bus
Literal Data
24 16 16 PORTC(1)
RC<9:0>
Inst Latch
Inst Register
Instruction RP(1)
Decode &
Control RP<25:0>
Divide
Control Signals Support 16 x 16
17x17 W Reg Array
Timing Power-up Multiplier
OSCO/CLKO
OSCI/CLKI Generation Timer
Oscillator
FRC/LPRC Start-up Timer
Oscillators 16-Bit ALU
Power-on
Reset
16
Precision
Band Gap Watchdog
Reference Timer
DISVREG BOR and
Voltage
Regulator LVD(2)
10-Bit
Timer1 Timer2/3(3) Timer4/5(3) RTCC A/D Comparators(3)
PMP/PSP
PWM/
IC1-5(3) CN1-22(1) SPI1/2(3) I2C1/2 UART1/2(3)
OC1-5(3)
Note 1: Not all pins or features are implemented on all device pinout configurations. See Table 1-2 for I/O port pin descriptions.
2: BOR and LVD functionality is provided when the on-board voltage regulator is enabled.
3: Peripheral I/Os are accessible through remappable pins.
28-Pin Input
Function 28-Pin 44-Pin I/O Description
SPDIP/ Buffer
QFN QFN/TQFP
SSOP/SOIC
28-Pin Input
Function 28-Pin 44-Pin I/O Description
SPDIP/ Buffer
QFN QFN/TQFP
SSOP/SOIC
28-Pin Input
Function 28-Pin 44-Pin I/O Description
SPDIP/ Buffer
QFN QFN/TQFP
SSOP/SOIC
PGEC3 14 12 42 I/O ST
PGED1 4 1 21 I/O ST In-Circuit Debugger/Emulator and ICSP Programming
PGED2 21 18 8 I/O ST Data.
PGED3 15 11 41 I/O ST
PMA0 10 7 3 I/O ST/TTL Parallel Master Port Address Bit 0 Input (Buffered Slave
modes) and Output (Master modes).
PMA1 12 9 2 I/O ST/TTL Parallel Master Port Address Bit 1 Input (Buffered Slave
modes) and Output (Master modes).
PMA2 — — 27 O — Parallel Master Port Address (Demultiplexed Master
PMA3 — — 38 O — modes).
PMA4 — — 37 O —
PMA5 — — 4 O —
PMA6 — — 5 O —
PMA7 — — 13 O —
PMA8 — — 32 O —
PMA9 — — 35 O —
PMA10 — — 12 O —
PMA11 — — — O —
PMA12 — — — O —
PMA13 — — — O —
PMBE 11 8 36 O — Parallel Master Port Byte Enable Strobe.
PMCS1 26 23 15 O — Parallel Master Port Chip Select 1 Strobe/Address Bit 14.
PMD0 23 20 10 I/O ST/TTL Parallel Master Port Data (Demultiplexed Master mode) or
PMD1 22 19 9 I/O ST/TTL Address/Data (Multiplexed Master modes).
28-Pin Input
Function 28-Pin 44-Pin I/O Description
SPDIP/ Buffer
QFN QFN/TQFP
SSOP/SOIC
28-Pin Input
Function 28-Pin 44-Pin I/O Description
SPDIP/ Buffer
QFN QFN/TQFP
SSOP/SOIC
28-Pin Input
Function 28-Pin 44-Pin I/O Description
SPDIP/ Buffer
QFN QFN/TQFP
SSOP/SOIC
VDD
VSS
R1 (1) (1)
16-bit microcontrollers requires attention to a minimal R2 (EN/DIS)VREG
set of device pin connections before proceeding with MCLR
development. VCAP/VDDCORE
C1
The following pins must always be connected: C7
PIC24FJXXXX
• All VDD and VSS pins
(see Section 2.2 “Power Supply Pins”) VSS VDD
C6(2) C3(2)
• All AVDD and AVSS pins, regardless of whether or
VDD VSS
not the analog device features are used
AVDD
AVSS
VDD
VSS
(see Section 2.2 “Power Supply Pins”)
• MCLR pin
(see Section 2.3 “Master Clear (MCLR) Pin”)
C5(2) C4(2)
• ENVREG/DISVREG and VCAP/VDDCORE pins
(PIC24F J devices only)
(see Section 2.4 “Voltage Regulator Pins
Key (all values are recommendations):
(ENVREG/DISVREG and VCAP/VDDCORE)”)
C1 through C6: 0.1 F, 20V ceramic
These pins must also be connected if they are being
C7: 10 F, 6.3V or greater, tantalum or ceramic
used in the end application:
R1: 10 kΩ
• PGECx/PGEDx pins used for In-Circuit Serial
R2: 100Ω to 470Ω
Programming™ (ICSP™) and debugging purposes
Note 1: See Section 2.4 “Voltage Regulator Pins
(see Section 2.5 “ICSP Pins”)
(ENVREG/DISVREG and VCAP/VDDCORE)”
• OSCI and OSCO pins when an external oscillator for an explanation of the ENVREG/DISVREG
source is used pin connections.
(see Section 2.6 “External Oscillator Pins”) 2: The example shown is for a PIC24F device
Additionally, the following pins may be required: with five VDD/VSS and AVDD/AVSS pairs.
Other devices may have more or less pairs;
• VREF+/VREF- pins used when external voltage adjust the number of decoupling capacitors
reference for analog modules is implemented appropriately.
Note: The AVDD and AVSS pins must always be
connected, regardless of whether any of
the analog modules are being used.
The minimum mandatory connections are shown in
Figure 2-1.
ESR ()
When the regulator is enabled, a low-ESR (< 5Ω) 0.1
capacitor is required on the VCAP/VDDCORE pin to
stabilize the voltage regulator output voltage. The
VCAP/VDDCORE pin must not be connected to VDD and 0.01
must use a capacitor of 10 µF connected to ground. The
type can be ceramic or tantalum. Suitable examples of 0.001
capacitors are shown in Table 2-1. Capacitors with 0.01 0.1 1 10 100 1000 10,000
equivalent specification can be used. Frequency (MHz)
Note: Typical data measurement at 25°C, 0V DC bias.
.
TABLE 2-1: SUITABLE CAPACITOR EQUIVALENTS
Nominal
Make Part # Base Tolerance Rated Voltage Temp. Range
Capacitance
TDK C3216X7R1C106K 10 µF ±10% 16V -55 to +125ºC
TDK C3216X5R1C106K 10 µF ±10% 16V -55 to +85ºC
Panasonic ECJ-3YX1C106K 10 µF ±10% 16V -55 to +125ºC
Panasonic ECJ-4YB1C106K 10 µF ±10% 16V -55 to +85ºC
Murata GRM32DR71C106KA01L 10 µF ±10% 16V -55 to +125ºC
Murata GRM31CR61C106KC31L 10 µF ±10% 16V -55 to +85ºC
Ceramic capacitors are suitable for use with the inter- -30
-40
nal voltage regulator of this microcontroller. However, -50
10V Capacitor
some care is needed in selecting the capacitor to -60
-70
6.3V Capacitor
ensure that it maintains sufficient capacitance over the -80
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
intended operating range of the application.
DC Bias Voltage (VDC)
Typical low-cost, 10 F ceramic capacitors are available
in X5R, X7R and Y5V dielectric ratings (other types are
also available, but are less common). The initial toler- When selecting a ceramic capacitor to be used with the
ance specifications for these types of capacitors are internal voltage regulator, it is suggested to select a
often specified as ±10% to ±20% (X5R and X7R), or high-voltage rating, so that the operating voltage is a
-20%/+80% (Y5V). However, the effective capacitance small percentage of the maximum rated capacitor volt-
that these capacitors provide in an application circuit will age. For example, choose a ceramic capacitor rated at
also vary based on additional factors, such as the 16V for the 2.5V or 1.8V core voltage. Suggested
applied DC bias voltage and the temperature. The total capacitors are shown in Table 2-1.
in-circuit tolerance is, therefore, much wider than the
initial tolerance specification. 2.5 ICSP Pins
The X5R and X7R capacitors typically exhibit satisfac- The PGECx and PGEDx pins are used for In-Circuit
tory temperature stability (ex: ±15% over a wide Serial Programming (ICSP) and debugging purposes.
temperature range, but consult the manufacturer’s data It is recommended to keep the trace length between
sheets for exact specifications). However, Y5V capaci- the ICSP connector and the ICSP pins on the device as
tors typically have extreme temperature tolerance short as possible. If the ICSP connector is expected to
specifications of +22%/-82%. Due to the extreme tem- experience an ESD event, a series resistor is recom-
perature tolerance, a 10 F nominal rated Y5V type mended, with the value in the range of a few tens of
capacitor may not deliver enough total capacitance to ohms, not to exceed 100Ω.
meet minimum internal voltage regulator stability and
transient response requirements. Therefore, Y5V Pull-up resistors, series diodes and capacitors on the
capacitors are not recommended for use with the PGECx and PGEDx pins are not recommended as they
internal regulator if the application must operate over a will interfere with the programmer/debugger communi-
wide temperature range. cations to the device. If such discrete components are
an application requirement, they should be removed
In addition to temperature tolerance, the effective from the circuit during programming and debugging.
capacitance of large value ceramic capacitors can vary Alternatively, refer to the AC/DC characteristics and
substantially, based on the amount of DC voltage timing requirements information in the respective
applied to the capacitor. This effect can be very signifi- device Flash programming specification for information
cant, but is often overlooked or is not always on capacitive loading limits and pin input voltage high
documented. (VIH) and input low (VIL) requirements.
Typical DC bias voltage vs. capacitance graph for X7R For device emulation, ensure that the “Communication
type capacitors is shown in Figure 2-4. Channel Select” (i.e., PGECx/PGEDx pins),
programmed into the device, matches the physical
connections for the ICSP to the Microchip
debugger/emulator tool.
For more information on available Microchip
development tools connection requirements, refer to
Section 25.0 “Development Support”.
DEVICE PINS
Data Bus
Interrupt
Controller
16
8 16 16
Data Latch
23
PCH PCL Data RAM 16
23
Program Counter
Stack Loop Address
Control Control Latch
Logic Logic
23 16
RAGU
Address Latch WAGU
Program Memory
Control Signals
to Various Blocks Hardware
Multiplier 16 x 16
Divide W Register Array
Support 16
16-Bit ALU
16
To Peripheral Modules
7 0
TBLPAG Table Memory Page
Address Register
7 0
Program Space Visibility
PSVPAG Page Address Register
15 0
Repeat Loop Counter
RCOUNT Register
15 SRH SRL 0
IPL
— — — — — — — DC
2 1 0
RA N OV Z C ALU STATUS Register (SR)
15 0
— — — — — — — — — — — — IPL3 PSV — — CPU Control Register (CORCON)
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Note 1: The IPL Status bits are read-only when NSTDIS (INTCON1<15>) = 1.
2: The IPL Status bits are concatenated with the IPL3 bit (CORCON<3>) to form the CPU Interrupt Priority
Level (IPL). The value in parentheses indicates the IPL when IPL3 = 1.
3.3 Arithmetic Logic Unit (ALU) The PIC24F CPU incorporates hardware support for
both multiplication and division. This includes a
The PIC24F ALU is 16 bits wide, and is capable of addi- dedicated hardware multiplier and support hardware
tion, subtraction, bit shifts and logic operations. Unless for 16-bit divisor division.
otherwise mentioned, arithmetic operations are 2’s
complement in nature. Depending on the operation, the 3.3.1 MULTIPLIER
ALU may affect the values of the Carry (C), Zero (Z),
The ALU contains a high-speed, 17-bit x 17-bit
Negative (N), Overflow (OV) and Digit Carry (DC)
multiplier. It supports unsigned, signed or mixed sign
Status bits in the SR register. The C and DC Status bits
operation in several multiplication modes:
operate as Borrow and Digit Borrow bits, respectively,
for subtraction operations. 1. 16-bit x 16-bit signed
The ALU can perform 8-bit or 16-bit operations, 2. 16-bit x 16-bit unsigned
depending on the mode of the instruction that is used. 3. 16-bit signed x 5-bit (literal) unsigned
Data for the ALU operation can come from the W 4. 16-bit unsigned x 16-bit unsigned
register array, or data memory, depending on the 5. 16-bit unsigned x 5-bit (literal) unsigned
addressing mode of the instruction. Likewise, output
6. 16-bit unsigned x 16-bit signed
data from the ALU can be written to the W register array
or a data memory location. 7. 8-bit unsigned x 8-bit unsigned
TABLE 3-2: INSTRUCTIONS THAT USE THE SINGLE AND MULTI-BIT SHIFT OPERATION
Instruction Description
ASR Arithmetic shift right source register by one or more bits.
SL Shift left source register by one or more bits.
LSR Logical shift right source register by one or more bits.
FIGURE 4-1: PROGRAM SPACE MEMORY MAP FOR PIC24FJ64GA004 FAMILY DEVICES
7FFFFFh
800000h
F7FFFEh
F80000h
Device Config Registers Device Config Registers Device Config Registers Device Config Registers
F8000Eh
F80010h
FEFFFEh
DEVID (2) FF0000h
DEVID (2) DEVID (2) DEVID (2)
FFFFFFh
FIGURE 4-3: DATA SPACE MEMORY MAP FOR PIC24FJ64GA004 FAMILY DEVICES(1)
MSB LSB
Address MSB LSB Address
0001h 0000h SFR
SFR Space
07FFh 07FEh Space
0801h 0800h
Near
Data Space
Data RAM
Implemented
Data RAM
1FFFh 1FFEh
2001h 2000h
27FFh(2) 27FEh(2)
2801h 2800h
Unimplemented
Read as ‘0’
7FFFh 7FFFh
8001h 8000h
Program Space
Visibility Area
FFFFh FFFEh
PIC24FJ64GA004 FAMILY
WREG14 001C Working Register 14 0000
WREG15 001E Working Register 15 0800
SPLIM 0020 Stack Pointer Limit Value Register xxxx
PCL 002E Program Counter Low Byte Register 0000
PCH 0030 — — — — — — — — Program Counter Register High Byte 0000
TBLPAG 0032 — — — — — — — — Table Memory Page Address Register 0000
PSVPAG 0034 — — — — — — — — Program Space Visibility Page Address Register 0000
RCOUNT 0036 Repeat Loop Counter Register xxxx
SR 0042 — — — — — — — DC IPL2 IPL1 IPL0 RA N OV Z C 0000
CORCON 0044 — — — — — — — — — — — — IPL3 PSV — — 0000
DISICNT 0052 — — Disable Interrupts Counter Register xxxx
Legend: — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal.
CNEN1 0060 CN15IE CN14IE CN13IE CN12IE CN11IE CN10IE(1) CN9IE(1) CN8IE(1) CN7IE CN6IE CN5IE CN4IE CN3IE CN2IE CN1IE CN0IE 0000
(1) (1) (1)
CNEN2 0062 — CN30IE CN29IE CN28IE CN27IE CN26IE CN25IE CN24IE CN23IE CN22IE CN21IE CN20IE(1) CN19IE(1) CN18IE(1) CN17IE(1) CN16IE 0000
CNPU1 0068 CN15PUE CN14PUE CN13PUE CN12PUE CN11PUE CN10PUE(1) CN9PUE(1) CN8PUE(1) CN7PUE CN6PUE CN5PUE CN4PUE CN3PUE CN2PUE CN1PUE CN0PUE 0000
CNPU2 006A — CN30PUE CN29PUE CN28PUE(1) CN27PUE CN26PUE(1) CN25PUE(1) CN24PUE CN23PUE CN22PUE CN21PUE CN20PUE(1) CN19PUE(1) CN18PUE(1) CN17PUE(1) CN16PUE 0000
Legend: — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal.
Note 1: These bits are not available on 28-pin devices; read as ‘0’.
DS39881E-page 34
PIC24FJ64GA004 FAMILY
TABLE 4-5: INTERRUPT CONTROLLER REGISTER MAP
File All
Addr Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Name Resets
PIC24FJ64GA004 FAMILY
PR5 011C Timer5 Period Register FFFF
T4CON 011E TON — TSIDL — — — — — — TGATE TCKPS1 TCKPS0 T32 — TCS — 0000
T5CON 0120 TON — TSIDL — — — — — — TGATE TCKPS1 TCKPS0 — — TCS — 0000
Legend: — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal.
IC4CON 014E — — ICSIDL — — — — — ICTMR ICI1 ICI0 ICOV ICBNE ICM2 ICM1 ICM0 0000
IC5BUF 0150 Input Capture 5 Register FFFF
IC5CON 0152 — — ICSIDL — — — — — ICTMR ICI1 ICI0 ICOV ICBNE ICM2 ICM1 ICM0 0000
Legend: — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal.
DS39881E-page 36
PIC24FJ64GA004 FAMILY
TABLE 4-8: OUTPUT COMPARE REGISTER MAP
File All
Addr Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Name Resets
I2C1STAT 0208 ACKSTAT TRSTAT — — — BCL GCSTAT ADD10 IWCOL I2COV D/A P S R/W RBF TBF 0000
I2C1ADD 020A — — — — — — I2C1 Address Register 0000
I2C1MSK 020C — — — — — — AMSK9 AMSK8 AMSK7 AMSK6 AMSK5 AMSK4 AMSK3 AMSK2 AMSK1 AMSK0 0000
I2C2RCV 0210 — — — — — — — — I2C2 Receive Register 0000
I2C2TRN 0212 — — — — — — — — I2C2 Transmit Register 00FF
I2C2BRG 0214 — — — — — — — Baud Rate Generator Register 2 0000
I2C2CON 0216 I2CEN — I2CSIDL SCLREL IPMIEN A10M DISSLW SMEN GCEN STREN ACKDT ACKEN RCEN PEN RSEN SEN 1000
I2C2STAT 0218 ACKSTAT TRSTAT — — — BCL GCSTAT ADD10 IWCOL I2COV D/A P S R/W RBF TBF 0000
I2C2ADD 021A — — — — — — I2C2 Address Register 0000
I2C2MSK 021C — — — — — — AMSK9 AMSK8 AMSK7 AMSK6 AMSK5 AMSK4 AMSK3 AMSK2 AMSK1 AMSK0 0000
Legend: — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal.
2010-2013 Microchip Technology Inc.
U1MODE 0220 UARTEN — USIDL IREN RTSMD — UEN1 UEN0 WAKE LPBACK ABAUD RXINV BRGH PDSEL1 PDSEL0 STSEL 0000
U1STA 0222 UTXISEL1 UTXINV UTXISEL0 — UTXBRK UTXEN UTXBF TRMT URXISEL1 URXISEL0 ADDEN RIDLE PERR FERR OERR URXDA 0110
U1TXREG 0224 — — — — — — — UTX8 UTX7 UTX6 UTX5 UTX4 UTX3 UTX2 UTX1 UTX0 0000
U1RXREG 0226 — — — — — — — URX8 URX7 URX6 URX5 URX4 URX3 URX2 URX1 URX0 0000
U1BRG 0228 Baud Rate Generator Prescaler Register 0000
U2MODE 0230 UARTEN — USIDL IREN RTSMD — UEN1 UEN0 WAKE LPBACK ABAUD RXINV BRGH PDSEL1 PDSEL0 STSEL 0000
U2STA 0232 UTXISEL1 UTXINV UTXISEL0 — UTXBRK UTXEN UTXBF TRMT URXISEL1 URXISEL0 ADDEN RIDLE PERR FERR OERR URXDA 0110
U2TXREG 0234 — — — — — — — UTX8 UTX7 UTX6 UTX5 UTX4 UTX3 UTX2 UTX1 UTX0 0000
U2RXREG 0236 — — — — — — — URX8 URX7 URX6 URX5 URX4 URX3 URX2 URX1 URX0 0000
U2BRG 0238 Baud Rate Generator Prescaler 0000
Legend: — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal.
PIC24FJ64GA004 FAMILY
File All
Addr Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Name Resets
SPI1STAT 0240 SPIEN — SPISIDL — — SPIBEC2 SPIBEC1 SPIBEC0 SRMPT SPIROV SRXMPT SISEL2 SISEL1 SISEL0 SPITBF SPIRBF 0000
SPI1CON1 0242 — — — DISSCK DISSDO MODE16 SMP CKE SSEN CKP MSTEN SPRE2 SPRE1 SPRE0 PPRE1 PPRE0 0000
SPI1CON2 0244 FRMEN SPIFSD SPIFPOL — — — — — — — — — — — SPIFE SPIBEN 0000
SPI1BUF 0248 SPI1 Transmit/Receive Buffer 0000
SPI2STAT 0260 SPIEN — SPISIDL — — SPIBEC2 SPIBEC1 SPIBEC0 SRMPT SPIROV SRXMPT SISEL2 SISEL1 SISEL0 SPITBF SPIRBF 0000
SPI2CON1 0262 — — — DISSCK DISSDO MODE16 SMP CKE SSEN CKP MSTEN SPRE2 SPRE1 SPRE0 PPRE1 PPRE0 0000
SPI2CON2 0264 FRMEN SPIFSD SPIFPOL — — — — — — — — — — — SPIFE SPIBEN 0000
SPI2BUF 0268 SPI2 Transmit/Receive Buffer 0000
Legend: — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal.
DS39881E-page 37
DS39881E-page 38
PIC24FJ64GA004 FAMILY
TABLE 4-12: PORTA REGISTER MAP
File All
Addr Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Name Resets
TRISA 02C0 — — — — — TRISA10(1) TRISA9(1) TRISA8(1) TRISA7(1) — — TRISA4 TRISA3(2) TRISA2(3) TRISA1 TRISA0 079F
PORTA 02C2 — — — — — RA10(1) RA9(1) RA8(1) RA7(1) — — RA4 RA3(2) RA2(3) RA1 RA0 0000
LATA 02C4 — — — — — LATA10(1) LATA9(1) LATA8(1) LATA7(1) — — LATA4 LATA3(2) LATA2(3) LATA1 LATA0 0000
ODCA 02C6 — — — — — ODA10(1) ODA9(1) ODA8(1) ODA7(1) — — ODA4 ODA3(2) ODA2(3) ODA1 ODA0 0000
Legend: — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal.
Note 1: These bits are not available on 28-pin devices; read as ‘0’.
2: These bits are only available when the primary oscillator is disabled (POSCMD<1:0> = 00); otherwise, read as ‘0’.
3: These bits are only available when the primary oscillator is disabled or EC mode is selected (POSCMD<1:0> = 00 or 11) and CLKO is disabled (OSCIOFNC = 0); otherwise, read as ‘0’.
TRISB 02C8 TRISB15 TRISB14 TRISB13 TRISB12 TRISB11 TRISB10 TRISB9 TRISB8 TRISB7 TRISB6 TRISB5 TRISB4 TRISB3 TRISB2 TRISB1 TRISB0 FFFF
PORTB 02CA RB15 RB14 RB13 RB12 RB11 RB10 RB9 RB8 RB7 RB6 RB5 RB4 RB3 RB2 RB1 RB0 0000
LATB 02CC LATB15 LATB14 LATB13 LATB12 LATB11 LATB10 LATB9 LATB8 LATB7 LATB6 LATB5 LATB4 LATB3 LATB2 LATB1 LATB0 0000
ODCB 02CE ODB15 ODB14 ODB13 ODB12 ODB11 ODB10 ODB9 ODB8 ODB7 ODB6 ODB5 ODB4 ODB3 ODB2 ODB1 ODB0 0000
Legend: — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal.
TRISC(1) 02D0 — — — — — — TRISC9 TRISC8 TRISC7 TRISC6 TRISC5 TRISC4 TRISC3 TRISC2 TRISC1 TRISC0 03FF
PORTC(1) 02D2 — — — — — — RC9 RC8 RC7 RC6 RC5 RC4 RC3 RC2 RC1 RC0 0000
LATC(1) 02D4 — — — — — — LATC9 LATC8 LATC7 LATC6 LATC5 LATC4 LATC3 LATC2 LATC1 LATC0 0000
ODCC(1) 02D6 — — — — — — ODC9 OSC8 ODC7 ODC6 ODC5 ODC4 ODC3 ODC2 ODC1 ODC0
2010-2013 Microchip Technology Inc.
0000
Legend: — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal.Bits are not available on 28-pin devices; read as ‘0’.
PIC24FJ64GA004 FAMILY
ADC1BUFE 031C A/D Data Buffer 14 xxxx
ADC1BUFF 031E A/D Data Buffer 15 xxxx
AD1CON1 0320 ADON — ADSIDL — — — FORM1 FORM0 SSRC2 SSRC1 SSRC0 — — ASAM SAMP DONE 0000
AD1CON2 0322 VCFG2 VCFG1 VCFG0 — — CSCNA — — BUFS — SMPI3 SMPI2 SMPI1 SMPI0 BUFM ALTS 0000
AD1CON3 0324 ADRC — — SAMC4 SAMC3 SAMC2 SAMC1 SAMC0 ADCS7 ADCS6 ADCS5 ADCS4 ADCS3 ADCS2 ADCS1 ADCS0 0000
AD1CHS 0328 CH0NB — — — CH0SB3 CH0SB2 CH0SB1 CH0SB0 CH0NA — — — CH0SA3 CH0SA2 CH0SA1 CH0SA0 0000
AD1PCFG 032C PCFG15 — — PCFG12 PCFG11 PCFG10 PCFG9 PCFG8(1) PCFG7(1) PCFG6(1) PCFG5 PCFG4 PCFG3 PCFG2 PCFG1 PCFG0 0000
AD1CSSL 0330 CSSL15 — — CSSL12 CSSL11 CSSL10 CSSL9 CSSL8(1) CSSL7(1) CSSL6(1) CSSL5 CSSL4 CSSL3 CSSL2 CSSL1 CSSL0 0000
Legend: — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal.
Note 1: These bits are not available on 28-pin devices; read as ‘0’.
DS39881E-page 39
TABLE 4-17: PARALLEL MASTER/SLAVE PORT REGISTER MAP
DS39881E-page 40
PIC24FJ64GA004 FAMILY
File All
Addr Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Name Resets
PMCON 0600 PMPEN — PSIDL ADRMUX1 ADRMUX0 PTBEEN PTWREN PTRDEN CSF1 CSF0 ALP — CS1P BEP WRSP RDSP 0000
PMMODE 0602 BUSY IRQM1 IRQM0 INCM1 INCM0 MODE16 MODE1 MODE0 WAITB1 WAITB0 WAITM3 WAITM2 WAITM1 WAITM0 WAITE1 WAITE0 0000
PMADDR 0604 — CS1 — — — ADDR10 ADDR9 ADDR8 ADDR7 ADDR6 ADDR5 ADDR4 ADDR3 ADDR2 ADDR1 ADDR0 0000
PMDOUT1 Parallel Port Data Out Register 1 (Buffers 0 and 1) 0000
PMDOUT2 0606 Parallel Port Data Out Register 2 (Buffers 2 and 3) 0000
PMDIN1 0608 Parallel Port Data In Register 1 (Buffers 0 and 1) 0000
PMDIN2 060A Parallel Port Data In Register 2 (Buffers 2 and 3) 0000
PMAEN 060C — PTEN14 — — — PTEN10 PTEN9 PTEN8 PTEN7 PTEN6 PTEN5 PTEN4 PTEN3 PTEN2 PTEN1 PTEN0 0000
PMSTAT 060E IBF IBOV — — IB3F IB2F IB1F IB0F OBE OBUF — — OB3E OB2E OB1E OB0E 0000
Legend: — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal.
CMCON 0630 CMIDL — C2EVT C1EVT C2EN C1EN C2OUTEN C1OUTEN C2OUT C1OUT C2INV C1INV C2NEG C2POS C1NEG C1POS 0000
2010-2013 Microchip Technology Inc.
CVRCON 0632 — — — — — — — — CVREN CVROE CVRR CVRSS CVR3 CVR2 CVR1 CVR0 0000
Legend: — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal.
CRCCON 0640 — — CSIDL VWORD4 VWORD3 VWORD2 VWORD1 VWORD0 CRCFUL CRCMPT — CRCGO PLEN3 PLEN2 PLEN1 PLEN0 0040
CRCXOR 0642 X15 X14 X13 X12 X11 X10 X9 X8 X7 X6 X5 X4 X3 X2 X1 — 0000
CRCDAT 0644 CRC Data Input Register 0000
CRCWDAT 0646 CRC Result Register 0000
Legend: — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal.
2010-2013 Microchip Technology Inc.
PIC24FJ64GA004 FAMILY
RPOR0 06C0 — — — RP1R4 RP1R3 RP1R2 RP1R1 RP1R0 — — — RP0R4 RP0R3 RP0R2 RP0R1 RP0R0 0000
RPOR1 06C2 — — — RP3R4 RP3R3 RP3R2 RP3R1 RP3R0 — — — RP2R4 RP2R3 RP2R2 RP2R1 RP2R0 0000
RPOR2 06C4 — — — RP5R4 RP5R3 RP5R2 RP5R1 RP5R0 — — — RP4R4 RP4R3 RP4R2 RP4R1 RP4R0 0000
RPOR3 06C6 — — — RP7R4 RP7R3 RP7R2 RP7R1 RP7R0 — — — RP6R4 RP6R3 RP6R2 RP6R1 RP6R0 0000
RPOR4 06C8 — — — RP9R4 RP9R3 RP9R2 RP9R1 RP9R0 — — — RP8R4 RP8R3 RP8R2 RP8R1 RP8R0 0000
RPOR5 06CA — — — RP11R4 RP11R3 RP11R2 RP11R1 RP11R0 — — — RP10R4 RP10R3 RP10R2 RP10R1 RP10R0 0000
RPOR6 06CC — — — RP13R4 RP13R3 RP13R2 RP13R1 RP13R0 — — — RP12R4 RP12R3 RP12R2 RP12R1 RP12R0 0000
RPOR7 06CE — — — RP15R4 RP15R3 RP15R2 RP15R1 RP15R0 — — — RP14R4 RP14R3 RP14R2 RP14R1 RP14R0 0000
RPOR8 06D0 — — — RP17R4(1) RP17R3(1) RP17R2(1) RP17R1(1) RP17R0(1) — — — RP16R4(1) RP16R3(1) RP16R2(1) RP16R1(1) RP16R0(1) 0000
RPOR9 06D2 — — — RP19R4(1) RP19R3(1) RP19R2(1) RP19R1(1) RP19R0(1) — — — RP18R4(1) RP18R3(1) RP18R2(1) RP18R1(1) RP18R0(1) 0000
RPOR10 06D4 — — — RP21R4(1) RP21R3(1) RP21R2(1) RP21R1(1) RP21R0(1) — — — RP20R4(1) RP20R3(1) RP20R2(1) RP20R1(1) RP20R0(1) 0000
RPOR11 06D6 — — — RP23R4(1) RP23R3(1) RP23R2(1) RP23R1(1) RP23R0(1) — — — RP22R4(1) RP22R3(1) RP22R2(1) RP22R1(1) RP22R0(1) 0000
RPOR12 06D8 — — — RP25R4(1) RP25R3(1) RP25R2(1) RP25R1(1) RP25R0(1) — — — RP24R4(1) RP24R3(1) RP24R2(1) RP24R1(1) RP24R0(1) 0000
Legend: — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal.
Note 1: These bits are only available on 44-pin devices; otherwise, they read as ‘0’.
DS39881E-page 41
DS39881E-page 42
PIC24FJ64GA004 FAMILY
TABLE 4-22: CLOCK CONTROL REGISTER MAP
File All
Addr Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Name Resets
RCON 0740 TRAPR IOPUWR — — — — CM PMSLP EXTR SWR SWDTEN WDTO SLEEP IDLE BOR POR (Note 1)
OSCCON 0742 — COSC2 COSC1 COSC0 — NOSC2 NOSC1 NOSC0 CLKLOCK IOLOCK LOCK — CF — SOSCEN OSWEN (Note 2)
CLKDIV 0744 ROI DOZE2 DOZE1 DOZE0 DOZEN RCDIV2 RCDIV1 RCDIV0 — — — — — — — — 3140
OSCTUN 0748 — — — — — — — — — — TUN5 TUN4 TUN3 TUN2 TUN1 TUN0 0000
Legend: — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal.
Note 1: RCON register Reset values are dependent on the type of Reset.
2: OSCCON register Reset values are dependent on configuration fuses and by the type of Reset.
NVMCON 0760 WR WREN WRERR — — — — — — ERASE — — NVMOP3 NVMOP2 NVMOP1 NVMOP0 0000(1)
NVMKEY 0766 — — — — — — — — NVMKEY<7:0> 0000
Legend: — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal.
Note 1: Reset value shown is for a POR only. The value on other Reset states is dependent on the state of the memory write or erase operations at the time of Reset.
PMD1 0770 T5MD T4MD T3MD T2MD T1MD — — — I2C1MD U2MD U1MD SPI2MD SPI1MD — — ADC1MD 0000
PMD2 0772 — — — IC5MD IC4MD IC3MD IC2MD IC1MD — — — OC5MD OC4MD OC3MD OC2MD OC1MD 0000
PMD3 0774 — — — — — CMPMD RTCCMD PMPMD CRCPMD — — — — — I2C2MD — 0000
Legend: — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal.
2010-2013 Microchip Technology Inc.
PIC24FJ64GA004 FAMILY
4.2.5 SOFTWARE STACK 4.3 Interfacing Program and Data
In addition to its use as a working register, the W15 Memory Spaces
register in PIC24F devices is also used as a Software The PIC24F architecture uses a 24-bit wide program
Stack Pointer. The pointer always points to the first space and 16-bit wide data space. The architecture is
available free word and grows from lower to higher also a modified Harvard scheme, meaning that data
addresses. It pre-decrements for stack pops and can also be present in the program space. To use this
post-increments for stack pushes, as shown in data successfully, it must be accessed in a way that
Figure 4-4. Note that for a PC push during any CALL preserves the alignment of information in both spaces.
instruction, the MSB of the PC is zero-extended before
the push, ensuring that the MSB is always clear. Aside from normal execution, the PIC24F architecture
provides two methods by which program space can be
Note: A PC push during exception processing accessed during operation:
will concatenate the SRL register to the
• Using table instructions to access individual bytes
MSB of the PC prior to the push.
or words anywhere in the program space
The Stack Pointer Limit Value register (SPLIM), associ- • Remapping a portion of the program space into
ated with the Stack Pointer, sets an upper address the data space (Program Space Visibility)
boundary for the stack. SPLIM is uninitialized at Reset.
Table instructions allow an application to read or write
As is the case for the Stack Pointer, SPLIM<0> is
to small areas of the program memory. This makes the
forced to ‘0’ because all stack operations must be
method ideal for accessing data tables that need to be
word-aligned. Whenever an EA is generated using
updated from time to time. It also allows access to all
W15 as a source or destination pointer, the resulting
bytes of the program word. The remapping method
address is compared with the value in SPLIM. If the
allows an application to access a large block of data on
contents of the Stack Pointer (W15) and the SPLIM
a read-only basis, which is ideal for look-ups from a
register are equal, and a push operation is performed,
large table of static data. It can only access the least
a stack error trap will not occur. The stack error trap will
significant word of the program word.
occur on a subsequent push operation. Thus, for
example, if it is desirable to cause a stack error trap 4.3.1 ADDRESSING PROGRAM SPACE
when the stack grows beyond address 2000h in RAM,
initialize the SPLIM with the value, 1FFEh. Since the address ranges for the data and program
spaces are 16 and 24 bits, respectively, a method is
Similarly, a Stack Pointer underflow (stack error) trap is needed to create a 23-bit or 24-bit program address
generated when the Stack Pointer address is found to from 16-bit data registers. The solution depends on the
be less than 0800h. This prevents the stack from interface method to be used.
interfering with the Special Function Register (SFR)
space. For table operations, the 8-bit Table Memory Page
Address register (TBLPAG) is used to define a 32K word
A write to the SPLIM register should not be immediately region within the program space. This is concatenated
followed by an indirect read operation using W15. with a 16-bit EA to arrive at a full 24-bit program space
address. In this format, the Most Significant bit of
FIGURE 4-4: CALL STACK FRAME TBLPAG is used to determine if the operation occurs in
the user memory (TBLPAG<7> = 0) or the configuration
0000h 15 0 memory (TBLPAG<7> = 1).
For remapping operations, the 8-bit Program Space
Visibility Page Address register (PSVPAG) is used to
Stack Grows Towards
23 Bits
EA 1/0
8 Bits 16 Bits
24 Bits
Select
1 EA 0
Program Space Visibility(1)
(Remapping)
0 PSVPAG
8 Bits 15 Bits
23 Bits
Note 1: The LSb of program space addresses is always fixed as ‘0’ in order to maintain word
alignment of data in the program and data spaces.
2: Table operations are not required to be word-aligned. Table read operations are permitted
in the configuration memory space.
‘Phantom’ Byte
TBLRDH.B (Wn<0> = 0)
TBLRDL.B (Wn<0> = 1)
TBLRDL.B (Wn<0> = 0)
TBLRDL.W
PSV Area
...while the lower
15 bits of the EA
specify an exact
FFFFh address within the
PSV area. This corre-
sponds exactly to the
same lower 15 bits of
the actual program
800000h
space address.
24 Bits
Using
Program 0 Program Counter 0
Counter
Working Reg EA
User/Configuration Byte
Space Select 24-Bit EA Select
MOV #LOW_WORD_N, W2 ;
MOV #HIGH_BYTE_N, W3 ;
TBLWTL W2, [W0] ; Write PM low word into program latch
TBLWTH W3, [W0++] ; Write PM high byte into program latch
RESET
Instruction
Glitch Filter
MCLR
WDT
Module
Sleep or Idle
Brown-out BOR
Reset
Trap Conflict
Illegal Opcode
Configuration Mismatch
Uninitialized W Register
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Note 1: All of the Reset status bits may be set or cleared in software. Setting one of these bits in software does not
cause a device Reset.
2: If the FWDTEN Configuration bit is ‘1’ (unprogrammed), the WDT is always enabled, regardless of the
SWDTEN bit setting.
Note 1: All of the Reset status bits may be set or cleared in software. Setting one of these bits in software does not
cause a device Reset.
2: If the FWDTEN Configuration bit is ‘1’ (unprogrammed), the WDT is always enabled, regardless of the
SWDTEN bit setting.
—
—
—
Interrupt Vector 116 0000FCh
Interrupt Vector 117 0000FEh
Reserved 000100h
Reserved 000102h
Reserved
Oscillator Fail Trap Vector
Address Error Trap Vector
Stack Error Trap Vector
Math Error Trap Vector
Reserved
Reserved
Reserved
Interrupt Vector 0 000114h
Interrupt Vector 1
—
—
— Alternate Interrupt Vector Table (AIVT)(1)
Interrupt Vector 52 00017Ch
Interrupt Vector 53 00017Eh
Interrupt Vector 54 000180h
—
—
—
Interrupt Vector 116
Interrupt Vector 117 0001FEh
Start of Code 000200h
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Note 1: See Register 3-1 for the description of the remaining bit(s) that are not dedicated to interrupt control functions.
2: The IPLx bits are concatenated with the IPL3 bit (CORCON<3>) to form the CPU interrupt Priority Level.
The value in parentheses indicates the Interrupt Priority Level if IPL3 = 1.
3: The IPLx Status bits are read-only when NSTDIS (INTCON1<15>) = 1.
Note 1: See Register 3-2 for the description of the remaining bit(s) that are not dedicated to interrupt control functions.
2: The IPL3 bit is concatenated with the IPL<2:0: bits (SR<7:5>) to form the CPU Interrupt priority Level.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Note 1: If INTxIE = 1, this external interrupt input must be configured to an available RPn pin. See Section 10.4
“Peripheral Pin Select (PPS)” for more information.
Note 1: If INTxIE = 1, this external interrupt input must be configured to an available RPn pin. See Section 10.4
“Peripheral Pin Select (PPS)” for more information.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Note 1: If INTxIE = 1, this external interrupt input must be configured to an available RPn pin. See Section 10.4
“Peripheral Pin Select (PPS)” for more information.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
XT, HS, EC
OSCI CLKO
Postscaler
CPU
8 MHz
Postscaler
4 MHz
FRC FRCDIV
Oscillator 8 MHz
(nominal)
Peripherals
CLKDIV<10:8>
FRC
LPRC LPRC
Oscillator 31 kHz (nominal)
Secondary Oscillator
SOSC
SOSCI
SOSCEN
Enable
SOSCO Oscillator Clock Control Logic
Fail-Safe
Clock
Monitor
WDT, PWRT
Note 1: Reset values for these bits are determined by the FNOSCx Configuration bits.
2: The state of the IOLOCK bit can only be changed once an unlocking sequence has been executed. In
addition, if the IOL1WAY Configuration bit is ‘1’ once the IOLOCK bit is set, it cannot be cleared.
3: Also resets to ‘0’ during any valid clock switch or whenever a non-PLL Clock mode is selected.
Note 1: Reset values for these bits are determined by the FNOSCx Configuration bits.
2: The state of the IOLOCK bit can only be changed once an unlocking sequence has been executed. In
addition, if the IOL1WAY Configuration bit is ‘1’ once the IOLOCK bit is set, it cannot be cleared.
3: Also resets to ‘0’ during any valid clock switch or whenever a non-PLL Clock mode is selected.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Note 1: This bit is automatically cleared when the ROI bit is set and an interrupt occurs.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Note 1: Increments or decrements of TUN<5:0> may not change the FRC frequency in equal steps over the FRC
tuning range and may not be monotonic.
1 Output Data
PIO Module
Read TRIS 0
Data Bus
D Q I/O Pin
WR TRIS
CK
TRIS Latch
D Q
WR LAT +
CK
WR PORT
Data Latch
Read LAT
Input Data
Read PORT
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Note 1: These bits are only available on the 44-pin devices; otherwise, they read as ‘0’.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Note 1: These bits are only available on the 44-pin devices; otherwise, they read as ‘0’.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Note 1: These bits are only available on the 44-pin devices; otherwise, they read as ‘0’.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Note 1: These bits are only available on the 44-pin devices; otherwise, they read as ‘0’.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Note 1: These bits are only available on the 44-pin devices; otherwise, they read as ‘0’.
TCKPS<1:0>
SOSCO/ TON 2
1x
T1CK
Gate Prescaler
SOSCEN Sync 01 1, 8, 64, 256
SOSCI
TCY 00
TGATE
TGATE TCS
1 Q D
Set T1IF
0 Q CK
0
Reset
TMR1
1 Sync
Comparator TSYNC
Equal
PR1
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
TCKPS<1:0>
T2CK TON 2
1x
(T4CK)
Gate Prescaler
Sync 01 1, 8, 64, 256
TCY 00
TGATE TGATE(2)
TCS(2)
1 Q D
Set T3IF (T5IF)
Q CK
0
PR3 PR2
(PR5) (PR4)
MSB LSB
TMR3 TMR2
(TMR4) Sync
Reset (TMR5)
16
Data Bus<15:0>
Note 1: The 32-Bit Timer Configuration bit, T32, must be set for 32-bit timer/counter operation. All control bits are
respective to the T2CON and T4CON registers.
2: This peripheral’s inputs must be assigned to an available RPn pin before use. Please see
Section 10.4 “Peripheral Pin Select (PPS)” for more information.
3: The A/D Event Trigger is available only on Timer2/3.
TCKPS<1:0>
TON 2
T2CK 1x
(T4CK)
Gate Prescaler
Sync 01 1, 8, 64, 256
TGATE 00
TCY TCS(1)
1 Q D TGATE(1)
Set T2IF (T4IF)
0 Q CK
Reset
TMR2 (TMR4) Sync
Comparator
Equal
PR2 (PR4)
Note 1: This peripheral’s inputs must be assigned to an available RPn pin before use. Please see
Section 10.4 “Peripheral Pin Select (PPS)” for more information.
TCKPS<1:0>
T3CK TON 2
(T5CK) Sync 1x
Prescaler
01 1, 8, 64, 256
TGATE 00
TCY TCS(1)
1 Q D TGATE(1)
Set T3IF (T5IF) Q CK
0
Reset
TMR3 (TMR5)
PR3 (PR5)
Note 1: This peripheral’s inputs must be assigned to an available RPn pin before use. Please see
Section 10.4 “Peripheral Pin Select (PPS)” for more information.
2: The A/D Event Trigger is available only on Timer3.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Note 1: In 32-bit mode, the T3CON or T5CON control bits do not affect 32-bit timer operation.
2: If TCS = 1, RPINRx (TxCK) must be configured to an available RPn pin. For more information, see
Section 10.4 “Peripheral Pin Select (PPS)”.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Note 1: When 32-bit operation is enabled (T2CON<3> or T4CON<3> = 1), these bits have no effect on Timery
operation; all timer functions are set through T2CON and T4CON.
2: If TCS = 1, RPINRx (TxCK) must be configured to an available RPn pin. See Section 10.4 “Peripheral
Pin Select (PPS)” for more information.
16 16
1 0 ICTMR
(ICxCON<7>)
Prescaler Edge Detection Logic FIFO
Counter and R/W
(1, 4, 16) Clock Synchronizer Logic
ICx Pin
ICM<2:0> (ICxCON<2:0>)
3 Mode Select
FIFO
ICOV, ICBNE (ICxCON<4:3>)
ICxBUF
ICI<1:0>
Interrupt
ICxCON Logic
System Bus
Set Flag ICxIF
(in IFSx Register)
Note 1: An ‘x’ in a signal, register or bit name denotes the number of the capture channel.
2: This peripheral’s inputs must be assigned to an available RPn pin before use. Please see Section 10.4
“Peripheral Pin Select (PPS)” for more information.
Note 1: RPINRx (ICxRx) must be configured to an available RPn pin. For more information, see Section 10.4
“Peripheral Pin Select (PPS)”.
The PWM period is specified by writing to PRy, the See Example 14-1 for PWM mode timing details.
Timery Period register. The PWM period can be Table 14-1 and Table 14-2 show example PWM
calculated using Equation 14-1. frequencies and resolutions for a device operating at
4 and 16 MIPS.
log10 (F PWM
FCY
)
• (Timer Prescale Value)
bits
Maximum PWM Resolution (bits) =
log10(2)
Note 1: Based on FCY = FOSC/2; Doze mode and PLL are disabled.
Note 1: Based on TCY = 2 * TOSC; Doze mode and PLL are disabled.
TABLE 14-1: EXAMPLE PWM FREQUENCIES AND RESOLUTIONS AT 4 MIPS (FCY = 4 MHz)(1)
PWM Frequency 7.6 Hz 61 Hz 122 Hz 977 Hz 3.9 kHz 31.3 kHz 125 kHz
Timer Prescaler Ratio 8 1 1 1 1 1 1
Period Register Value FFFFh FFFFh 7FFFh 0FFFh 03FFh 007Fh 001Fh
Resolution (bits) 16 16 15 12 10 7 5
Note 1: Based on FCY = FOSC/2; Doze mode and PLL are disabled.
TABLE 14-2: EXAMPLE PWM FREQUENCIES AND RESOLUTIONS AT 16 MIPS (FCY = 16 MHz)(1)
PWM Frequency 30.5 Hz 244 Hz 488 Hz 3.9 kHz 15.6 kHz 125 kHz 500 kHz
Timer Prescaler Ratio 8 1 1 1 1 1 1
Period Register Value FFFFh FFFFh 7FFFh 0FFFh 03FFh 007Fh 001Fh
Resolution (bits) 16 16 15 12 10 7 5
Note 1: Based on FCY = FOSC/2; Doze mode and PLL are disabled.
OCxRS(1)
OCx(1)
OCxR (1) Output S Q
Logic R
Output Enable
3
OCM<2:0> OCFA or OCFB(2)
Comparator Mode Select(4)
0 1 OCTSEL 0 1
16 16
Note 1: Where ‘x’ is shown, reference is made to the registers associated with the respective Output Compare
Channels 1 through 5.
2: The OCFA pin controls the OC1-OC4 channels. The OCFB pin controls the OC5 channel.
3: Each output compare channel can use one of two selectable time bases. Refer to the device data sheet for
the time bases associated with the module.
4: This peripheral’s inputs and outputs must be assigned to an available RPn pin before use. Please see
Section 10.4 “Peripheral Pin Select (PPS)” for more information.
Note 1: RPORx (OCx) must be configured to an available RPn pin. For more information, see Section 10.4
“Peripheral Pin Select (PPS)”.
2: The OCFA pin controls the OC1-OC4 channels. The OCFB pin controls the OC5 channel.
Transfer Transfer
SPIxBUF
16
Internal Data Bus
Transfer Transfer
SPIxBUF
16
Internal Data Bus
Note 1: If SPIEN = 1, these functions must be assigned to available RPn pins before use. See Section 10.4
“Peripheral Pin Select (PPS)” for more information.
Note 1: If SPIEN = 1, these functions must be assigned to available RPn pins before use. See Section 10.4
“Peripheral Pin Select (PPS)” for more information.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Note 1: If DISSCK = 0, SCKx must be configured to an available RPn pin. See Section 10.4 “Peripheral Pin
Select (PPS)” for more information.
2: If DISSDO = 0, SDOx must be configured to an available RPn pin. See Section 10.4 “Peripheral Pin
Select (PPS)” for more information.
3: The CKE bit is not used in the Framed SPI modes. The user should program this bit to ‘0’ for the Framed
SPI modes (FRMEN = 1).
4: If SSEN = 1, SSx must be configured to an available RPn pin. See Section 10.4 “Peripheral Pin Select
(PPS)” for more information.
Note 1: If DISSCK = 0, SCKx must be configured to an available RPn pin. See Section 10.4 “Peripheral Pin
Select (PPS)” for more information.
2: If DISSDO = 0, SDOx must be configured to an available RPn pin. See Section 10.4 “Peripheral Pin
Select (PPS)” for more information.
3: The CKE bit is not used in the Framed SPI modes. The user should program this bit to ‘0’ for the Framed
SPI modes (FRMEN = 1).
4: If SSEN = 1, SSx must be configured to an available RPn pin. See Section 10.4 “Peripheral Pin Select
(PPS)” for more information.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
SDOx SDIx
Serial Clock
SPIx Buffer SCKx SCKx SPIx Buffer
(SPIxBUF)(2) (SPIxBUF)(2)
SSx(1)
PROCESSOR 1 (SPI Enhanced Buffer Master) PROCESSOR 2 (SPI Enhanced Buffer Slave)
SDOx SDIx
SSx SSx(1)
PIC24F PROCESSOR 2
(SPI Slave, Frame Slave)
SDOx SDIx
SDIx SDOx
Serial Clock
SCKx SCKx
SSx SSx
Frame Sync
Pulse
PIC24F PROCESSOR 2
SPI Master, Frame Slave)
SDOx SDIx
SDIx SDOx
Serial Clock
SCKx SCKx
SSx SSx
Frame Sync
Pulse
PIC24F PROCESSOR 2
(SPI Slave, Frame Slave)
SDOx SDIx
SDIx SDOx
Serial Clock
SCKx SCKx
SSx SSx
Frame Sync
Pulse
PIC24F PROCESSOR 2
(SPI Master, Frame Slave)
SDOx SDIx
SDIx SDOx
Serial Clock
SCKx SCKx
SSx SSx
Frame Sync
Pulse
Note 1: Based on FCY = FOSC/2; Doze mode and PLL are disabled.
Internal
Data Bus
I2CxRCV
Read
Shift
SCLx Clock
I2CxRSR
LSB
I2CxMSK
Write Read
I2CxADD
Read
Read
Collision Write
Detect
I2CxCON
Acknowledge
Generation Read
Clock
Stretching
Write
I2CxTRN
LSB
Read
Shift Clock
Reload
Control
Write
Read
TCY/2
Note 1: In Slave mode, the module will not automatically clock stretch after receiving the address byte.
Note 1: In Slave mode, the module will not automatically clock stretch after receiving the address byte.
R/C-0, HS R/C-0, HS R-0, HSC R/C-0, HSC R/C-0, HSC R-0, HSC R-0, HSC R-0, HSC
IWCOL I2COV D/A P S R/W RBF TBF
bit 7 bit 0
Note 1: In both Master and Slave modes, the ACKSTAT bit is only updated when transmitting data resulting in the
reception of an ACK or NACK from another device. Do not check the state of ACKSTAT when receiving
data, either as a slave or a master. Reading ACKSTAT after receiving address or data bytes returns an
invalid result.
Note 1: In both Master and Slave modes, the ACKSTAT bit is only updated when transmitting data resulting in the
reception of an ACK or NACK from another device. Do not check the state of ACKSTAT when receiving
data, either as a slave or a master. Reading ACKSTAT after receiving address or data bytes returns an
invalid result.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
IrDA® BCLKx
Note: This peripheral’s inputs and outputs must be assigned to an available RPn pin before use. Please
see Section 10.4 “Peripheral Pin Select (PPS)” for more information.
Note 1: Based on FCY = FOSC/2; Doze mode and PLL are disabled.
Note 1: If UARTEN = 1, the peripheral inputs and outputs must be configured to an available RPn pin. See
Section 10.4 “Peripheral Pin Select (PPS)” for more information.
2: This feature is only available for the 16x BRG mode (BRGH = 0).
3: Bit availability depends on pin availability.
Note 1: If UARTEN = 1, the peripheral inputs and outputs must be configured to an available RPn pin. See
Section 10.4 “Peripheral Pin Select (PPS)” for more information.
2: This feature is only available for the 16x BRG mode (BRGH = 0).
3: Bit availability depends on pin availability.
Note 1: If UARTEN = 1, the peripheral inputs and outputs must be configured to an available RPn pin. See
Section 10.4 “Peripheral Pin Select (PPS)” for more information.
Note 1: If UARTEN = 1, the peripheral inputs and outputs must be configured to an available RPn pin. See
Section 10.4 “Peripheral Pin Select (PPS)” for more information.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Address Bus
Data Bus
Control Lines
PMA<0>
PIC24F PMALL
Parallel Master Port
PMA<1>
PMALH
PMCS1
PMBE
PMRD FIFO
PMRD/PMWR Microcontroller LCD
Buffer
PMWR
PMENB
PMD<7:0>
PMA<7:0>
PMA<15:8>
8-Bit Data
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Note 1: WAITBx and WAITEx bits are ignored whenever WAITM<3:0> = 0000.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Note 1: To enable the actual RTCC output, the RTCOE (RCFGCAL) bit needs to be set.
Address Bus
Master PIC24F Slave
Data Bus
PMD<7:0> PMD<7:0>
Control Lines
PMCS1 PMCS1
PMRD PMRD
PMWR PMWR
Address Bus
Data Bus
Control Lines
PIC24F PMA<10:0>
PMD<7:0>
PMCS1
PIC24F PMA<10:8>
PMD<7:0>
PMA<7:0>
PMCS1
Address Bus
PMALL
Multiplexed
PMRD Data and
Address Bus
PMWR Control Lines
FIGURE 18-6: MASTER MODE, FULLY MULTIPLEXED ADDRESSING (SEPARATE READ AND
WRITE STROBES, SINGLE CHIP SELECT)
PMD<7:0>
PIC24F PMA<7:0>
PMA<15:8>
PMCS1
PMALL
PMALH
Multiplexed
PMRD Data and
Address Bus
PMWR Control Lines
PIC24F
PMD<7:0> 373 A<7:0>
A<15:0>
PMALL
D<7:0>
D<7:0>
CE
A<15:8>
373 OE WR
PMALH
PMCS1 Address Bus
PMRD Data Bus
PMWR Control Lines
FIGURE 18-10: PARALLEL EEPROM EXAMPLE (UP TO 11-BIT ADDRESS, 8-BIT DATA)
PMD<7:0> D<7:0>
PMCS1 CE
Address Bus
PMRD OE
Data Bus
PMWR WR
Control Lines
FIGURE 18-11: PARALLEL EEPROM EXAMPLE (UP TO 11-BIT ADDRESS, 16-BIT DATA)
PMD<7:0> D<7:0>
PMBE A0
PMCS1 CE
Address Bus
PMRD OE
Data Bus
PMWR WR
Control Lines
RCFGCAL
32.768 kHz Input
RTCC Prescalers
(SOSC or T1CK) ALCFGRPT
YEAR
0.5s
MTHDY
RTCC Timer RTCVAL
WKDYHR
Alarm
Event MINSEC
Comparator
ALMTHDY
Compare Registers
ALRMVAL ALWDHR
with Masks
ALMINSEC
Repeat Counter
RTCC Interrupt
RTCC Interrupt Logic
Alarm Pulse
RTCC Pin
RTCOE
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Note 1: To enable the actual RTCC output, the RTCOE (RCFGCAL) bit needs to be set.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Day of
Alarm Mask Setting the
(AMASK<3:0>) Week Month Day Hours Minutes Seconds
0000 – Every half second
0001 – Every second
CRCDAT
CRCWDAT
CRCWDAT
Read/Write Bus
Note 1: Each XOR stage of the shift engine is programmable. See text for details.
2: Polynomial Length n is determined by ([PLEN<3:0>] + 1).
20.1 User Interface To empty words already written into a FIFO, the
CRCGO bit must be set to ‘1’ and the CRC shifter
20.1.1 DATA INTERFACE allowed to run until the CRCMPT bit is set.
To start serial shifting, a ‘1’ must be written to the Also, to get the correct CRC reading, it will be
CRCGO bit. necessary to wait for the CRCMPT bit to go high before
reading the CRCWDAT register.
The module incorporates a FIFO that is 8 deep when
PLEN<3:0> (CRCCON<3:0>) > 7 and 16 deep, other- If a word is written when the CRCFUL bit is set, the
wise. The data for which the CRC is to be calculated VWORDx Pointer will roll over to 0. The hardware will
must first be written into the FIFO. The smallest data then behave as if the FIFO is empty. However, the con-
element that can be written into the FIFO is one byte. dition to generate an interrupt will not be met; therefore,
For example, if PLEN<3:0> = 5, then the size of the no interrupt will be generated (See Section 20.1.2
data is PLEN<3:0> + 1 = 6. When loading data, the “Interrupt Operation”).
two MSbs of the data byte are ignored. At least one instruction cycle must pass after a write to
Once data is written into the CRCWDAT MSb (as CRCWDAT before a read of the VWORDx bits is done.
defined by PLENx), the value of VWORD<4:0>
(CRCCON<12:8>) increments by one. When 20.1.2 INTERRUPT OPERATION
CRCGO = 1 and VWORDx > 0, a word of data to be When the VWORD<4:0> bits make a transition from a
shifted is moved from the FIFO into the shift engine. value of ‘1’ to ‘0’, an interrupt will be generated. Note
When the data word moves from the FIFO to the shift that the CRC calculation is not complete at this point;
engine, the VWORDx bits decrement by one. The serial an additional time of (PLEN + 1)/2 clock cycles is
shifter continues to receive data from the FIFO, shifting required before the output can be read.
until the VWORDx bits reach 0. The last bit of data will
be shifted through the CRC module (PLENx + 1)/2 clock 20.2 Operation in Power Save Modes
cycles after the VWORDx bits reach 0. This is when the
module is completed with the CRC calculation. 20.2.1 SLEEP MODE
Therefore, for a given value of PLENx, it will take If Sleep mode is entered while the module is operating,
(PLENx + 1)/2 * VWORDx number of clock cycles to the module will be suspended in its current state until
complete the CRC calculations. clock execution resumes.
When the VWORD<4:0> bits reach 8 (or 16), the
CRCFUL bit will be set. When the VWORD<4:0> bits 20.2.2 IDLE MODE
reach 0, the CRCMPT bit will be set. To continue full module operation in Idle mode, the
To continually feed data into the CRC engine, the CSIDL bit must be cleared prior to entry into the mode.
recommended mode of operation is to initially “prime” If CSIDL = 1, the module will behave the same way as
the FIFO with a sufficient number of words, so no inter- it does in Sleep mode; pending interrupt events will be
rupt is generated before the next word can be written. passed on, even though the module clocks are not
Once that is done, start the CRC by setting the CRCGO available.
bit to ‘1’. From that point onward, the VWORDx bits
should be polled. If they read less than 8 or 16, another
word can be written into the FIFO.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
AVDD
16
AVSS VR Select VR+
VREF+ VR-
Comparator
VREF-
VINH
VR- VR+
S/H DAC
AN0 VINL
AN1 VINH
10-Bit SAR Conversion Logic
AN2
MUX A
AN4
VINL
AN5 ADC1BUF0:
ADC1BUFF
AN6(1)
AD1CON1
AN7(1)
AD1CON2
AD1CON3
AN8(1)
VINH AD1CHS
MUX B
AN9 AD1PCFG
AD1CSSL
AN10 VINL
AN11
Sample Control Control Logic
AN12 Conversion Control
Input MUX Control
VBG(2) Pin Config. Control
Note 1: Analog Channels, AN6 through AN8, are available on 44-pin devices only.
2: Band Gap Voltage (VBG) reference is internally connected to Analog Channel AN15, which does not appear on any pin.
R/W-0 R/W-0 R/W-0 U-0 U-0 R/W-0 R/W-0, HSC R/W-0, HSC
SSRC2 SSRC1 SSRC0 — — ASAM SAMP DONE
bit 7 bit 0
Note 1: The ADC1BUFn registers do not retain their values when ADON is cleared. Read out any conversion
values from the buffer before disabling the module.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
bit 15 CH0NB: Channel 0 Negative Input Select for MUX B Multiplexer Setting bit
1 = Channel 0 negative input is AN1
0 = Channel 0 negative input is VR-
bit 14-12 Unimplemented: Read as ‘0’
bit 11-8 CH0SB<3:0>: Channel 0 Positive Input Select for MUX B Multiplexer Setting bits(1,2)
1111 = Channel 0 positive input is AN15 (band gap voltage reference)
1100 = Channel 0 positive input is AN12
1011 = Channel 0 positive input is AN11
·····
0001 = Channel 0 positive input is AN1
0000 = Channel 0 positive input is AN0
bit 7 CH0NA: Channel 0 Negative Input Select for MUX A Multiplexer Setting bit
1 = Channel 0 negative input is AN1
0 = Channel 0 negative input is VR-
bit 6-4 Unimplemented: Read as ‘0’
bit 3-0 CH0SA<3:0>: Channel 0 Positive Input Select for MUX A Multiplexer Setting bits(1,2)
1111 = Channel 0 positive input is AN15 (band gap voltage reference)
1100 = Channel 0 positive input is AN12
1011 = Channel 0 positive input is AN11
·····
0001 = Channel 0 positive input is AN1
0000 = Channel 0 positive input is AN0
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Note 1: Analog Channels, AN6, AN7 and AN8, are unavailable on 28-pin devices; leave these corresponding bits set.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
bit 15 CSSL15: Band Gap Reference Input Pin Scan Selection bit
1 = Band gap voltage reference channel is selected for input scan
0 = Band gap voltage reference channel is omitted from input scan
bit 14-13 Unimplemented: Read as ‘0’
bit 12-0 CSSL<12:0>: A/D Input Pin Scan Selection bits(1)
1 = Corresponding analog channel is selected for input scan
0 = Analog channel is omitted from input scan
Note 1: Analog Channels, AN6, AN7 and AN8, are unavailable on 28-pin devices; leave these corresponding bits
cleared.
TAD
ADCS = –1
TCY
Note 1: Based on TCY = 2 * TOSC; Doze mode and PLL are disabled.
CHOLD
VA CPIN ILEAKAGE = DAC Capacitance
VT = 0.6V 500 nA = 4.4 pF (Typical)
6-11 pF
(Typical)
VSS
Note: CPIN value depends on device package and is not tested. The effect of CPIN is negligible if Rs 5 k.
VR +
VINH - VINL
VR+ - VR-
VR -
0
1024
Voltage Level
1024
1024
VR- +
VR - +
VR- +
C1NEG CMCON<6>
C1EN
C1INV
C1IN+
VIN-
C1IN-
C1OUT(1)
C1POS C1
C1IN+
VIN+ C1OUTEN
CVREF
C2NEG CMCON<7>
C2EN
C2INV
C2IN+
VIN-
C2IN- C2OUT(1)
C2POS C2
C2IN+
VIN+ C2OUTEN
CVREF
Note 1: This peripheral’s outputs must be assigned to an available RPn pin before use. Please see
Section 10.4 “Peripheral Pin Select (PPS)” for more information.
Note 1: If C2OUTEN = 1, the C2OUT peripheral output must be configured to an available RPn pin. See
Section 10.4 “Peripheral Pin Select (PPS)” for more information.
2: If C1OUTEN = 1, the C1OUT peripheral output must be configured to an available RPn pin. See
Section 10.4 “Peripheral Pin Select (PPS)” for more information.
Note 1: If C2OUTEN = 1, the C2OUT peripheral output must be configured to an available RPn pin. See
Section 10.4 “Peripheral Pin Select (PPS)” for more information.
2: If C1OUTEN = 1, the C1OUT peripheral output must be configured to an available RPn pin. See
Section 10.4 “Peripheral Pin Select (PPS)” for more information.
CVRSS = 1
VREF+
AVDD 8R
CVRSS = 0
CVR<3:0>
CVREN R
R
16-to-1 MUX
16 Steps CVREF
R
R
CVRR 8R
CVRSS = 1
VREF-
CVRSS = 0
AVSS
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Note 1: These bits are implemented only in devices with a major silicon revision level of B or later (DEVREV regis-
ter value is 3042h or greater). Refer to Section 28.0 “Packaging Information” in the device data sheet
for the location and interpretation of product date codes.
Note 1: These bits are implemented only in devices with a major silicon revision level of B or later (DEVREV regis-
ter value is 3042h or greater). Refer to Section 28.0 “Packaging Information” in the device data sheet
for the location and interpretation of product date codes.
U U R R R R R R
— — FAMID7 FAMID6 FAMID5 FAMID4 FAMID3 FAMID2
bit 15 bit 8
R R R R R R R R
FAMID1 FAMID0 DEV5 DEV4 DEV3 DEV2 DEV1 DEV0
bit 7 bit 0
U U U U U U U R
— — — — — — — MAJRV2
bit 15 bit 8
R R U U U R R R
MAJRV1 MAJRV0 — — — DOT2 DOT1 DOT0
bit 7 bit 0
SWDTEN
LPRC Control
FWDTEN Wake from Sleep
FWPSA WDTPS<3:0>
Transition to
New Clock Source
Exit Sleep or
Idle Mode
CLRWDT Instr.
PWRSAV Instr.
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
† 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 to maximum rating conditions
for extended periods may affect device reliability.
3.00V
2.75V 2.75V
Voltage (VDDCORE)(1)
2.50V PIC24FJ64GA004/32GA004/64GA002/32GA002
2.35V
2.25V
2.00V
16 MHz 32 MHz
Frequency
For frequencies between 16 MHz and 32 MHz, FMAX = (45.7 MHz/V) * (VDDCORE – 2V) + 16 MHz.
Note 1: WHEN the voltage regulator is disabled, VDD and VDDCORE must be maintained so that
VDDCOREVDD3.6V.
3.00V
2.75V 2.75V
Voltage (VDDCORE)(1)
2.50V PIC24FJ64GA004/32GA004/64GA002/32GA002
2.35V
2.25V
2.00V
16 MHz 24 MHz
Frequency
For frequencies between 16 MHz and 24 MHz, FMAX = (22.9 MHz/V) * (VDDCORE – 2V) + 16 MHz.
Note 1: WHEN the voltage regulator is disabled, VDD and VDDCORE must be maintained so that
VDDCOREVDD3.6V.
Parameter
Typical(1) Max Units Conditions
No.
Idle Current (IIDLE): Core Off, Clock On Base Current, PMD Bits are Set(2)
DC40 150 200 A -40°C
DC40a 150 200 A +25°C
2.0V(3)
DC40b 150 200 A +85°C
DC40c 165 220 A +125°C
1 MIPS
DC40d 250 325 A -40°C
DC40e 250 325 A +25°C
3.3V(4)
DC40f 250 325 A +85°C
DC40g 275 360 A +125°C
DC43 0.55 0.72 mA -40°C
DC43a 0.55 0.72 mA +25°C
2.0V(3)
DC43b 0.55 0.72 mA +85°C
DC43c 0.60 0.8 mA +125°C
4 MIPS
DC43d 0.82 1.1 mA -40°C
DC43e 0.82 1.1 mA +25°C
3.3V(4)
DC43f 0.82 1.1 mA +85°C
DC43g 0.91 1.2 mA +125°C
DC47 3 4 mA -40°C
DC47a 3 4 mA +25°C
2.5V(3)
DC47b 3 4 mA +85°C
DC47c 3.3 4.4 mA +125°C
16 MIPS
DC47d 3.5 4.6 mA -40°C
DC47e 3.5 4.6 mA +25°C
3.3V(4)
DC47f 3.5 4.6 mA +85°C
DC47g 3.9 5.1 mA +125°C
DC50 0.85 1.1 mA -40°C
DC50a 0.85 1.1 mA +25°C
2.0V(3)
DC50b 0.85 1.1 mA +85°C
DC50c 0.94 1.2 mA +125°C
FRC (4 MIPS)
DC50d 1.2 1.6 mA -40°C
DC50e 1.2 1.6 mA +25°C
3.3V(4)
DC50f 1.2 1.6 mA +85°C
DC50g 1.3 1.8 mA +125°C
Note 1: Data in “Typical” column is at 3.3V, +25°C unless otherwise stated. Parameters are for design guidance only and
are not tested.
2: The test conditions for all IIDLE measurements are as follows: OSCI driven with external square wave from
rail-to-rail. All I/O pins are configured as inputs and pulled to VDD. MCLR = VDD; WDT and FSCM are disabled.
CPU, SRAM, program memory and data memory are operational. No peripheral modules are operating and all
of the Peripheral Module Disable (PMD) bits are set.
3: On-chip voltage regulator is disabled (DISVREG tied to VDD).
4: On-chip voltage regulator is enabled (DISVREG tied to VSS). Low-Voltage Detect (LVD) and Brown-out Detect
(BOD) are enabled.
Parameter
Typical(1) Max Units Conditions
No.
Idle Current (IIDLE): Core Off, Clock On Base Current, PMD Bits are Set(2)
DC51 4 6 A -40°C
DC51a 4 6 A +25°C
2.0V(3)
DC51b 8 16 A +85°C
DC51c 20 50 A +125°C
LPRC (31 kHz)
DC51d 42 55 A -40°C
DC51e 42 55 A +25°C
3.3V(4)
DC51f 70 91 A +85°C
DC51g 100 180 A +125°C
Note 1: Data in “Typical” column is at 3.3V, +25°C unless otherwise stated. Parameters are for design guidance only and
are not tested.
2: The test conditions for all IIDLE measurements are as follows: OSCI driven with external square wave from
rail-to-rail. All I/O pins are configured as inputs and pulled to VDD. MCLR = VDD; WDT and FSCM are disabled.
CPU, SRAM, program memory and data memory are operational. No peripheral modules are operating and all
of the Peripheral Module Disable (PMD) bits are set.
3: On-chip voltage regulator is disabled (DISVREG tied to VDD).
4: On-chip voltage regulator is enabled (DISVREG tied to VSS). Low-Voltage Detect (LVD) and Brown-out Detect
(BOD) are enabled.
Parameter
Typical(1) Max Units Conditions
No.
Power-Down Current (IPD): PMD Bits are Set, PMSLP Bit is ‘0’(2)
DC60 0.1 1 A -40°C
DC60a 0.15 1 A +25°C
DC60m 2.2 7.4 A +60°C 2.0V(3)
DC60b 3.7 12 A +85°C
DC60j 15 50 A +125°C
DC60c 0.2 1 A -40°C
DC60d 0.25 1 A +25°C
DC60n 2.6 15 A +60°C 2.5V(3) Base Power-Down Current(5)
DC60e 4.2 25 A +85°C
DC60k 16 100 A +125°C
DC60f 3.3 9 A -40°C
DC60g 3.5 10 A +25°C
DC60o 6.7 22 A +60°C 3.3V(4)
DC60h 9 30 A +85°C
DC60l 36 120 A +125°C
DC61 1.75 3 A -40°C
DC61a 1.75 3 A +25°C
DC61m 1.75 3 A +60°C 2.0V(3)
DC61b 1.75 3 A +85°C
DC61j 3.5 6 A +125°C
DC61c 2.4 4 A -40°C
DC61d 2.4 4 A +25°C
DC61n 2.4 4 A +60°C 2.5V(3) Watchdog Timer Current: IWDT(5)
DC61e 2.4 4 A +85°C
DC61k 4.8 8 A +125°C
DC61f 2.8 5 A -40°C
DC61g 2.8 5 A +25°C
DC61o 2.8 5 A +60°C 3.3V(4)
DC61h 2.8 5 A +85°C
DC61l 5.6 10 A +125°C
Note 1: Data in the Typical column is at 3.3V, +25°C unless otherwise stated. Parameters are for design guidance
only and are not tested.
2: Base IPD is measured with all peripherals and clocks shut down. All I/Os are configured as inputs and
pulled high. WDT, etc., are all switched off.
3: On-chip voltage regulator is disabled (DISVREG tied to VDD).
4: On-chip voltage regulator is enabled (DISVREG tied to VSS). Low-Voltage Detect (LVD) and Brown-out
Detect (BOD) are enabled.
5: The current is the additional current consumed when the module is enabled. This current should be
added to the base IPD current.
Param
Sym Characteristic Min Typ(1) Max Units Conditions
No.
VIL Input Low Voltage(4)
DI10 I/O Pins VSS — 0.2 VDD V
DI11 PMP Pins VSS — 0.15 VDD V PMPTTL = 1
DI15 MCLR VSS — 0.2 VDD V
DI16 OSCI (XT mode) VSS — 0.2 VDD V
DI17 OSCI (HS mode) VSS — 0.2 VDD V
DI18 I/O Pins with I2C™ Buffer VSS — 0.3 VDD V SMBus disabled
DI19 I/O Pins with SMBus Buffer VSS — 0.8 V SMBus enabled
VIH Input High Voltage(4)
DI20 I/O Pins:
with Analog Functions 0.8 VDD — VDD V
Digital Only 0.8 VDD — 5.5 V
DI21 PMP Pins:
with Analog Functions 0.25 VDD + 0.8 — VDD V PMPTTL = 1
Digital Only 0.25 VDD + 0.8 — 5.5 V
DI25 MCLR 0.8 VDD — VDD V
DI26 OSCI (XT mode) 0.7 VDD — VDD V
DI27 OSCI (HS mode) 0.7 VDD — VDD V
DI28 I/O Pins with I2C Buffer:
with Analog Functions 0.7 VDD — VDD V
Digital Only 0.7 VDD — 5.5 V
DI29 I/O Pins with SMBus Buffer:
with Analog Functions
Digital Only 2.1 — VDD V
2.1 — 5.5 v 2.5V VPIN VDD
DI30 ICNPU CNxx Pull-up Current 50 250 400 A VDD = 3.3V, VPIN = VSS
Note 1: Data in “Typ” column is at 3.3V, +25°C unless otherwise stated. Parameters are for design guidance only
and are not tested.
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.
3: Negative current is defined as current sourced by the pin.
4: Refer to Table 1-2 for I/O pin buffer types.
5: Parameter is characterized but not tested.
6: Non-5V tolerant pins, VIH source > (VDD + 0.3), 5V tolerant pins VIH source > 5.5V. Characterized but not
tested.
7: Digital 5V tolerant pins cannot tolerate any “positive” input injection current from input sources greater
than 5.5V.
8: Injection currents > | 0 | can affect the performance of all analog peripherals (e.g., A/D, comparators,
internal band gap reference, etc.)
9: Any number and/or combination of I/O pins not excluded under IICL or IICH conditions are permitted pro-
vided the mathematical “absolute instantaneous” sum of the input injection currents from all pins do not
exceed the specified limit. Characterized but not tested.
Param
Sym Characteristic Min Typ(1) Max Units Conditions
No.
VOL Output Low Voltage
DO10 All I/O Pins — — 0.4 V IOL = 8.5 mA, VDD = 3.6V
— — 0.4 V IOL = 5.0 mA, VDD = 2.0V
DO16 All I/O Pins — — 0.4 V IOL = 8.0 mA, VDD = 3.6V, +125°C
— — 0.4 V IOL = 4.5 mA, VDD = 2.0V, +125°C
VOH Output High Voltage
DO20 All I/O Pins 3 — — V IOH = -3.0 mA, VDD = 3.6V
1.65 — — V IOH = -1.0 mA, VDD = 2.0V
DO26 All I/O Pins 3 — — V IOH = -2.5 mA, VDD = 3.6V, +125°C
1.65 — — V IOH = -0.5 mA, VDD = 2.0V, +125°C
Note 1: Data in “Typ” column is at +25°C unless otherwise stated. Parameters are for design guidance only and are not
tested.
Param
Sym Characteristic Min Typ(1) Max Units Conditions
No.
Program Flash Memory
D130 EP Cell Endurance 10000 — — E/W -40C to +125C
D131 VPR VDD for Read VMIN — 3.6 V VMIN = Minimum operating voltage
D132B VPEW VDDCORE for Self-Timed 2.25 — 2.75 V
Write
D133A TIW Self-Timed Write Cycle — 3 — ms
Time
D134 TRETD Characteristic Retention 20 — — Year Provided no other specifications are
violated
D135 IDDP Supply Current during — 7 — mA
Programming
Note 1: Data in “Typ” column is at 3.3V, +25°C unless otherwise stated.
Param
Symbol Characteristic Min Typ Max Units Comments
No.
D300 VIOFF Input Offset Voltage* — 10 30 mV
D301 VICM Input Common-Mode Voltage* 0 — VDD V
D302 CMRR Common-Mode Rejection 55 — — dB
Ratio*
300 TRESP Response Time*(1) — 150 400 ns
301 TMC2OV Comparator Mode Change to — — 10 s
Output Valid*
* Parameters are characterized but not tested.
Note 1: Response time is measured with one comparator input at (VDD – 1.5)/2, while the other input transitions
from VSS to VDD.
Param
Symbol Characteristics Min Typ Max Units Comments
No.
VRGOUT Regulator Output Voltage — 2.5 — V
VBG Band Gap Reference Voltage — 1.2 — V
CEFC External Filter Capacitor 4.7 10 — F Series resistance < 3 Ohm
Value recommended;
< 5 Ohm required
TVREG Voltage Regulator Start-up — 10 — s POR, BOR or when
Time PMSLP = 1
— 25 — s PMSLP = 0,
WUTSEL<1:0> = 01(1)
— 190 — s PMSLP = 0,
WUTSEL<1:0> = 11(2)
TPWRT — 64 — ms DISVREG = VDD
Note 1: Available only in devices with a major silicon revision level of B or later (DEVREV register value is 3042h
or greater).
2: WUTSELx Configuration bits setting is applicable only in devices with a major silicon revision level of B or
later. This specification also applies to all devices prior to Revision Level B whenever PMSLP = 0.
Load Condition 1 – for All Pins Except OSCO Load Condition 2 – for OSCO
VDD/2
Pin CL
RL
VSS
CL
Pin RL = 464
CL = 50 pF for all pins except OSCO
VSS
15 pF for OSCO output
Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3
OSCI
OS20
OS30 OS30 OS31 OS31
OS25
CLKO
OS40 OS41
Param
Sym Characteristic Min Typ Max Units Conditions
No.
TFRC FRC Start-up Time — 15 — s
TLPRC LPRC Start-up Time — 40 — s
Param
Characteristic Min Typ Max Units Conditions
No.
F20 Internal FRC @ 8 MHz(1) -2 — 2 % +25°C
-5 — 5 % -40°C TA +85°C 3.0V VDD 3.6V
-7 — 7 % +125°C
F21 LPRC @ 31 kHz(2) -15 — 15 % +25°C
-15 — 15 % -40°C TA +85°C 3.0V VDD 3.6V
-30 — 30 % +125°C
Note 1: Frequency calibrated at +25°C and 3.3V. OSCTUN bits can be used to compensate for temperature drift.
2: Change of LPRC frequency as VDD changes.
I/O Pin
(Input)
DI35
DI40
I/O Pin
Old Value New Value
(Output)
DO31
DO32
XXXXXXXXXXXXXXXXX PIC24FJ16GA002
XXXXXXXXXXXXXXXXX -I/SP e3
YYWWNNN 1310017
XXXXXXXXXXXX 24FJ16GA002
XXXXXXXXXXXX /SS e3
YYWWNNN 1310017
XXXXXXXXXXXXXXXXXXXX PIC24FJ16GA002/SO e3
XXXXXXXXXXXXXXXXXXXX 1310017
XXXXXXXXXXXXXXXXXXXX
YYWWNNN
XXXXXXXX 24FJ48GA
XXXXXXXX 002/ML e3
YYWWNNN 1310017
XXXXXXXXXX 24FJ32GA
XXXXXXXXXX 004-I/ML e3
XXXXXXXXXX 1310017
YYWWNNN
XXXXXXXXXX 24FJ32GA
XXXXXXXXXX 004-I/PT e3
XXXXXXXXXX 1310017
YYWWNNN
/HDG6NLQQ\3ODVWLF'XDO,Q/LQH63±PLO%RG\>63',3@
1RWH )RUWKHPRVWFXUUHQWSDFNDJHGUDZLQJVSOHDVHVHHWKH0LFURFKLS3DFNDJLQJ6SHFLILFDWLRQORFDWHGDW
KWWSZZZPLFURFKLSFRPSDFNDJLQJ
NOTE 1
E1
1 2 3
A A2
L c
A1 b1
b e eB
8QLWV ,1&+(6
'LPHQVLRQ/LPLWV 0,1 120 0$;
1XPEHURI3LQV 1
3LWFK H %6&
7RSWR6HDWLQJ3ODQH $ ± ±
0ROGHG3DFNDJH7KLFNQHVV $
%DVHWR6HDWLQJ3ODQH $ ± ±
6KRXOGHUWR6KRXOGHU:LGWK (
0ROGHG3DFNDJH:LGWK (
2YHUDOO/HQJWK '
7LSWR6HDWLQJ3ODQH /
/HDG7KLFNQHVV F
8SSHU/HDG:LGWK E
/RZHU/HDG:LGWK E
2YHUDOO5RZ6SDFLQJ H% ± ±
1RWHV
3LQYLVXDOLQGH[IHDWXUHPD\YDU\EXWPXVWEHORFDWHGZLWKLQWKHKDWFKHGDUHD
6LJQLILFDQW&KDUDFWHULVWLF
'LPHQVLRQV'DQG(GRQRWLQFOXGHPROGIODVKRUSURWUXVLRQV0ROGIODVKRUSURWUXVLRQVVKDOOQRWH[FHHGSHUVLGH
'LPHQVLRQLQJDQGWROHUDQFLQJSHU$60(<0
%6& %DVLF'LPHQVLRQ7KHRUHWLFDOO\H[DFWYDOXHVKRZQZLWKRXWWROHUDQFHV
/HDG3ODVWLF6KULQN6PDOO2XWOLQH66±PP%RG\>6623@
1RWH )RUWKHPRVWFXUUHQWSDFNDJHGUDZLQJVSOHDVHVHHWKH0LFURFKLS3DFNDJLQJ6SHFLILFDWLRQORFDWHGDW
KWWSZZZPLFURFKLSFRPSDFNDJLQJ
D
N
E
E1
1 2
b
NOTE 1
e
c
A A2
φ
A1
L1 L
8QLWV 0,//,0(7(56
'LPHQVLRQ/LPLWV 0,1 120 0$;
1XPEHURI3LQV 1
3LWFK H %6&
2YHUDOO+HLJKW $ ± ±
0ROGHG3DFNDJH7KLFNQHVV $
6WDQGRII $ ± ±
2YHUDOO:LGWK (
0ROGHG3DFNDJH:LGWK (
2YHUDOO/HQJWK '
)RRW/HQJWK /
)RRWSULQW / 5()
/HDG7KLFNQHVV F ±
)RRW$QJOH
/HDG:LGWK E ±
1RWHV
3LQYLVXDOLQGH[IHDWXUHPD\YDU\EXWPXVWEHORFDWHGZLWKLQWKHKDWFKHGDUHD
'LPHQVLRQV'DQG(GRQRWLQFOXGHPROGIODVKRUSURWUXVLRQV0ROGIODVKRUSURWUXVLRQVVKDOOQRWH[FHHGPPSHUVLGH
'LPHQVLRQLQJDQGWROHUDQFLQJSHU$60(<0
%6& %DVLF'LPHQVLRQ7KHRUHWLFDOO\H[DFWYDOXHVKRZQZLWKRXWWROHUDQFHV
5() 5HIHUHQFH'LPHQVLRQXVXDOO\ZLWKRXWWROHUDQFHIRULQIRUPDWLRQSXUSRVHVRQO\
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
D D2
EXPOSED
PAD
E
b
E2
2 2
1 1 K
N N
NOTE 1 L
TOP VIEW BOTTOM VIEW
A3 A1
8QLWV 0,//,0(7(56
'LPHQVLRQ/LPLWV 0,1 120 0$;
1XPEHURI3LQV 1
3LWFK H %6&
2YHUDOO+HLJKW $
6WDQGRII $
&RQWDFW7KLFNQHVV $ 5()
2YHUDOO:LGWK ( %6&
([SRVHG3DG:LGWK (
2YHUDOO/HQJWK ' %6&
([SRVHG3DG/HQJWK '
&RQWDFW:LGWK E
&RQWDFW/HQJWK /
&RQWDFWWR([SRVHG3DG . ± ±
1RWHV
3LQYLVXDOLQGH[IHDWXUHPD\YDU\EXWPXVWEHORFDWHGZLWKLQWKHKDWFKHGDUHD
3DFNDJHLVVDZVLQJXODWHG
'LPHQVLRQLQJDQGWROHUDQFLQJSHU$60(<0
%6& %DVLF'LPHQVLRQ7KHRUHWLFDOO\H[DFWYDOXHVKRZQZLWKRXWWROHUDQFHV
5() 5HIHUHQFH'LPHQVLRQXVXDOO\ZLWKRXWWROHUDQFHIRULQIRUPDWLRQSXUSRVHVRQO\
0LFURFKLS 7HFKQRORJ\ 'UDZLQJ &%
D
D1
E
e
E1
N
b
NOTE 1 1 2 3
NOTE 2
A α
c φ
β A1 A2
L L1
8QLWV 0,//,0(7(56
'LPHQVLRQ/LPLWV 0,1 120 0$;
1XPEHURI/HDGV 1
/HDG3LWFK H %6&
2YHUDOO+HLJKW $ ± ±
0ROGHG3DFNDJH7KLFNQHVV $
6WDQGRII $ ±
)RRW/HQJWK /
)RRWSULQW / 5()
)RRW$QJOH
2YHUDOO:LGWK ( %6&
2YHUDOO/HQJWK ' %6&
0ROGHG3DFNDJH:LGWK ( %6&
0ROGHG3DFNDJH/HQJWK ' %6&
/HDG7KLFNQHVV F ±
/HDG:LGWK E
0ROG'UDIW$QJOH7RS
0ROG'UDIW$QJOH%RWWRP
1RWHV
3LQYLVXDOLQGH[IHDWXUHPD\YDU\EXWPXVWEHORFDWHGZLWKLQWKHKDWFKHGDUHD
&KDPIHUVDWFRUQHUVDUHRSWLRQDOVL]HPD\YDU\
'LPHQVLRQV'DQG(GRQRWLQFOXGHPROGIODVKRUSURWUXVLRQV0ROGIODVKRUSURWUXVLRQVVKDOOQRWH[FHHGPPSHUVLGH
'LPHQVLRQLQJDQGWROHUDQFLQJSHU$60(<0
%6& %DVLF'LPHQVLRQ7KHRUHWLFDOO\H[DFWYDOXHVKRZQZLWKRXWWROHUDQFHV
5() 5HIHUHQFH'LPHQVLRQXVXDOO\ZLWKRXWWROHUDQFHIRULQIRUPDWLRQSXUSRVHVRQO\
0LFURFKLS 7HFKQRORJ\ 'UDZLQJ &%
Note: For the most current package drawings, please see the Microchip Packaging Specification located at
http://www.microchip.com/packaging
From: Name
Company
Address
City / State / ZIP / Country
Telephone: (_______) _________ - _________ FAX: (______) _________ - _________
Application (optional):
Would you like a reply? Y N
Questions:
2. How does this document meet your hardware and software development needs?
3. Do you find the organization of this document easy to follow? If not, why?
4. What additions to the document do you think would enhance the structure and subject?
5. What deletions from the document could be made without affecting the overall usefulness?
Pin Count
Tape and Reel Flag (if applicable)
Temperature Range
Package
Pattern
Package SP = SPDIP
SO = SOIC
SS = SSOP
ML = QFN
PT = TQFP
• 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.
ISBN: 978-1-62077-201-0
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.