2.0 Guidelines for Getting Started with 16-Bit Microcontrollers........................................................................................................ 29
3.0 CPU ........................................................................................................................................................................................... 35
5.0 Flash Program Memory.............................................................................................................................................................. 67
6.0 Data EEPROM Memory ............................................................................................................................................................. 73
13.0 Capture/Compare/PWM/Timer Modules (MCCP and SCCP) .................................................................................................. 143
14.0 Master Synchronous Serial Port (MSSP) ................................................................................................................................. 159
23.0 Comparator Voltage Reference ................................................................................................................................................ 239
24.0 Charge Time Measurement Unit (CTMU) ................................................................................................................................ 241
25.0 Special Features ...................................................................................................................................................................... 249
26.0 Development Support............................................................................................................................................................... 261
Index ................................................................................................................................................................................................. 325
The Microchip Web Site..................................................................................................................................................................... 331
Customer Change Notification Service .............................................................................................................................................. 331
Customer Support .............................................................................................................................................................................. 331
DS33030A-page 10Advance Information 2013 Microchip Technology Inc.
PIC24FV16KM204 FAMILY
TO OUR VALUED CUSTOMERS
It is our intention to provide our valued customers with the best documentation possible to ensure successful use of your Microchip
products. To this end, we will continue to improve our publications to better suit your needs. Our publications will be refined and
enhanced as new volumes and updates are introduced.
If you have any questions or comments regarding this publication, please contact the Marketing Communications Department via
E-mail at docerrors@microchip.com or fax the Reader Response Form in the back of this data sheet to (480) 792-4150. We
welcome your feedback.
Most Current Data Sheet
To obtain the most up-to-date version of this data sheet, please register at our Worldwide Web site at:
http://www.microchip.com
You can determine the version of a data sheet by examining its literature number found on the bottom outside corner of any page.
The last character of the literature number is the version number, (e.g., DS30000A is version A of document DS30000).
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.
Customer Notification System
Register on our web site at www.microchip.com to receive the most current information on all of our products.
DS33030A-page 12Advance Information 2013 Microchip Technology Inc.
PIC24FV16KM204 FAMILY
1.0DEVICE OVERVIEW
This document contains device-specific information for
the following devices:
• PIC24FV08KM101• PIC24F08KM101
• PIC24FV08KM102• PIC24F08KM102
• PIC24FV16KM102• PIC24F16KM102
• PIC24FV16KM104• PIC24F16KM104
• PIC24FV08KM202• PIC24F08KM202
• PIC24FV08KM204• PIC24F08KM204
• PIC24FV16KM202• PIC24F16KM202
• PIC24FV16KM204• PIC24F16KM204
The PIC24FV16KM204 family introduces many new
analog features to the extreme low-power Microchip
devices. This is a 16-bit microcontroller family with a
broad peripheral feature set and enhanced computational performance. This family also offers a new
migration option for those high-performance applications which may be outgrowing their 8-bit platforms, but
do not require the numerical processing power of a
Digital Signal Processor (DSC).
1.1Core Features
1.1.116-BIT ARCHITECTURE
Central to all PIC24F devices is the 16-bit modified
Harvard architecture, first introduced with Microchip’s
dsPIC® Digital Signal Controllers. The PIC24F CPU
core offers a wide range of enhancements, such as:
• 16-bit data and 24-bit address paths with the
ability to move information between data and
memory spaces
• Linear addressing of up to 16 Mbytes (program
space) and 16 Kbytes (data)
• A 16-element working register array with built-in
software stack support
• A 17 x 17 hardware multiplier with support for
integer math
• Hardware support for 32-bit by 16-bit division
• An instruction set that supports multiple addressing modes and is optimized for high-level
languages, such as C
• Operational performance up to 16 MIPS
1.1.2POWER-SAVING TECHNOLOGY
All of the devices in the PIC24FV16KM204 family incorporate a range of features that can significantly reduce
power consumption during operation. Key features
include:
• On-the-Fly Clock Switching, to allow the device
clock to be changed under software control to the
Timer1 source or the internal, low-power RC
oscillator during operation, allowing users to
incorporate power-saving ideas into their software
designs.
• Doze Mode Operation, when timing-sensitive
applications, such as serial communications,
require the uninterrupted operation of peripherals,
the CPU clock speed can be selectively reduced,
allowing incremental power savings without
missing a beat.
• Instruction-Based Power-Saving Modes, to allow
the microcontroller to suspend all operations or
selectively shut down its core while leaving its
peripherals active with a single instruction in
software.
1.1.3OSCILLATOR OPTIONS AND
FEATURES
The PIC24FV16KM204 family offers five different oscillator options, allowing users a range of choices in
developing application hardware. These include:
• Two Crystal modes using crystals or ceramic
resonators.
• Two External Clock modes offering the option of a
divide-by-2 clock output.
• Two Fast Internal oscillators (FRCs), one with a
nominal 8 MHz output and the other with a
nominal 500 kHz output. These outputs can also
be divided under software control to provide clock
speed as low as 31 kHz or 2 kHz.
• A Phase Locked Loop (PLL) frequency multiplier,
available to the external oscillator modes and the
8 MHz FRC oscillator, which allows clock speeds
of up to 32 MHz.
• A separate internal RC oscillator (LPRC) with a
fixed 31 kHz output, which provides a low-power
option for timing-insensitive applications.
The internal oscillator block also provides a stable reference source for the Fail-Safe Clock Monitor (FSCM).
This option constantly monitors the main clock source
against a reference signal provided by the internal
oscillator and enables the controller to switch to the
internal oscillator, allowing for continued low-speed
operation or a safe application shutdown.
The PIC24FV16KM204 family devices have two
variants. The KM20X variant provides the full feature set
of the device, while the KM10X offers a reduced peripheral set, allowing for the balance of features and cost
(refer to Ta bl e 1- 1 ). Both variants allow for a smooth
migration path as applications grow and evolve.
The consistent pinout scheme used throughout the entire
family also helps in migrating to the next larger device.
This is true when moving between devices with the same
pin count, different die variants, or even moving from
20-pin or 28-pin devices to 44-pin/48-pin devices.
The PIC24F family is pin compatible with devices in the
dsPIC33 family, and shares some compatibility with the
pinout schema for PIC18 and dsPIC30. This extends
the ability of applications to grow from the relatively
simple to the powerful and complex, yet still selecting a
Microchip device.
1.2Other Special Features
• Communications: The PIC24FV16KM204 family
incorporates a range of serial communication
peripherals to handle a range of application
requirements. There is an MSSP module which
implements both SPI and I2C™ protocols, and
supports both Master and Slave modes of
operation for each. Devices also include one of
two UARTs with built-in IrDA
• Analog Features: Select members of the
PIC24FV16KM204 family include two 8-bit
Digital-to-Analog Converters which offer support
in Idle mode, and left and right-justified input data,
as well as up to two operational amplifiers with
selectable power and speed modes.
• Real-Time Clock/Calendar (RTCC): This module
implements a full-featured clock and calendar with
alarm functions in hardware, freeing up timer
resources and program memory space for use of
the core application.
• 12-Bit A/D Converter: This module incorporates
programmable acquisition time, allowing for a
channel to be selected and a conversion to be
initiated without waiting for a sampling period and
faster sampling speed. The 16-deep result buffer
can be used either in Sleep, to reduce power, or in
Active mode to improve throughput.
• Charge Time Measurement Unit (CTMU) Interface:
The PIC24FV16KM204 family includes the new
CTMU interface module, which can be used for
capacitive touch sensing, proximity sensing, and
also for precision time measurement and pulse
generation. The CTMU can also be connected to
the operational amplifiers to provide active guarding, which provides increased robustness in the
presence of noise in capacitive touch applications.
®
encoders/decoders.
1.3Details on Individual Family
Members
Devices in the PIC24FV16KM204 family are available
in 20-pin, 28-pin, 44-pin and 48-pin packages. The
general block diagram for all devices is shown in
Figure 1-1.
Members of the PIC24FV16KM204 family are available
as both standard and high-voltage devices. High-voltage
devices, designated with an “FV” in the part number
(such as PIC24FV16KM204), accommodate an operat-
DD range of 2.0V to 5.5V and have an on-board
ing V
voltage regulator that powers the core. Peripherals
operate at V
Standard devices, designated by “F” (such as
PIC24F16KM204), function over a lower VDD range of
1.8V to 3.6V. These parts do not have an internal regu-
lator, and both the core and peripherals operate directly
from V
The PIC24FV16KM204 family may be thought of as
two different device groups, both offering slightly different sets of features. These differ from each other in
multiple ways:
• The size of the Flash program memory
• The number of external analog channels available
• The number of Digital-to-Analog Converters
• The number of operational amplifiers
• The number of analog comparators
• The presence of a Real-Time Clock and Calendar
(RTCC)
• The number and type of CCP modules (i.e.,
MCCP vs. SCCP)
• The number of serial communication modules
(both MSSPs and UARTs)
• The number of Configurable Logic
Cell (CLC) modules.
The general differences between the different
sub-families are shown in Ta bl e 1- 1 and Ta bl e 1- 2.
A list of the pin features available on the
PIC24FV16KM204 family devices, sorted by function,
is provided in Table 1-5.
DD.
DD.
DS33030A-page 14Advance Information 2013 Microchip Technology Inc.
PIC24FV16KM204 FAMILY
TABLE 1-1:DEVICE FEATURES FOR THE PIC24F16KM204 FAMILY
DD20282517,28,28 18,30,3020282517,28,28 18,30,30P-Device Positive Supply Voltage
V
DDCORE-----14201777P-Microcontroller Core Supply Voltage
V
VPP1126181911261819P-High-Voltage Programming Pin
REF+2227192122271921IANAA/D Reference Voltage Positive Input
V
V
REF-3328202233282022IANAA/D Reference Voltage Negative Input
SS19272416,29,29 17,31,3119272416,29,29 17,31,31P-Device Ground Return Voltage
V
Legend:ANA = Analog level input/output, ST = Schmitt Trigger input buffer, I
20-Pin
PDIP/
SSOP/
SOIC
28-Pin
PDIP/
SSOP/
SOIC
28-Pin
QFN
44-Pin
QFN/
TQFP
48-Pin
UQFN
20-Pin
PDIP/
SSOP/
SOIC
28-Pin
PDIP/
SSOP/
SOIC
2
C™ = I2C/SMBus input buffer
28-Pin
QFN
44-Pin
QFN/
TQFP
48-Pin
UQFN
I/OBufferDescription
2
C Data
2
C Clock
2
C Data
PIC24FV16KM204 FAMILY
PIC24FV16KM204 FAMILY
NOTES:
DS33030A-page 28Advance Information 2013 Microchip Technology Inc.
PIC24FV16KM204 FAMILY
PIC24FV16KM204
VDD
VSS
VDD
VSS
VSS
VDD
AVDD
AVSS
VDD
VSS
C1
R1
V
DD
MCLR
VCAP
R2
C7
C2
(2)
C3
(2)
C4
(2)
C5
(2)
C6
(2)
Key (all values are recommendations):
C1 through C6: 0.1 µF, 20V ceramic
C7: 10 µF, 16V tantalum or ceramic
R1: 10 kΩ
R2: 100Ω to 470Ω
Note 1:See Section 2.4 “Voltage Regulator Pin
(V
CAP)” for an explanation of VCAP pin
connections.
2:The example shown is for a PIC24F device
with five V
DD/VSS and AVDD/AVSS pairs.
Other devices may have more or less
pairs; adjust the number of decoupling
capacitors appropriately.
(1)
2.0GUIDELINES FOR GETTING
STARTED WITH 16-BIT
FIGURE 2-1:RECOMMENDED
MINIMUM CONNECTIONS
MICROCONTROLLERS
2.1Basic Connection Requirements
Getting started with the PIC24FV16KM204 family of
16-bit microcontrollers requires attention to a minimal
set of device pin connections before proceeding with
development.
The following pins must always be connected:
DD and VSS pins
•All V
(see Section 2.2 “Power Supply Pins”)
•All AV
•MCLR
•V
These pins must also be connected if they are being
used in the end application:
• PGECx/PGEDx pins used for In-Circuit Serial
• OSCI and OSCO pins when an external oscillator
Additionally, the following pins may be required:
•V
The minimum mandatory connections are shown in
Figure 2-1.
DD and AVSS pins, regardless of whether or
not the analog device features are used
(see Section 2.2 “Power Supply Pins”)
pin
(see Section 2.3 “Master Clear (MCLR) Pin”)
CAP pins
(see Section 2.4 “Voltage Regulator Pin (V
CAP)”)
Programming™ (ICSP™) and debugging purposes
(see Section 2.5 “ICSP Pins”)
source is used
(see Section 2.6 “External Oscillator Pins”)
REF+/VREF- pins are used when external voltage
reference for analog modules is implemented
Note:The AVDD and AVSS pins must always be
connected, regardless of whether any of
the analog modules are being used.
pin breakdown, due to
Electrostatic Discharge (ESD) or Electrical
Overstress (EOS). Ensure that the MCLR
pin
V
IH and VIL specifications are met.
C1
R2
R1
V
DD
MCLR
PIC24FXXKXX
JP
2.2Power Supply Pins
2.2.1DECOUPLING CAPACITORS
The use of decoupling capacitors on every pair of
power supply pins, such as V
SS, is required.
AV
Consider the following criteria when using decoupling
capacitors:
• Value and type of capacitor: A 0.1
10-20V capacitor is recommended. The capacitor
should be a low-ESR device, with a resonance
frequency in the range of 200 MHz and higher.
Ceramic capacitors are recommended.
• Placement on the printed circuit board: The
decoupling capacitors should be placed as close
to the pins as possible. It is recommended to
place the capacitors on the same side of the
board as the device. If space is constricted, the
capacitor can be placed on another layer on the
PCB using a via; however, ensure that the trace
length from the pin to the capacitor is no greater
than 0.25 inch (6 mm).
• Handling high-frequency noise: If the board is
experiencing high-frequency noise (upward of
tens of MHz), add a second ceramic type capacitor in parallel to the above described decoupling
capacitor. The value of the second capacitor can
be in the range of 0.01
µF to 0.001 µF. Place this
second capacitor next to each primary decoupling
capacitor. In high-speed circuit designs, consider
implementing a decade pair of capacitances as
close to the power and ground pins as possible
(e.g., 0.1
µF in parallel with 0.001 µF).
• Maximizing performance: On the board layout
from the power supply circuit, run the power and
return traces to the decoupling capacitors first,
and then to the device pins. This ensures that the
decoupling capacitors are first in the power chain.
Equally important is to keep the trace length
between the capacitor and the power pins to a
minimum, thereby reducing PCB trace
inductance.
DD, VSS, AVDD and
µF (100 nF),
2.3Master Clear (MCLR) Pin
The MCLR pin provides two specific device
functions: device Reset, and device programming
and debugging. If programming and debugging are
not required in the end application, a direct
connection to V
addition of other components, to help increase the
application’s resistance to spurious Resets from
voltage sags, may be beneficial. A typical
configuration is shown in Figure 2-1. Other circuit
designs may be implemented, depending on the
application’s requirements.
During programming and debugging, the resistance
and capacitance that can be added to the pin must
be considered. Device programmers and debuggers
drive the MCLR
levels (V
not be adversely affected. Therefore, specific values
of R1 and C1 will need to be adjusted based on the
application and PCB requirements. For example, it is
recommended that the capacitor, C1, be isolated
from the MCLR
debugging operations by using a jumper (Figure 2-2).
The jumper is replaced for normal run-time
operations.
Any components associated with the MCLR
should be placed within 0.25 inch (6 mm) of the pin.
FIGURE 2-2:EXAMPLE OF MCLR PIN
DD may be all that is required. The
pin. Consequently, specific voltage
IH and VIL) and fast signal transitions must
pin during programming and
pin
CONNECTIONS
2.2.2TANK CAPACITORS
On boards with power traces running longer than
six inches in length, it is suggested to use a tank capacitor for integrated circuits, including microcontrollers, to
supply a local power source. The value of the tank
capacitor should be determined based on the trace
resistance that connects the power supply source to
the device, and the maximum current drawn by the
device in the application. In other words, select the tank
capacitor so that it meets the acceptable voltage sag at
the device. Typical values range from 4.7
DS33030A-page 30Advance Information 2013 Microchip Technology Inc.
µF to 47 µF.
Loading...
+ 306 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.