Hot!Problem with Curiosity HPC and PIC18F45K20

Page: 12 > Showing page 1 of 2
Author
saviga
New Member
  • Total Posts : 7
  • Reward points : 0
  • Joined: 2018/10/18 08:34:59
  • Location: 0
  • Status: offline
2018/10/19 07:34:01 (permalink)
0

Problem with Curiosity HPC and PIC18F45K20

Hi. I have a Curiosity HPC board and I am trying to load with MPLAB X v5.05 in a new PIC18F45K20 (it was never programmed) the example software that I downloaded from your website but it is not possible. An error message informs me that the LVP bit of the configuration word is OFF but in the program we have
#pragma LVP = ON.
Also in MPLAB X I can not find an option to activate the LVP.
With the PIC16F18875 that brings the plate I had no problem.
I do not know what is the problem.
Greetings and thank you.
#1

21 Replies Related Threads

    qhb
    Superb Member
    • Total Posts : 7545
    • Reward points : 0
    • Joined: 2016/06/05 14:55:32
    • Location: One step ahead...
    • Status: online
    Re: Problem with Curiosity HPC and PIC18F45K20 2018/10/19 14:53:59 (permalink)
    0
    saviga
     An error message informs me that the LVP bit of the configuration word is OFF but in the program we have
    #pragma LVP = ON.

    That is talking about the setting in the chip itself, not in your code.
    This can often mean it is not actually talking to the chip correctly at all.
    Can you show ALL the messages shown in the output window when you try to program?
     
    #2
    RISC
    Super Member
    • Total Posts : 5317
    • Reward points : 0
    • Status: offline
    Re: Problem with Curiosity HPC and PIC18F45K20 2018/10/19 15:26:17 (permalink)
    4 (2)
    Hi,
    I think your syntax is not correct...
    It should be :

    #pragma config LVP = ON

    Regards
    #3
    saviga
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2018/10/18 08:34:59
    • Location: 0
    • Status: offline
    Re: Problem with Curiosity HPC and PIC18F45K20 2018/10/20 08:19:44 (permalink)
    0
    This is the example code of the microchip website for the curiosity plate and the pic18F45K20. The configuration of the LVP is:
     
    // CONFIG4L
    #pragma config STVREN = ON // Stack Full/Underflow Reset Enable bit->Stack full/underflow will cause Reset
    #pragma config LVP = ON // Single-Supply ICSP Enable bit->Single-Supply ICSP enabled
    #pragma config XINST = OFF // Extended Instruction Set Enable bit->Instruction set extension....
    #pragma config DEBUG = OFF // Background Debugger Enable bit->Background debugger disabled....
     
    The error message is
     
    Connecting to Starter Kit on Board...
    Currently loaded firmware on Starter Kit on Board
    Firmware Suite Version.....01.54.00
    Firmware type..............PIC18F
    MPLAB X has detected that the device’s low voltage configuration bit is set to OFF but the tool is set to low voltage programming and cannot program the device. To correct this:
    1. Change the tool’s programming option to use High Voltage programming.
    2. Change the device’s configuration bit to use low voltage (LVP=ON). Program the device using high voltage to reprogram the device’s configuration bit.
    3. Change the tool’s programming option back to Low Voltage programming for subsequent programming of the device.
     
    Furthermore, in the project properties window there is no possibility to manage the LVP that appears for other PICs (eg PIC16F18875). This possibility appears in the MPLAB XPRESS, although the error is the same.
    Thanks for your help.
    #4
    jtemples
    Super Member
    • Total Posts : 11007
    • Reward points : 0
    • Joined: 2004/02/13 12:31:19
    • Location: Southern California
    • Status: offline
    Re: Problem with Curiosity HPC and PIC18F45K20 2018/10/20 09:43:45 (permalink)
    5 (1)
    It's not possible to set LVP = OFF on the Curiosity board unless you've used an external programmer that supports high voltage programming.  Have you used another programmer?  Or did the PIC you're using come from another board that used high-voltage programming?
    #5
    saviga
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2018/10/18 08:34:59
    • Location: 0
    • Status: offline
    Re: Problem with Curiosity HPC and PIC18F45K20 2018/10/20 14:09:07 (permalink)
    0
    The PIC18F45K20 is new, newly acquired and it is happening to everyone I have bought and it is happening to the other co-workers.
    Thank you.
    #6
    jtemples
    Super Member
    • Total Posts : 11007
    • Reward points : 0
    • Joined: 2004/02/13 12:31:19
    • Location: Southern California
    • Status: offline
    Re: Problem with Curiosity HPC and PIC18F45K20 2018/10/20 14:53:03 (permalink)
    0
    New from where?  You can see from the data sheet that LVP is enabled by default and cannot be disabled with a low-voltage programmer, even if you accidentally tried to enable it in your program.
    #7
    qhb
    Superb Member
    • Total Posts : 7545
    • Reward points : 0
    • Joined: 2016/06/05 14:55:32
    • Location: One step ahead...
    • Status: online
    Re: Problem with Curiosity HPC and PIC18F45K20 2018/10/20 15:09:07 (permalink)
    0
    There is no indication in that log that the programmer has even managed to read the device ID.
    I think this whole "LVP is low" message is a red herring, and that it's not actually talking to the PIC at all.
    That could be bad power, a missing jumper, etc.
    #8
    jtemples
    Super Member
    • Total Posts : 11007
    • Reward points : 0
    • Joined: 2004/02/13 12:31:19
    • Location: Southern California
    • Status: offline
    Re: Problem with Curiosity HPC and PIC18F45K20 2018/10/20 15:56:11 (permalink)
    0
    The Curiousity HPC is USB powered with a PKOB, so it takes real heroics to get the power or PIC/programmer interface  wrong.  I wouldn't expect the error that was shown if the wrong PIC was selected in the IDE.  And I know from experience that the HPC works with that exact PIC.  The only setup error I can think of would be plugging the PIC in backwards.  But yes, we need to see the complete IDE output of the programming phase.
    #9
    saviga
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2018/10/18 08:34:59
    • Location: 0
    • Status: offline
    Re: Problem with Curiosity HPC and PIC18F45K20 2018/10/20 17:17:26 (permalink)
    0
    I have tried the following:
    I wrote a small program that alternately turns on and off RA4 and RA5. With the MCC I configured the PIC18F45K20 (by default it includes #pragma config LVP = ON) and I programmed it with a PICKIT3. The idea is to program it and that the LVP bit is activated.
    The program works in the PIC and it also works when I place the PIC in the Curiosity HPC.
    The next step was to reprogram the PIC from the Curiosity HPC (it is assumed that now its LVP = ON). But it still does not work. Keep giving the same error.
    I do not know what is happening.
    This error manifests itself in the three Curiosity HPC that we are using.
     
    MPLAB X has detected that the device’s low voltage configuration bit is set to OFF but the tool is set to low voltage programming and cannot program the device. To correct this:
    1. Change the tool’s programming option to use High Voltage programming.
    2. Change the device’s configuration bit to use low voltage (LVP=ON). Program the device using high voltage to reprogram the device’s configuration bit.
    3. Change the tool’s programming option back to Low Voltage programming for subsequent programming of the device.
     
    In the Dashboard if the Curiosity HPC serial number appears:
    Debug Tool           
    • Starter Kits (PKOB): BUR171273154
    Greetings and thanks.
    #10
    jtemples
    Super Member
    • Total Posts : 11007
    • Reward points : 0
    • Joined: 2004/02/13 12:31:19
    • Location: Southern California
    • Status: offline
    Re: Problem with Curiosity HPC and PIC18F45K20 2018/10/20 17:40:16 (permalink)
    0
    You're just now revealing that you programmed it with an external programmer?  I asked that back in post 5.  Presumably, the external programmer is not setting LVP.
     
    it is happening to everyone I have bought and it is happening to the other co-workers

     
    Why is everyone trying to program it before putting it in the HPC?  It would have worked fine if you just plugged it into the HPC.
    #11
    saviga
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2018/10/18 08:34:59
    • Location: 0
    • Status: offline
    Re: Problem with Curiosity HPC and PIC18F45K20 2018/10/21 03:20:14 (permalink)
    0
    I think you're not understanding me.
    First, first of all, a few days ago I tried the Curiosity HPC and since it was not possible (the error messages of the previous post were coming up) yesterday I decided to try the pickit 3. The idea was that the pickit 3 put the LVP ON .
    But before, when I started with this thread I had only tried the Curiosity HPC with a PIC18F45K20 recently bought in RS, the same as my co-workers.
    Thanks for your help.
    #12
    saviga
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2018/10/18 08:34:59
    • Location: 0
    • Status: offline
    Re: Problem with Curiosity HPC and PIC18F45K20 2018/10/23 01:13:41 (permalink)
    0
    I just did another test with a new PIC18F45K20, the HPC curiosity plate, MPLAB XPRESS and the microchip software example. The result is the same, the device can NOT be programmed since a problem with the LVP is detected:
     
    Launching
    Connect to device
    *****************************************************
    Connecting to Starter Kit on Board...
    Currently loaded firmware on Starter Kit on Board
    Firmware Suite Version.....01.54.00 *
    Firmware type..............PIC18F

    MPLAB X has detected that the device’s low voltage configuration bit is set to OFF but the tool is set to low voltage programming and cannot program the device. To correct this:
    1. Change the tool’s programming option to use High Voltage programming.
    2. Change the device’s configuration bit to use low voltage (LVP=ON). Program the device using high voltage to reprogram the device’s configuration bit.
    3. Change the tool’s programming option back to Low Voltage programming for subsequent programming of the device.
    Could not connect to tool hardware
     
    the configuration bits are fine
     
    // CONFIG4L
    #pragma config STVREN = ON // Stack Full/Underflow Reset Enable bit->Stack full/underflow will cause Reset
    #pragma config LVP = ON // Single-Supply ICSP Enable bit->Single-Supply ICSP enabled
    #pragma config XINST = OFF // Extended Instruction Set Enable bit->Instruction set extension and ...
    #pragma config DEBUG = OFF // Background Debugger Enable bit->Background debugger disabled, RB6 an...
     
    Thank you for your attention
    #13
    davekw7x
    Entropy++
    • Total Posts : 1573
    • Reward points : 0
    • Joined: 2012/01/16 12:01:07
    • Location: Left Coast, USA
    • Status: offline
    Re: Problem with Curiosity HPC and PIC18F45K20 2018/10/29 10:42:18 (permalink)
    0
    saviga
    I just did another test with a new PIC18F45K20, the HPC curiosity plate, MPLAB XPRESS and the microchip software example. The result is the same, the device can NOT be programmed since a problem with the LVP is detected:

    This thread bothered me because the schematic for the Curiosity HPC board has no indication of a connection between the PKOB circuitry and the RB5/PGM pin on the 40-pin socket for a PIC45K20.  With the pragma that sets LVP to ON, the LVP mode is entered by the programmer setting the PGM pin high.

    I had prepared a message stating my concern, but I didn't have a DIP version of the 'K20 to test, so I didn't post.  I simply don't like to post unless I can test, not just guess.

    Well, as of today I have obtained a PIC18F45K20 and have verified that it can not (that's NOT) be programmed PKOB on my Curiosity HPC board without taking special measures.

    With a brand new PIC18F45K20, fresh out of the tube from Microchip, I get exactly the same result as the OP:  The programmer can not make the chip enter the programming mode.

    It (erroneously) reports that, "MPLABX has detected that the device's low voltage configuration bit is set to OFF."  I have seen this with other chips on various breadboards that were simply not connected correctly.  In other words, if MPLABX finds that it can't make a chip enter LVP mode, it reports that the device's LVP bit is set OFF.

    So, here's the thing:
    Without doing anything else with the chip, I connected a 1K resistor from pin 38 of the MPU to one of the VDD pins on a header on the board and found that it could program the chip.
     
    The "Starter Kit On Board" window of MPLABX now shows
     
    Target voltage detected
    Target device PIC18F45K20 found.
    Device ID Revision = 1c

    Device Erased...

    Programming...

    The following memory area(s) will be programmed:
    program memory: start address = 0x0, end address = 0x117f
    configuration memory
    Programming/Verify complete

    Of course, for normal operation (after programming/verification was complete), I had to pull down Pin 38 to Gnd.  (I still used the resistor.)  With the LVP bit ON for the device, if you leave the PGM pin just flapping in the breeze it may or may not appear to be functioning in normal operation, but it will be very flaky, as many have discovered over the years with these old chips.  With the pull-down in place, my test program works as expected.  Of course RB5 can not be used as a GPIO, but this is fully documented in the Data Sheet.


    Now, my Curiosity board is pretty old, but the current schematic on Microchip's Curiosity web page appears to be the same as my schematic.  I wonder if it is possible that later versions of the board have the necessary connection not shown on its schematic.


    I don't know whether or not the following information is relevant:


    •     The label on the bottom of my Curiosity HPC board shows
              02-10536-R1
    •     The silkscreen on the bottom of the board shows
              LYJSY-1
           EJ48782

    Test setup: MPLABX version 5.05, XC8 version 2.00

    Bottom line:
    I repeated the test with and without pullup/pulldown on PGM on this same MPU.  Results were completely consistent: Programs OK with pullup, fails without pullup.

    For supported chips that do not have a dedicated PGM pin for Low Voltage Programming, my Curiosity HPC board works just fine and dandy.  I have tested a lot of them.  With this device, it just flat won't work on my board without doing something extra.   I haven't had any projects with devices having a dedicated PGM pin since before Curiosity days, so this is the only one that I have tried.

    Regards,

    Dave




    post edited by davekw7x - 2018/10/29 11:23:24

    Sometimes I just can't help myself...
    #14
    saviga
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2018/10/18 08:34:59
    • Location: 0
    • Status: offline
    Re: Problem with Curiosity HPC and PIC18F45K20 2018/10/29 14:19:33 (permalink)
    0
    Thank you very much for your help. I had done many tests in different conditions and I could not solve the problem.
    Greetings and thank you.
    #15
    jtemples
    Super Member
    • Total Posts : 11007
    • Reward points : 0
    • Joined: 2004/02/13 12:31:19
    • Location: Southern California
    • Status: offline
    Re: Problem with Curiosity HPC and PIC18F45K20 2018/10/29 15:15:07 (permalink)
    0
    The markings on my board match those of Dave's.  My board hasn't been modified.  I'm using MPLAB X 4.20 (I also have IPE 5.05 installed which worked as well).  When I use the PKOB, I get

    *****************************************************

    Connecting to Starter Kit on Board...

    Currently loaded firmware on Starter Kit on Board
    Firmware Suite Version.....01.51.12
    Firmware type..............Enhanced Midrange

    Target voltage detected
    Target device PIC18F45K40 found.
    Device ID Revision = a043

    Device Erased...

    Programming...

    The following memory area(s) will be programmed:
    program memory: start address = 0x0, end address = 0x137f
    configuration memory
    User Id Memory
    Programming/Verify complete

    #16
    davekw7x
    Entropy++
    • Total Posts : 1573
    • Reward points : 0
    • Joined: 2012/01/16 12:01:07
    • Location: Left Coast, USA
    • Status: offline
    Re: Problem with Curiosity HPC and PIC18F45K20 2018/10/29 16:15:39 (permalink)
    4 (1)
     
    jtemples
    ...
    Target device PIC18F45K40 found
    ...

    Yours is a 45K40, which works flawlessly on my board also.  Doesn't have a dedicated PGM pin for LVP!
     
    The subject of the thread is a  '45K20.  Doesn't work with PKOB (without a little help from some friends) since PKOB does not assert the signal to its dedicated PGM pin.
     
    Regards,

    Dave


    post edited by davekw7x - 2018/10/29 16:33:05

    Sometimes I just can't help myself...
    #17
    jtemples
    Super Member
    • Total Posts : 11007
    • Reward points : 0
    • Joined: 2004/02/13 12:31:19
    • Location: Southern California
    • Status: offline
    Re: Problem with Curiosity HPC and PIC18F45K20 2018/10/29 19:31:15 (permalink)
    0
    Yours is a 45K40

     
    Oops.  Never mind.
    #18
    ODU
    New Member
    • Total Posts : 1
    • Reward points : 0
    • Joined: 2018/10/28 04:58:04
    • Location: 0
    • Status: offline
    Re: Problem with Curiosity HPC and PIC18F45K20 2018/10/30 03:25:16 (permalink)
    0
    Hi there!
    I am working since 20 years with Microchip µC. It is not funny which problems I had and have with the XIDE last years...and it seems that I will do a change over to another manufacturer in case of new projects due to the massive issues with the XIDE. If I start to work with older firmware projects it is always the same: One issue follows the other issue with the XIDE. It is like a never ending story book. 8h working on firmware and 1 to 4 hours working on XIDE issues per day. Not funny and very in-efficient. For example today I have pressure to finalize a release, but no chance: XIDE makes problems and problems. That is the reason for my report here.
     
    For example: installed V5.05 with the hope for more stable debugging with ICD3. Debugging is typical very unstable with XIDE and ICD3.
    Code compiled and start debuger, ICD tries a download and a error message occurs:
    (This issue is reported by some other users too, some months ago) In this case PIC18F8722. XIDE V5.05:
     
    MPLAB X has detected that the device’s low voltage configuration bit is set to OFF but the tool is set to low voltage programming and cannot program the device. To correct this: 1. Change the tool’s programming option to use High Voltage programming. 2. Change the device’s configuration bit to use low voltage (LVP=ON). Program the device using high voltage to reprogram the device’s configuration bit. 3. Change the tool’s programming option back to Low Voltage programming for subsequent programming of the device.
     
    Test1: programmed the device with ICD3 and IPE 5.05 with #pragma config LVP = ON : programming works.
    Back to XIDE for debugging: issue still there. Then tried all: no chance.
     
    Test 1a) Connect to an external programmer, set LVP On and programmed in HVP mode.
    Back to XIDE 5.05: Same problem. Means independant which programmer is in use (ICD3 or a thrid party) the issue is there.
     
    Test2: Go back to XIDE4.15 (it works 6 months ago!): Built a test project: Same issue. No chance. No chance for debugging or programming with XIDE.
     
    Test 3: Go back to XIDE 3.35: Built a test project: it works, debugging works. Programming works.
     
    Test 4: The go back to XIDE 5.05.: Not for debugging but now for compiling the final releases:
    NEW ISSUE: "Der Befehl "chip" ist entweder falsch geschrieben oder konnte nicht gefunden werden." Very cracy, never read. It seems that the XIDE 3.35 (parallel installation in different directories) which asked to open the last valid project (formerly 5.05) has destroyed something in the  V5.05 project even it was NOT opend by 3.35! Strange.
     
    Test 5: Make a new project in V5.05 and transfer all settings of the destroyed Configuration manually (window by window) into new project: Compiling works now. Another 2 hours are gone....
     
    That is not funny. I waste my egineering time with XIDE bugs.
     
    ====================================================
    Another example: In one pic project there are app. 20 configurations with different settings.
    First of all: In this case XIDE (any version) works very slow. Changes in the configurations needs a lot of time to apply the seetings in XIDE, it seems that the software is very slow in this case. Not acceptable. There is an massive issue since beginning of XIDE: After some changes in Configurations the time which XIDE needs for applying the settings rises and rises. Finally after app. 5 to 10 changes  pressing button "Apply" will result in a never come-back loop. XIDE hangs. Independant which XIDE release. Imagine: 20 configurations with app. 40 different settings each. Try to handle this with such bugs?! Very inefficient.
    ====================================================
    Unstable debugging...next problem....hang up of ICD3 (there are 3 pcs to be sure that is not a hardware issue) ....I stop here to report.
    ====================================================
     
    I do not know what Microchip is doing but they should fix this massive issues asap. I am sure not to be the only one with all these massive issues.
    Best regards
     
     
     
     
     
     
     
    #19
    Jim Nickerson
    User 452
    • Total Posts : 5458
    • Reward points : 0
    • Joined: 2003/11/07 12:35:10
    • Location: San Diego, CA
    • Status: offline
    Re: Problem with Curiosity HPC and PIC18F45K20 2018/10/30 07:19:06 (permalink)
    4 (1)
    ODU,
    Only a handful of users on this forum are Microchip employees.
    In case you are not aware to make your feelings heard you may contact Microchip directly at https://support.microchip.com
    #20
    Page: 12 > Showing page 1 of 2
    Jump to:
    © 2018 APG vNext Commercial Version 4.5