Microchip Technology DM240312 Data Sheet

Page of 64
Programming and Debugging the Board
 2010 Microchip Technology Inc.
DS51911A-page 23
FIGURE 3-5:
BUILD OUTPUT
3.5
PROGRAMMING THE PIC24FJ256DA210
Programming the PIC24FJ256DA210 is possible through any one of the following 
development hardware:
• MPLAB REAL ICE in-circuit emulator
• MPLAB ICD 2 or MPLAB ICD 3
• PICkit  3
• The MPLAB PM3 Universal Device Programmer
For this example, MPLAB REAL ICE in-circuit emulator is assumed to be used.
3.5.1
Set Up the Device Configuration
The device configuration for the PIC24F devices can be set by two methods:
• Using configuration macros in the source code
• Using the Configuration Bits window in MPLAB IDE
To display the Configuration Bits window, select Configure > Configuration Bits from the 
menu bar (Figure 3-6). 
All demos that come with the Microchip Application Libraries include the configuration 
macros in the code. It is recommended to use these configuration settings in the code. 
To do this:
1.
Open the Configuration Bits window. 
2.
Select the check box Configuration Bits set in code, located at the top of the 
window, to enable the use of the configuration in code.
For building applications that do not include configuration macros, it is possible to set 
the device configuration by using the Configuration Bits window. To do this:
1.
Open the Configuration Bits window.
2.
Set the Configuration bits by clicking on each line item and selecting an option 
from the drop-down menu that appears. The Configuration bits for the PIC24F 
device on the PIC24FJ256DA210 Development Board should be set as shown 
in Figure 3-6.