PIC16F18857 programming with PICKIT2 - Page 1
Forum section: electronics / general

author: bequest333
author_rank: Contributor
timestamp: January 24, 2018, 03:30:13 pm
content: Hi,I was able to program PIC16F18857 with PICKIT2.1.It is necessary to create 14 new scripts.2.It is necessary to minimize-recompile "PICkit2_PCAppSource_V2_61".3.It is necessary to?describe Reverse lower 14-bit's deviceID in the Script. (ICSP MSB Fist Device only.)18857's DeviceID:3074 ->00.11.00.00.01.11.01.00 ->00.00.10.11.10.00.00.11 -> 0B83Attach the changed host and device file.<ICSP compatibility>?Load PC Adress AAF2 BB01 AAE7 BB01 AAF2 BB80 AAF2 BB07 AAF2 BB00F2 01 WRITE_BYTE_LITERAL 01 //0000.0001 -> 1000.0000 Load PC Address(80)E7 01 DELAY_SHORT 01 //TDLYF2 80 WRITE_BYTE_LITERAL 80 //1000.0000 -> 0000.0001 0x01 //Adress UF2 07 WRITE_BYTE_LITERAL 07 //0000.0111 -> 1110.0000 0xE0 //Adress HF2 00 WRITE_BYTE_LITERAL 00 0x00 //Adress L?Load for NVM AAF2 BB00 AAE7 BB01 AAF2 BB00 AAF1 AAF1F2 00 WRITE_BYTE_LITERAL 00 //0000.0000 -> 0000.0000 Load for NVM(00)E7 01 DELAY_SHORT 01 //TDLYF2 00 WRITE_BYTE_LITERAL 00 //Data U *Send "0"F1 WRITE_BYTE_BUFFER //Data L *Replace H/L and LSB/MSB Sort inside the host after sending.F1 WRITE_BYTE_BUFFER //Data H *?Read from NVM AAF2 BB3F AAE7 BB01 AAEF AAF0 AAF0F2 3F WRITE_BYTE_LITERAL 3F //0011.1111 -> 1111.1100 Read from NVM(FC)E7 01 DELAY_SHORT 01 //TDLYEF READ_BYTE //Data U *Receive only (Not use Buffer)F0 READ_BYTE_BUFFER //Data L *Replace H/L and LSB/MSB Sort inside the host before receiving.F0 READ_BYTE_BUFFER //Data H *?Other commandsLAB <-> MSB only SortF2 18 WRITE_BYTE_LITERAL 18 //0001.1000 -> 0001.1000 Bulk Erase Memory(18)F2 0F WRITE_BYTE_LITERAL 0F //0000.1111 -> 1111.0000 Raw Erase Memory(F0)F2 1F WRITE_BYTE_LITERAL 1F //0001.1111 -> 1111.1000 Increment Address(F8)F2 07 WRITE_BYTE_LITERAL 07 //0000.0111 -> 1110.0000 Begin Program(E0)Referred to:http://www.microchip.com/forums/m1011325.aspxbest regards,Dan

author: picandmix
author_rank: Frequent Contributor
timestamp: January 24, 2018, 08:30:56 pm
content: Normally all you have to do, is rename your existing PK2DeviceFile.dat in the Pk2 folder and then copy over the new Mypk2devicefile.dat file into the Pk2 folder and rename it PK2DeviceFile.datThats it , as soon as you start V2.61 the new file is loaded, no need to reload anything.If you intend to do lots more work with the newer Pics then getting a Pk3 ,genuine or a cheap clone, means you have ready made access to all the new chips and future updates by Microchip, plus it allows you to Debug your program via Mplab, along with the other useful features like Usart tool etc.

author: pekka
author_rank: Newbie
timestamp: April 22, 2019, 09:26:22 am
content: Dear bequest333I am very pleased to find your program to do PIC16F18857 with PICKIT2.I do have PIKKIT3 also, but it needs all kinds software to program wit it.I have prorammed PICs since 1995.PICKIT2 is quite good device.I downloaded your software and put it same index with PICKIT2 program.It was PICKIT2.61 version.I renamed your datafile My_PK2DeviceFile.dat to PK2DeviceFile.dat.I started to program PIC16F18857.It found the device!Then I took my old program ( HEX file) and try to download the program.It was done by a CCS/PCM vesion 5.07It went right, but checking the program, it will show that eeprom was not right.I read the PIC16F18857 and got that my eeprom was full of 0xC0.Then I tried to program the PIC again with 0xC0's in the eeprom file.It will give the configuration error?Well your software is almost ready, but it will need some fine adjustment.Can you check your fine program?My email is oh3gdo@gmail.comRegardsPekka RitamakiFinland

author: jaka
author_rank: Contributor
timestamp: June 04, 2021, 04:48:29 pm
content: Hi all,First, I apologize bringing up this old topic. But I must thank the OP bequest333 for the hard work to support SPI type PICs!I used your modified source files, and developed them further. I added support for new PIC18 family with SPI type programming ( PIC18F MSB1st ). I also fixed the bit shifting of device ID, which is now read correctly. This means that it is possible to use the device file from PICKitPlus project.I call the software PICkit2- or PICkit2minus. I attach the new software, modified source files and device file to this post. The device file is the last publicly available PKPlusdevice file 2.63.218, but I have fixed the K83 family which had incorrect configuration mask.The PICkit2- is also available on my website athttp://kair.us/projects/pickit2minus/index.htmlIf I make new versions in future, they will be released there.

author: bequest333
author_rank: Contributor
timestamp: June 05, 2021, 05:19:54 pm
content: Hi,jakaThank you for picking up my old topic.First thanks.I would like to thank you for making improvements related to ID that I could not do.Second thanks.Finally, thank you for publishing the improved source files.Third thanks.I feel thatthe world is connectedfrom the thread of the Microchip Forum mentioned in the first thread.Thank you very much.

author: MarkF
author_rank: Super Contributor
timestamp: June 06, 2021, 12:52:04 am
content: Are you aware of the PICkit2 Device File Editor program.I'll attach the executable (don't remember where I downloaded it from).

author: DavidAlfa
author_rank: Super Contributor
timestamp: June 06, 2021, 10:59:35 pm
content: This was a thing 10 years ago, when the pickit3 was still expensive (40-50euro).I remember modding the pickit 2 database to add support for the PIC32MX795.But it was slow and painful. When the clones appeared, I bought one at sure electronics for 25euro. And it still works today!Nowadays you can get them for 10euro or less, so what's the sense on keeping the pickit 2 alive?It costs close to the pickit 2 and you can't debug or program new devices using MPLAB X.You are tied to use pickit 2 programmer forever

author: nigelwright7557
author_rank: Frequent Contributor
timestamp: June 07, 2021, 02:47:36 am
content: Quote from: picandmix on January 24, 2018, 08:30:56 pmBe careful where you source your PK3. I got a Chinese copy and had all sorts of reliability problems.I got one from Farnell and that one worked much better being an original Microchip version.I have a Snap programmer for bigger chips as it is much faster than PK3 but cant supply power to the device.

author: jaka
author_rank: Contributor
timestamp: June 07, 2021, 03:39:16 pm
content: My main motivation to update PICkit2 software for new devices is to provide easy and cheap way for people to program PICs used in my electronics projects. I agree that if you want to develop and debug your own code, you should be looking at something more modern.I have used many different programmers/debuggers throughout the years. ICD2, PICkit2, PICkit3, ICD3, CCS ICD-U80, CCS ICD-U64, PICkit4, ICD4. The most reliable of these devices has been the PICkit2, it just works. For just programming the PIC, the easiest to use software is the PICkit2 (and 3) standalone software. These are only my opinions and experience.Well, to be honest I haven't been using PICkit4 and ICD4 that much. I didn't run into problems with those, so they look promising. Except the software. The command line IPECMD is sooooo sloooooooow compared to earlier Microchip command line tools, which were tool-specific.I forgot to thank PICKitPlus team (https://www.pickitplus.co.uk/) in my first post, for their work on maintaining the device file. They have now decided to supply device file updates only for paying customers. I understand that, as it is tedious work.

author: nigelwright7557
author_rank: Frequent Contributor
timestamp: September 14, 2021, 02:50:41 am
content: I use a pickit 3 and a snap programmer.The snap is much quicker than pk3 but cant supply power to a pcb.pickit3's are peanuts now.I bought a Chinese PK3 but it was unreliable.So bought next one from a reputable dealer and its been fine.