Pinguino Forum

Full Version: PIC18LF25K50
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

I finished my circuit with a PIC18LF25K50 and burn the bootloader into the microcontroller.

When I download the sketch to the target, I get the following message:
Quote:[OUT] Pinguino found ...
[OUT]  - with PIC18lf25k50 (id=5CA0)
[OUT] Aborting: program compiled for 18f25k50 but device has 18lf25k50

How to solve this microcontroller model problem?

Thanks in advance.

(25-03-2016, 05:10 PM)Thoma HAUC Wrote: [ -> ][OUT] Aborting: program compiled for 18f25k50 but device has 18lf25k50

I am not a IDE expert but I can tell you that the difference between the two chips is the "L" means it has low power mode capability. I have not run into any problems myself but I have seen quite a few warnings about MicroChip sending chips from the factory with some of these chips set in the "low power" or vice versa mode and it sometimes takes a Picket3 to knock it into the desired mode. The low power mode requires. I actually don't know if LVP and "Low Power" have anything to do with chip detection or not, nor do I know if the ICSP pin values have anything to do with the USB during programming. This may not be the problem, but it gives you something to look into Smile

I found this note at

The purpose of this pin is to hold PGM low so the microcontroller does not enter LVP mode. It will usually be done using a pull down resistor e.g. 10k.

Note: If you program the microcontroller with LVP mode off then this signal will have no effect.

"Note: Older pic micros used this line to directly power the programming circuit that updates the Flash memory. So this connection had to supply some current. With the newer parts that allow LVP (Low Volt programming) the programming voltage is generated internally so the Vpp signal from the pic ICSP is only used as an indicator i.e. it doesn't have to supply current.

If a LED is placed on PGD that draws 20mA when on. The output voltage may be pulled too low for the ICSP programmer to read back the desired voltage i.e. it will give a verification failure."

I found the line where the check is done.

As quick workaround, I simply disable the test:
qtgui\pinguino_api\uploader\ @ 491:
if (False):

Now, I can download the sketch to the board. But it is a ugly way.

@ Pinguino developpers:

Do you think the below patch is valid with all PIC18 variants?

---   2016-03-26 10:37:32.000000000 +0100
+++   2016-03-26 10:37:43.000000000 +0100
@@ -489,4 +489,4 @@
        self.add_report(" - with PIC%s (id=%X)" % (proc, device_id))
-        if proc != board.proc:
+        if proc.replace('18lf', '18f') != board.proc:
            self.add_report("Aborting: program compiled for %s but device has %s" % (board.proc, proc))