Just Another PIC Programmer (JAPP) update

46 views
Skip to first unread message

rob...@hotmail.com

unread,
Sep 14, 2024, 10:10:35 AM9/14/24
to jallib
Hi all,

As a side project I am working on the JAPP.  I drafted a manual to share what you can do with it and give you an idea what I am working on (see attachment). The challenge is to add all PICs (which are a lot) so I just started with some PICs.

With the help of Rob Hamerling I got a nice Python file that contains all PIC Programming info derived from the MPLABX PIC files. This file will be provided with the JAPP including some other supporting files. My plan is to make a PCB for the programmer. 

Note that it is a simple programmer using the same connections as a PICKit2 or PICkit3.

The order in which I add PICs is random so if you have certain PICs that you use frequently let me know. I can add them first.

Although there are about 100 programming algorithms, some of them (I do not know how many) are the same (hopefully most of them). Currently I implemented 5 algorithms but some programming algorithms reuse functions of other algorithms.

Since I am currently in the prototyping fase, if you have certain requests or remarks on the manual, let me know.

Kind regards,

Rob
JAPP Manual.pdf

vsurducan

unread,
Sep 18, 2024, 5:24:12 AM9/18/24
to jal...@googlegroups.com
Hi Rob,
Assuming I do not want to hear about Python and I want to use a simple terminal to send the commands to the programmer, how do I load the pic programmer info and the hex file?
thx,

--
You received this message because you are subscribed to the Google Groups "jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jallib+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jallib/045cc916-0f9f-4152-a5d3-9c706b8b963dn%40googlegroups.com.

vsurducan

unread,
Sep 18, 2024, 5:44:15 AM9/18/24
to jal...@googlegroups.com
One more: why have you used 3.3Vfor the charge pump of the programming voltage since the main supply is 5V ?
Perhaps it's not very practical to reduce voltage from 5V to 3.3V and then increase it (3.3V to Vpp) to dissipate on LDO all the switching energy required for Vpp, even if it works.

Rob CJ

unread,
Sep 18, 2024, 1:01:17 PM9/18/24
to jal...@googlegroups.com
Hi Vasile,

Initially the charge pump was connected to 5 Volt but due to the fact that some PICs (like the 18F26J50) only work on at most 3.5 Volt and I needed some special pattern to apply to the MCLR pin for programming I cannot use 5 Volt since it will be too high (VPP must be at 3.3 Volt, same as VDD).

And about the Python stuff. All programming info needs to be extracted from all XML files of Microchip. Initially I though that a JSON format would be OK but after some discussion with Rob Hamerling it was easier to use Python since my plan was already to use a Python to make programming easier. Rob Hamerling created the script to extract all this info and created the picpgmdataclassinfo.py.

So I can - and will - document how to get the programming info in the PIC Programmer but the programming info itself is in this Python file, see attachment. I also attached the japp.py library that extracts the programming info and translates that to data that is send as pic-info (so there is the initially documentation) and it offers functions to make life a bit easier.. Last but not least I also attached the Python script that does the programming and uses the japp.py file (which uses the picpgmdataclassinfo.py).

You can of course use some other scripts to get the programmer info in the PIC programmer as long as you use the commands that transfer the correct programming data. As said I will update the manual since all is ASCII so there is no need for any special script language. 

Kind regards,

Rob




Van: jal...@googlegroups.com <jal...@googlegroups.com> namens vsurducan <vsur...@gmail.com>
Verzonden: woensdag 18 september 2024 11:44
Aan: jal...@googlegroups.com <jal...@googlegroups.com>
Onderwerp: Re: [jallib] Just Another PIC Programmer (JAPP) update
 
japp.py
load_pic_info.py
pic_programmer.py
picpgmdataclassinfo.py

vasi vasi

unread,
Sep 18, 2024, 2:41:19 PM9/18/24
to jal...@googlegroups.com
If the python script uses only "console" functions, it can be compiled into an executable file. I know there are compilers for python... at least, Linux and Windows.



--
Vasi

Rob CJ

unread,
Sep 19, 2024, 1:56:20 PM9/19/24
to jal...@googlegroups.com
Hi Vasi,

Yes that is correct, you could do that.

If you only use a limited number of PICs (and you  do not want to use Python) you could make your own pic_info file with the correct programming parameters as textfile that you then 'copy' this file to the PIC programmer once you have given the pic programmer the command to load the pic info. That can easily be done in a batch (or bash) file.

This is also what happens when you load a hexfile in the pic programmer. You first give - via the COM port - the command to load the hexfile (!LHF) and after that the hexfile is simply copied to the COM port and stored in the pic programmer. 

Kind regards,

Rob


Van: jal...@googlegroups.com <jal...@googlegroups.com> namens vasi vasi <fun...@gmail.com>
Verzonden: woensdag 18 september 2024 20:40

vsurducan

unread,
Sep 19, 2024, 11:43:23 PM9/19/24
to jal...@googlegroups.com
Hi Rob, I did not knew that. So there are PICs with 3.3V Vpp....

There are rumours that STM are manufacturing some microcontrolers which are at least few class better than PICs. 32bit arhitecture, very low power, strong compiler.
For 8bit, maybe PICs will last a while...
Good luck with the programmer!


rob...@hotmail.com

unread,
Sep 28, 2024, 8:05:58 AM9/28/24
to jallib
Hello all,

Just another update about the PIC programmer. I ordered a static memory of 1 Mbit to store the hexfile but it did not work. Seems that there is too much disturbance on the breadboard for the SRAM to function correctly. So I made a PCB with some ground planes to fix that (I hope). Just ordered it at JLCPCB for less than 2 dollar (for five boards!) but when you add - the lowest - shipping costs and customs it is about 5 dollar for 5 boards, so still very cheap. Board is made using KiCAD 8.0 which is new to me. Before that I used EAGLE but the free version of EAGLE is limited to 10x10 cm. KiCAD is open source with no limitations (and also no limitations to the number of layers while EAGLE is limited to 2 layers). The board is around 10 cm by 5 cm (initially it was 11 cm but then it costs more so I made it a bit smaller).

The board will have a Micro USB-B and USB-C connector. To give you an impression I added a 3D view. Not all components have a 3D model so those are not shown. All components are standard so no SMD. For the USB-C connector I am using a module that consists of a USB-C connector on a PCB with 4 connections (+5V, Ground, D+ and D-) that fits on a standard 4-pin header. 

Kind regards,

Rob


Op vrijdag 20 september 2024 om 05:43:23 UTC+2 schreef vasile:
PIC_Programmer.png
Reply all
Reply to author
Forward
0 new messages