GETTING STARTED WITHPICs
THE LATEST IN PROGRAMMING MICROCONTROLLERS
■ BY CHUCK HELLEBUYCK
PICKIT™ 2 COMMAND-LINE
OPTION
I HAVE GOOD NEWS FOR ALL THE USERS of Microchip Technology’s PICkit 2
programmer who want to use it with an Integrated Development Environment
(IDE) other than Microchip’s MPLAB® IDE. Microchip has released a DOS command-line option for the PICkit 2, and I’ve successfully used it with the MicroCode
Studio IDE from Mecanique ( www.mecanique.co.uk) and microEngineering
Labs’ PICBASIC PRO™ sample version ( www.microengineeringlabs.com).
This is the ultimate starter setup, as
most of these software tools are
free. You can download the PICkit 2
command-line software from www.
microchip.com/pickit2. The download is a zip file, so you need to
download it and then unzip it into a
location on your hard drive. The final
step is to connect the PICkit 2 to the
USB port on your PC, and then set up
the PICkit 2 in the MicroCode Studio
IDE for that one-click compile/
program feature most of us want.
Studio. Figure 3 shows the “Add New
Programmer” window that appears.
The “Create a custom programmer
entry” should already be selected, so
click on the “Next >” button.
A second “Add New Programmer”
window will appear with a blank line.
Enter the name you want to appear in
the programmer selection window
when you select your programmer at
compile time. I chose to call it simply
“PICkit2,” as you can see in Figure 4.
After you enter the programmer
name, click the “Next >” button and
the “Editing PICkit2” window will ask
for the PICkit 2 command-line executable. If you chose a different name,
the window title will show the name
you selected. The command line
executable for the PICkit 2 is the
■ FIGURE 1. Programmer Set-up
Menu Option.
■ FIGURE 2. Programmer Set-up Window.
PICKIT 2 SETUP
The steps to set up the PICkit 2 in
MicroCode Studio are easy, once you
know what to do. First, open
MicroCode Studio, and then click on
the “View > Compile and Program
Options” selection as shown in Figure
1. The window shown in Figure 2
should appear.
The next step is to click on the
“Add New Programmer” button to create the PICkit 2 setup in MicroCode
■ FIGURE 3. Add New Programmer
Screen.
■ FIGURE 4. Enter PICkit 2 in Window.
NOTE: MPLAB and PIC are registered
trademarks of Microchip Technology, Inc.,
in the USA and other countries. PICkit
is a trademark of Microchip Technology,
Inc., in the USA. All other trademarks
mentioned herein are property of their
respective companies.
January 2008 67