Electronic Products
Find us here:
  • Books
    • Embedded C Books >
      • cbookfiles
      • cbook2files
      • cbook3files
    • BASIC Books >
      • Programming PICs in BASIC_vol1
      • PICBasic Book Support
      • Basic Atom Book Support
    • Other Books >
      • Arduino Book
      • chipkitbookfiles
  • Chuck's Blog
    • Blog Posts Archive
    • Disclaimer
  • YouTube Channel
  • About Chuck
    • About Chuck
    • Stock Car Racing
  • 3D Printing
    • Fabrikator Mini
  • Getting Started with PICs
    • BASIC Programming
    • C Programming >
      • C Compilers
  • Build Your Own PICKit 2
    • PICkit 2 Starter Kit
  • CHIPINO
    • Shields
  • CHIPAXE Breadboard Modules
  • Understanding Hex Files
  • chipKIT
  • Newsletter Archive
  • Contact
  • Retired Designs
    • BasicBoard
    • Ultimate OEM
    • Maximite BasicBox
    • Maximino
  • Downloads
  • Kickstarter Projects
    • Demo-Shield
  • Great Cow Basic Site
  • Buy Hardware
  • Links I Recommend

PK2CMD Update

1/30/2014

1 Comment

 
I just recently tried to visit the Microchip PICkit 2 site and found it was taken down. This prompted me to make sure I had everything for my own PICkit 2 project covered. Which reminded me that I've been wanting to cover an update, to the PK2CMD command line control, that I found a while ago.

I like using the PICkit 2 with the PK2CMD.exe command line control. I can embedded it into any IDE with ease and automate the programming of the microcontroller through the PICkit 2 programmer. The limitation of the Microchip released PK2CMD vs the PICkit 2 GUI control was they used different device files and the PK2CMD didn't support as many devices as the GUI supported. The GUI supported more of the latest devices but neither supported the PIC18F25K22 which is an awesome device. 

But several years ago a Microchip forum post by MichaelS explained that he figured out how to modify the PK2CMD to work with the device file for the GUI. So this meant that the PK2CMD v1.21 by MichaelS could support all the parts that the GUI supported. And if that GUI device list was ever updated, then the PK2CMD would also get updated by that same file.
Picture
PICkit 2 GUI
Unfortunately the PICkit 2 Device file hasn't been updated by Microchip since the PICkit 3 is the officially supported low cost programmer for the newer devices. And now the PICkit 2 site that had all the archived info is no longer up (at least that I can find). MichaelS had also updated the device.dat file to include more parts including the PIC18F25K22. So I've added the MichaelS 's PK2CMD v1.21 and his latest Device File to my PICkit 2 page. But the story continues.....
It all gets very confusing but that is what typically happens when something is open sourced. Multiple people work on improving it with typically minimal coordination.

The original set of files that are part of the MichaelS V1.21 .zip file include some documentation and files for mac and linux users but frankly I couldn't figure it all out. And I couldn't find a document that explained what devices are supported. So I used the PK2CMD command -?p to get a list to verify the PIC18F25K22 was supported. You can do the same by typing the command at the dos prompt 
pk2cmd -?p
and it will list all the devices quickly. If you just want the PIC12 parts listed then type
pk2cmd -?p pic12

I simplified it all for Windows users and just placed the two main files you need, pk2cmd.exe and pk2devicefile.dat on my PICkit 2 page. Assuming you have the PK2CMD installed on a Windows machine, then just replace those two older files of the same name with these two new ones and you are set.
I typically use PICkit 3 and MPLAB X when I'm using my Mac for C code but for Basic Compilers  I only use PICkit 2 with Windows and I also run XP through Parallels on my iMac.

Now if you are really in for a challenge, there are two guys who made their own PICkit 2 device file editors so you can add new parts as they are released. I haven't tried these out yet. You have to know the device ID and more information from the programming spec of the device to do this but here are the links if you want to try this out.

Jared Sanson Device Editor
Dougy83 Device Editor

These are not for the beginner and I really don't have the time or desire to dig too deep. I'm just happy I have a simple set of files that support many of the latest parts such as the 
PIC12F1xxx
PIC16F18xx
PIC16F19xx
PIC18F25kxx
This is a great feature addition to the old PICkit 2.

I also found a site that has a ready made PICkit 2 Device file that reports to supporting the latest devices for a total of 678 devices. I still have to try that one out. It's added to my PICkit 2 page as well.

Whew!! That was a lot to cover in one blog post. I hope it was helpful.


1 Comment
Abby Maxwell link
11/20/2023 07:26:42 pm

Very thouughtful blog

Reply



Leave a Reply.


    Categories

    All
    3D Printer
    Chipaxe
    Chipino
    Chipkit
    CNC
    Copper Connection
    Dot Matrix
    Elproductsnews
    Expresspcb
    Graphic Lcd
    Great Cow Basic
    Kickstarter
    Lcd Shield
    Makefaire
    Makercase
    Maximite
    Microchip Pic
    Pickit 2
    Pickit 3
    Videos

    Visit previous blog posts in the archives below.

    Archives

    February 2018
    October 2017
    September 2017
    July 2017
    November 2016
    August 2016
    July 2016
    May 2016
    March 2016
    January 2016
    November 2015
    September 2015
    August 2015
    July 2015
    June 2015
    April 2015
    March 2015
    February 2015
    January 2015
    December 2014
    November 2014
    October 2014
    September 2014
    August 2014
    July 2014
    June 2014
    May 2014
    April 2014
    March 2014
    February 2014
    January 2014
    December 2013
    November 2013
    October 2013
    September 2013
    August 2013
    July 2013
    June 2013
    May 2013
    April 2013
    March 2013
    October 2012
    October 2011

    RSS Feed



    About Chuck

    Chuck has been programming with PIC Microcontrollers since there were only five devices. Now there are over 700 and growing. He also has a lot of fun 3D printing designs using his Davinci 3D printer and TinkerCad software. In this series of blog posts and occasional videos on his YouTube Channel he tries to help you get started with electronics and 3D printing.

    Disclaimer

Powered by Create your own unique website with customizable templates.