News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

Compile and Program?

Started by dr-zin, Sep 20, 2025, 05:13 AM

Previous topic - Next topic

dr-zin

A query-- does anyone use one the PIC programmers listed in the "Compile and Program Options" menu choice of the compiler IDE?  I have seen that capacity for years (since Proton times), but as I use PicKit 2-4 programmers, I have never had occasion to avail myself of that option.  It's always a multistep operation to open the programmer window, select the file to program, then flash it to the chip.  The ability to streamline the affair sounds wonderful, but I don't have access to the listed programmers.  If anyone is using this "click and flash" route, please tell me what you program with, and whether it is worth it.  Thanks!

diebobo

Use the vscode with plugin from atomix, that one can compile and program with one button. You have to set up the programmer once though.

Mapo

with pickit 2 or 3 select "Auto import Hex + write device" and every time the Hex file is updated, pickit will write the new firmware

Frizie

#3
Quote from: dr-zin on Sep 20, 2025, 05:13 AMIt's always a multistep operation to open the programmer window, select the file to program, then flash it to the chip.

That's not necessary at all.
In Proton IDE, you can also compile your program with a single press of the F10 key and then have it automatically programmed into the PIC by a PICkit2...5.
 F9 = Compile only
F11 = Programming only an existing HEX into the PIC
F10 = A combination of both

You just need to configure Proton IDE for a PICkit.

See for PICkit2: https://www.picbasic.nl/instelling_pickit2_uk.htm

PICkit4 unfortenately only in Dutch language: https://www.picbasic.nl/instelling_programmer.htm

_________________________________

And then there is also the PICKitPlus software, which you install in almost the same way, but which allows you to program many newer PIC types, with the old, trusted PICkit2.
Ohm sweet Ohm | www.picbasic.nl

dr-zin

OMG!!!
Thanks so much for the info., Frizie.  Ask, and ye shall receive.  I set up to use an old PICkit 2, and it's soooo sweet.  I'm like a kid in a candy store again.  I would have never been able to piece together all those steps without some help (and the download file).

Hooking up and powering my dev. board from my laptop, I can make changes so much faster.  PRODUCTIVITY^2 (especially with how buggy the PICkit 3 window is).  It's like using an interpreter instead of a compiler.  I'm sure I'll get jaded in a few months, but for right now, it's a total game-changer.  Now that I know what's possible, I'll try to do the same for PICkits 3&4.

Thanks again all who responded.  Cheers--Paul

Stephen Moss

@dr-zin the PICkit 2 & 3 are very old now and work fine for older devices when using the Microchip software for them but if you want to use them for newer devices you will need to use 3rd party PICkit software that has been modified to allow them to program the new devices.
PICkit Plus was the first, it is virtually identical in appearance and use the the Microchip version of the software and some people here like myself use it, but others use PICkit minus, which came out later.

dr-zin

Stephen,

Thanks for the follow up info.  Based on Frizie's post above, I looked at the PICkit Plus website.  I like what I see.  This makes a lot of sense considering that I am trying to make a concerted effort to move to more modern PICs than the one's I originally cut my teeth on 25 yrs. ago (12F629/16F628/16F877, etc,).  Yes, I have used 18F2550 and 18F4550's for work projects, but I use modest chips for my own projects.  And yes, I know these are baby chips compared to those of you using the ds and other high-end series PICs, but I get a lot of mileage (kilometerage?) out of them, especially if I augment using GALs and CPLDs for speed interfaces.

However, these older chips are becoming harder to get, and Microchip is sheparding people to move away from them by elevating their prices relative to newer products like the 16F18323 and others.  Infuriatingly, when researching newer chips, it is not easy to figure out which programmers will work with them.  Microchip certainly makes you work to see if you need PICkit 3/4/5+ to work with them.  NOT good marketing, but that's their problem.  Okay, enough grousing from me...

I have not checked out PICkit minus site, but I will.  I would have bought from PICkit plus on the spot, but they only take PayPal payments, and I haven't had a PayPal account since 2016.  It may be worth setting up an account for a one-time payment, then cancel it, but more work than it should be.  Oh well, if it leverages my older programmers for extended use, it's certainly worth it.  Thanks again for the input.  Regards, Paul


RGV250

Hi Paul,
I refuse to have a PayPal account but you can checkout as guest on Pickit Plus (another satisfied customer), it is not that obvious but it there.

If you have a problem contact Evan, he is normally quick to respond.

Bob

dr-zin

Thanks Bob.  I just went and downloaded PICkit minus to try (minimal hassle).  I will purchase a license for PICkit Plus as soon as possible based on your and Frizie's endorsements.  It is good value and I appreciate that.  Cheers,  Paul

charliecoutas

As Bob says, Evan (at PicKit2 Plus) is very helpful. It makes a change to deal with a company run by human beings and not just machines.

Charlie

Frizie

Dr.-Zin, another tip for faster compilation is to disable the optimizer during the design phase of your program.

Write somewhere at the top of your program:  Declare Optimizer_Level = 0

This reduces compilation time.
Once your program is completely finished, remove the line.
Ohm sweet Ohm | www.picbasic.nl

dr-zin

Thanks again, Frizie.  Another pro tip.  Honestly, I'm not disappointed with compilation time or programming flash time.  My modest programs only require 5-6 secs. for each process.  Even when I was completely filling up a 18F4550 (only had 3 Intel hex chars. left at the bottom of the PICkit 4 window), total program time was only 12-15 seconds.  Not terrible at all, as long as I was not trying to reflash after every line change.

My issues are: 1) I'm not fond of the PICkit 4 MPLAB X programming windows, and I downright hate the buggy PICkit 3 window problems.  Having to call either up as separate environment windows and manually selecting the compiled file to flash is a drag. And 2) I didn't think I was exploiting all the power of the Positron compiler IDE, and I wasn't.  As a matter of fact, there is probably more productivity goodness hidden in there that I still don't know about.

Indeed, I'm going to make a concerted effort to review the manual code commands and try to expand my repertoire to include more of them.  Example, I invariably use 
Serin/Serout for async communication, while I see code examples in the forum that use Rsin/Rsout.  I need to figure out what the advantages are here and try to use them as appropriate.  This no doubt stems from starting out with the BASIC Stamp in the '90s, and not expanding my command set as the times changed.  Oh well, that's my problem, but I am going to attempt to modernize my coding techniques in the future.  Thanks.

Frizie

Quote from: dr-zin on Sep 23, 2025, 05:47 PMMy modest programs only require 5-6 secs. for each process.  Even when I was completely filling up a 18F4550 (only had 3 Intel hex chars. left at the bottom of the PICkit 4 window), total program time was only 12-15 seconds.

But I'm talking about reducing compile time, not the time needed to program the HEX in the PIC itself, which is indeed always quite fast.
For a large program, the difference in compile time can easily be 10-15 seconds  ;D
Ohm sweet Ohm | www.picbasic.nl