Stuck on first attempt using MPLAB X (PICkit4)


+ Reply to Thread
Results 1 to 40 of 40

Hybrid View

  1. #1
    Join Date
    Aug 2011
    Posts
    455


    1 out of 1 members found this post helpful. Did you find this post helpful? Yes | No

    Default Re: Stuck on first attempt using MPLAB X

    Get rid of the config DEBUG_ON.
    If you ever get to the point of hdw debugging that will be managed by the tool for you.

    Also, when you were creating the IDE custom programmer entry, once you get to the step of setting the parameters there is no "Next" step... just "Finish"

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: Stuck on first attempt using MPLAB X

    Quote Originally Posted by tumbleweed View Post
    Get rid of the config DEBUG_ON.
    If you ever get to the point of hdw debugging that will be managed by the tool for you.

    Also, when you were creating the IDE custom programmer entry, once you get to the step of setting the parameters there is no "Next" step... just "Finish"

    Thanks, had already turned it off. Waiting for a reply from MeLabs forum to get the custom programmer working in MCS+5.


    Kept playing with the Lab X-1 and MPLAB IPE, played with OSC, added PORT, used bits like I did in one of my programs; now the proper LED comes on, but no blinking on the Lab X-1.

    Code:
    #CONFIG
        __config _HS_OSC & _WDT_OFF & _WRT_OFF & _BODEN_ON & _LVP_OFF  & _CPD_OFF & _PWRTE_OFF & _DEBUG_OFF
    #ENDCONFIG
    
    DEFINE  OSC     20
    
    ADCON1 = 7              ' A/D off, all digital
    
    PORTD = %00000000
    TRISD = %00000000
    
    START:  PORTD = %00000001
            PAUSE   500      
            PORTD = %00000000
            GOTO    START
    
    Finish: end
    Tried using another PIC just in case, no difference.

    But get this, I copied an old example of writing to the LCD and that worked, a bit wonky, but I can't get a solitary LED to blink.

  3. #3
    Join Date
    May 2013
    Location
    australia
    Posts
    2,656


    1 out of 1 members found this post helpful. Did you find this post helpful? Yes | No

    Default Re: Stuck on first attempt using MPLAB X

    You won't see a 1uS blink
    Code:
    START:  PORTD = 000001       
            PAUSE   500      
            PORTD = 000000
            GOTO    START
    you probably meant

    Code:
    START:  PORTD = 000001
            PAUSE   500      
            PORTD = 000000
            PAUSE   500  
            GOTO    START
    Warning I'm not a teacher

  4. #4
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: Stuck on first attempt using MPLAB X

    Quote Originally Posted by richard View Post
    You won't see a 1uS blink
    ...pulls out my manual, "I'm gonna show him I know the difference between PAUSE and PAUSEUS"...
    ... "I'm a programmer by trade, I know this sort of thing."...
    ...and then I glanced at my code...

    ARGH!!!

    I must have stepped on that last PAUSE 500 when I was "simplifying" my code, while I still hadn't put the pull-up on the harness.

    Thanks Richard, I feel like such a noob. I knew it had to be something funky cause an LCD program worked (kinda, but that's expected, it wasn't meant for the Lab X-1).

    Now if I could only get the PK4 to work on MCS+5 and I'd be a happy camper.

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,144


    1 out of 1 members found this post helpful. Did you find this post helpful? Yes | No

    Default Re: Stuck on first attempt using MPLAB X

    Today I talked to Evan at Anobium and he said that next week he will have news about Pickit4 after his meeting with Microchip.

    The (low-cost) Standalone Pickit Plus currently supports 2 and 3. Also there is a feature to check if there is new hex file and auto program the PIC with no intervention by the user.

    I use this tool a long time and am very happy with it. I had it with the MPLAB IDE/IPE and got rid off it.

    If interested I'll let you know what happens.

    Ioannis

  6. #6
    Join Date
    Aug 2011
    Posts
    455


    Did you find this post helpful? Yes | No

    Default Re: Stuck on first attempt using MPLAB X

    Waiting for a reply from MeLabs forum to get the custom programmer working in MCS+5.
    Too many threads about the same topic.

    I just set up MPLABX 5.35, MCSP5, and installed the PICKit4 as a custom programmer.
    The only thing I changed was the commandline parameters
    Code:
    -TPPK4 -P$target-device$ -F$hex-filename$  -W3.3 -E -M -Y -OL -OB
    (TPPK4=use generic tool PK4 instead of 'BUR serial no', W3.3=power target from PK4 @ 3.3V)
    Those changes shouldn't matter much.

    Here's the output from the commandline window
    Code:
    *****************************************************
    Connecting to MPLAB PICkit 4...
    Currently loaded versions:
    Application version............00.09.46
    Boot version...................01.00.00
    Script version.................00.05.58
    Script build number............abbfe90327
    Tool pack version .............1.15.1688
    PICkit 4 is supplying power to the target (3.26 volts).
    Target device PIC18F26K22 found.
    Device Revision Id  = 0x4
    *****************************************************
    Erasing...
    Erase successful
    *****************************************************
    Calculating memory ranges for operation...
    Erasing...
    The following memory area(s) will be programmed:
    program memory: start address = 0x0, end address = 0x7f
    configuration memory
    Programming/Verify complete
     Program Report
    05-Apr-2023, 07:07:36
    Device Type:PIC18F26K22
    Program Succeeded.
    PK4 Verify Report
    05-Apr-2023, 07:07:36
    Device Type:PIC18F26K22
    *****************************************************
    The following memory area(s) will be verified:
    program memory: start address = 0x0, end address = 0xffff
    configuration memory
    EEData memory
    User Id Memory
    Verification successful.
    Verify Succeeded.
    
    Batch Mode Count : 1
    When you select 'Program' in MCSP, the command window opens and it takes a good 10 seconds before anything happens. That's just the way it it with ipecmd and MPLABX.

    If you've installed multiple versions of MPLABX, make sure you use the matching versions of ipecmd.exe and MPLABX IPE to test it with.
    Also, when you setup the custom programmer entry in MCSP I'd use the "find manually" option for setting the path, which for me was
    "D:\Programs\Microchip\MPLABX\v5.35\mplab_platform\ mplab_ipe" since I use custom installs. Be sure to test it using the IPE first... that way you know everythings working.

  7. #7
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: Stuck on first attempt using MPLAB X

    Quote Originally Posted by tumbleweed View Post
    Too many threads about the same topic.
    I started my woes in the Goodbye thread, but I wasn't making any headway in figuring what I was doing wrong. So I started my own thread, but removing my posts in the Goodbye thread would make Ioannis' posts talk to himself.


    I just set up MPLABX 5.35, MCSP5, and installed the PICKit4 as a custom programmer.
    The only thing I changed was the commandline parameters
    Code:
    -TPPK4 -P$target-device$ -F$hex-filename$  -W3.3 -E -M -Y -OL -OB
    (TPPK4=use generic tool PK4 instead of 'BUR serial no', W3.3=power target from PK4 @ 3.3V)
    Those changes shouldn't matter much.
    Using TPPK4 in MCS+5 worked even less in my case.


    When you select 'Program' in MCSP, the command window opens and it takes a good 10 seconds before anything happens.
    The command window opened and closed practically immediately, faster than when I used BUR; didn't have time to see anything.

Similar Threads

  1. Replies: 19
    Last Post: - 16th May 2023, 17:06
  2. My serial to parallel attempt
    By johndoug in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 4th January 2013, 04:15
  3. Upgraded to MPLAB IDE 8.14 and now I'm stuck
    By BlueHairBob in forum General
    Replies: 2
    Last Post: - 20th August 2008, 01:15
  4. MPLAB Quickbuild stuck on
    By RichardBowser in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 9th July 2006, 02:52
  5. First attempt at coding
    By bartman in forum mel PIC BASIC
    Replies: 0
    Last Post: - 10th November 2004, 17:52

Members who have read this thread : 10

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts