How to use 44-pin demo-board of PICkit 2 set
with PIC16F887
as a brain of small home-made robot.
How to use in robotics light/image sensor of cheap
optical mouse as a local position finder.
How to use cheap optical mouse instead of gyroscope.
Source code in C for PIC16F887 for this.
PICkit 2 - Small size USB programmer from Microchip
Which PIC devices it can program.
Ricently we bought PICkit 2 Development Programmer/Debugger with
44-pin demo board with PIC16F887 midrange PIC microcontroller.
PICkit 2 is a small size programmer with USB interface.
It is very cheap, by the way (something about $30-$50).
I installed MPLAB v7.70 and when I opened file 'README FOR PICKIT 2.HTM',
(located in file:///C:/PROGRAM FILES/MICROCHIP/MPLAB IDE/READMES/README FOR PICKIT 2.HTM)
I found very limited number of supported devices.
(See: file:///C:/PROGRAM FILES/MICROCHIP/MPLAB IDE/READMES/README FOR PICKIT 2.HTM#_Toc147201232)
But we had an idea to do some tests with USB-enable PICs, like PIC18F4550 and PIC18F2550.
Also I like to use for my small robots good old PIC16F628.
Is it possible to program such a PICs?
And we asked several questions to ourself :
Which PICs are possible to program with PICkit 2 in reality?
Why you can see very limited number of PIC in that file?
Is it possible to program more devices?
How to do this?
Then we found that such a limited number of PICs is just characteristic of combination of MPLAB+PICkit_2.
If you use for programming your PICs special program 'PICkit 2' instead of MPLAB,
then you can program much more devices (see list of supported devices at the bottom of this page).
Note, that when you program device, using MPLAB+PICkit_2, then you can use breakpoints, debug, etc.
But when you use special program 'PICkit_2', then you can just program and verify and thats all.
MPLAB 7.60 and PICkit 2
After the installation MPLAB 7.60 normally you will see it's icon on your desctop.
It loks like:
MPLAB IDE 7.60 Icon.
MPLAB IDE v7.60 Configure / Select Device.
If you choose Configure / Select Device,
you can see which programmer can be used to program this or that PIC device.
For example:
As you see, it is impossible to program PIC18F2550, using MPLAB+PICkit 2.
Programming PIC16F887 by MPLAB is just partly supported (beta support).
Programming PIC12F510 with MPLAB+PICkit 2 is supported (full support).
First you should compile your project.
Then you should export your HEX file to special format, which can be used with PICkit 2 programmer.
You should put new hex file of new 'OS' for PICkit 2 to file:
"c:\Program Files\Microchip\PICkit 2 v2\PK2V022000.hex"
MPLAB IDE v7.60 Export HEX file for PICkit 2 - Settings for 'Memory Areas'.
MPLAB IDE v7.60 Export HEX file for PICkit 2 - Settings for 'File Format'.
Now you can click the icon of 'PICkit 2' program:
PICkit 2 v2.40 Icon.
Load HEX file and program it to device.
TO BE CONTINUED...
Supported devices:
(List of devices, which you can program with special program 'PICkit 2'.)
* Indicates new parts supported with v1.40 of the device file.
+ Indicates parts that require 4.75V minimum VDD for programming.
PICkit 2 may not be able to generate sufficiently high VDD,
so an external 5.0v power supply may be required.
# indicates Midrange parts that support low Vdd programming
Serial EEPROM Devices
---------------------
NOTE: Other supported voltage grades are listed in paratheses
next to the device. Select the "LC" part number to program
these other voltage grades.