This program provides a simple interface for editing the device data file PKDeviceFile.dat that comes with the PICkit2 windows programs. It's my first .NET application ever and I won't be surprised if there's a few bugs in it.I know this is a painfully simple program which probably doesn't require any documentation whatsoever, so only basic notes are provided. Program screenshot:UsageFile Menu: Open - loads and decodes file Save - overwrites the loaded file with the data in memory Save As - writes the data in memory to a file of your choosing Right click on any leaf node (in the left treeview panel) for a popup menu to: Duplicate - make an identical copy of the selected family/part/script Remove - delete the selected family/part/script Number formats: - where a field is displayed as hex (dec), you can enter Hex: e.g. 0xfa44 or &hfa44 or fa44h Binary: e.g. 0b11110010 or %11110010 Decimal: e.g. 1443 - where a field is displayed as decimal, you can enter Hex: e.g. 0xfa44 or &hfa44 Decimal: e.g. 1443 The program is generally only useful for adding new parts not currently supported by the devicefile bundled with the PICKit 2. The process, after opening the devicefile, is simply to choose an existing PIC from the list of devices, right click on it and select Duplicate Item. There will now be a copy of the part you selected. Change the properties of the new part, including the part name, to appropriate values for the new part. Then save the file and you're done. It's possible to find the appropriate fields from the datasheet and programming specification documents for the particular PIC part. Sometimes it's a little bit hard to find what you're looking for, or to even know what you should be looking for; feel free to ask on the Microchip Forums (in particular under this thread: PK2 Device File Editor Thread); there's some very knowledgeable and experienced members there. There is sometimes updates devicefiles available from Microchip (maybe search the Microchip forums). DownloadsIf you already have the .NET 2.0 framework and the VC9 redistributable dll files installed (either in the windows\system32 directory, or in the same directory of this program) you can just download the exe and dll files and the program should run. Or you can use an installer (which I haven't bothered to include for later builds - it's not needed, just copy the exe and dll to the same directory and it should run; provided the VC runtime files are present on the PC). N.B. VC Runtime files are not required from version 1.0.0.6 onwards. Version 1.0.0.7 Exe only (.NET 2.0) Version 1.0.0.6 Exe only (.NET 2.0) Version 1.0.0.5 Exe + Dll only (.NET 2.0) Notes: All fields that look like they should be hex are displayed as 0xHEX (DEC); values can be entered as decimal, hex (prefix "0x" or "&H" or suffix "H") or binary (prefix "0b" or "%"). The ScriptLength field is now automatically updated as you change script command array. Version 1.0.0.3 Exe + Dll only (.NET 2.0) Notes: The Parts List tree view section is sorted by name. Duplication now actually copies the object data (not just the reference). Fixed the collection explosion bug (probably added some new ones) Version 1.0.0.2 Installer (.NET 2.0) Version 1.0.0.2 Exe + Dll (.NET 2.0) Notes: Same as 1.0.0.1, but had to do some mods to let it compile under .NET 2.0 (required to run on the old W2k) Version 1.0.0.1 Installer (.NET 3.5) Version 1.0.0.1 Exe + Dll (.NET 3.5) Notes: Proof of concept Version 1.0.0.0 (.NET 3.5) Notes: I lost it. It was rubbish anyway so I guess it wasn't really a loss.
Notes: You may need to download these and extract them to the same directory that you extracted the above .exe + .dll to. Only required if you don't already have them on your PC.
Bugs (that I know of)
Found any new bugs? Please tell me. Enhancements- none planned
Contact For info on the PK2 device data file and what to do with it, try the Microchip forums, or more simply PK2 Device File Editor Thread (probably how you found this page) |