Stuck on first attempt using MPLAB X (PICkit4)


+ Reply to Thread
Results 1 to 40 of 40

Hybrid View

  1. #1
    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

    Thanks for the links Richard!


    UPDATE:

    I've since simpified things further to a single blink using internal oscillator.

    Code:
    #CONFIG
        __config _HS_OSC & _WDT_OFF & _WRT_ON & _BODEN_ON & _LVP_OFF  & _CPD_OFF & _PWRTE_OFF & _DEBUG_OFF
    #ENDCONFIG
    
    DEFINE  OSC     4
    
    ADCON1 = 7              ' A/D off, all digital
    
    TRISD = %00000000
    
    LED0    VAR     PortD.0
    
            LOW LED0
    
    START:  HIGH    LED0
            PAUSE   500
            LOW     LED0
            GOTO    START
    
    Finish: end
    I've added a custom programmer in MCS+5 using the instructions for IPECMD.EXE.

    I now compile and program in MCS+5. A black command box appears, everything seems normal, than FLASH, a message shows up for a millisecond about HEX FILE NOT FOUND (pretty sure that's what it says).

    Not sure what's going on, cause I delete all objects in my folder except the source right before I compile, just to make sure everything gets created. The HEX and ASM are right there, I opened them, they look "normal".

    The light stays blue on the PICkit4; it doesn't go red like when I tried with MPLAB IPE. I must be messing up my connection to the adapter board. I also remember reading about resistors and capacitors for the PK4, gotta find that again...

    UPDATE SOME MORE:

    I went back to update the command line to keep the command line window open like this.

    And I noticed that it's not letting me complete the EDIT process, the NEXT button doesn't come on, I must have missed that the first time around.

    Name:  PICkit4 custom pgmer.png
Views: 12056
Size:  9.5 KB
    Last edited by Demon; - 4th April 2023 at 16:12.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  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

    So I deleted and created the custom programmer again and paid attention to the NEXT button.

    Code:
    -TSBUR223673449 -P$target-device$ -F$hex-filename$ -E -M -Y -OL -OB
    Nope, NEXT button never comes on, and the command line seems complete if I EDIT the programmer again.

    Name:  PICkit4 custom pgmer B.png
Views: 12067
Size:  24.2 KB

    I compile and program again, I see HEX FILE NOT FOUND blink, and the command line window keeps closing despite the new command line.

    Via the PICKit3 programmer
    -TSBUR171738083 -P$target-device$ -F$hex-filename$ -E -M -Y -OL -OB
    or
    -TPPK3 -P$target-device$ -F$hex-filename$ -E -M -Y -OL -OB

    Command Line Options:
    -E erase before programming
    -M program entire memory
    -Y verify after programming
    -OL release from reset
    -OB batch mode (leaves cmd line window open)
    I'm starting to think the command lines for the PK4 are different...?

  3. #3
    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

    I started a thread over at MeLabs with my latest findings.

    Hoping someone there can fix me up; I bought my PK4 and MCS+5 from them.

    https://support.melabs.com/forum/pic...-5-and-pickit4

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


    Did you find this post helpful? Yes | No

    Default Re: Stuck on first attempt using MPLAB X

    I am sorry for the troubles you face Robert.

    I do not have Pickit4 (yet) and for the 2 or 3 I use a very nice standalone program (https://pickitplus.co.uk).

    I asked if they will support Pickit 4 too. Will report back.

    I think you can update you PBP license to the latest 3.1.6. See melabs site.

    Ioannis

  5. #5
    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 Ioannis View Post
    I am sorry for the troubles you face Robert.

    I do not have Pickit4 (yet) and for the 2 or 3 I use a very nice standalone program (https://pickitplus.co.uk).

    I asked if they will support Pickit 4 too. Will report back.

    I think you can update you PBP license to the latest 3.1.6. See melabs site.

    Ioannis
    Yeah, but I've already spent enough and can't even get a blinky working. Updating PBP isn't going to get this solved either, and I'm not likely to use whatever chip they've added since v3.0.8.4.

    Hoping to get some help from MeLabs.

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


    Did you find this post helpful? Yes | No

    Default Re: Stuck on first attempt using MPLAB X

    Its free for you!

    Ioannis

  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 Ioannis View Post
    Its free for you!

    Ioannis
    Nope, $50. Or am I missing out on "special promotion to forum moderators"?

    https://store.melabs.com/cat/PBPUP.html
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

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