Programming Bee with PicKit 2 under Mac OSX

On November 10, 2012 by sebastien.lelong

Just for the record, as I’ve been struggling for one hour about this… Problem is when download pk2cmd command line tool from Microchip website, included device file list doesn’t include PIC18F27J53.

$ ./pk2cmd -V -?P | grep PIC18F27J53

gives nada…

This procedure is the same as for Linux:

  • download an updated list from this forum
  • modify pk2cmd sources. Otherwise pk2cmd will complain about having to deal with a too up-to-date device list.
  • compile
  • test
Source to modify is cmd_app.h. The idea is to set a high compatibility number to fool pk2cmd when checking it.
static const unsigned char DevFileCompatLevel = 5;


static const unsigned char DevFileCompatLevel = 255;

Re-compile pk2cmd, using “make mac105″. I’m running 10.7.5, but compiled result is working properly. Then re-check:

$ ./pk2cmd -V -?P | grep PIC18F27J53
PIC18F27J53                  PIC18F_J_


Check it’s connected:

$ ./pk2cmd -?V
Executable Version:    1.20.00
Device File Version:   1.62.00
OS Firmware Version:   2.32.00

You then easily program an HEX file:


$ ./pk2cmd -Fjaluino_bee_blink.hex -PPIC18F27J53 -M
PICkit 2 Program Report
10-11-2012, 10:54:53
Device Type: PIC18F27J53

Program Succeeded.

Operation Succeeded

Comments are closed.