18F4431 and Melabs USB programmer ?


Closed Thread
Results 1 to 15 of 15
  1. #1
    Join Date
    Feb 2006
    Location
    Brussels, Belgium
    Posts
    104

    Default 18F4431 and Melabs USB programmer ?

    Anyone have unblemished success programming an 18F4431 on a MELABS USB programmer ? Any hints to share ?

    I can get 3 out of 5 devices to program, the others just throw programming errors. I've tried adding the infamous capacitor. Melabs are strangely silent when asked for support.

    I checked the MC programming notes today and I'm going to check the analog supplies (AVdd and AVss) are connected tonight.

    Last other check I threw up searching today was to try programming with MCLR ON ?

    Otherwise I guess I'll need to buy a PicKIT 2 ?

    Andrew

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Do you have anything on RB5/PGM?
    If it's left floating during programming it can cause problems.

    A pull-DOWN resistor will help if it's floating.
    <br>
    DT

  3. #3
    Join Date
    Feb 2006
    Location
    Brussels, Belgium
    Posts
    104


    Did you find this post helpful? Yes | No

    Default

    Hi Darrel,

    I meant to mention that I had tried that as well.
    So the analogue supplies are connected, I've tried with MCLRE_ON and _OFF, I've tried with RB5/PGM pulled down to Vss. No joy.

    There seems to be a lot of noise floating around the net with people having trouble programming this PIC.

    It looks like I might be having to give MC some money

    Andrew

  4. #4
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Have you tried the latest version of meProg?

    http://melabs.com/support/progsoft.htm (4.3 with firmware)
    <br>
    DT

  5. #5
    Join Date
    Feb 2006
    Location
    Brussels, Belgium
    Posts
    104


    Did you find this post helpful? Yes | No

    Default

    Yup, 4.30beta and upgraded the firmware to meup54
    The "volts" check in meProg shows Vdd = NA and Vpp = 13.18 when I "READ ACTUAL"

  6. #6
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    I found this in the A2 silicon Errata ...
    http://ww1.microchip.com/downloads/e...Doc/80180c.pdf

    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=3277&stc=1&d=123792998 0" />

    Not sure if it only applies to the ICD2 or not. But the USB programmer might have a similar problem if it's an A2 chip.

    A3 silicon doesn't seem to have the problem anymore.
    <br>
    Attached Images Attached Images  
    DT

  7. #7
    Join Date
    Feb 2006
    Location
    Brussels, Belgium
    Posts
    104


    Did you find this post helpful? Yes | No

    Default

    Sounds plausible, alas I don't think I can adjust Vdd on the USB programmer. What I might do is try and program it using ICSP on a breadboad with it's own power supply.

    Andrew

    nope - didn't work either
    Last edited by AndrewC; - 24th March 2009 at 23:04.

  8. #8
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by AndrewC View Post
    nope - didn't work either
    Bummer!

    I was just reading Melanie's post ...
    http://www.picbasic.co.uk/forum/show...1847#post71847

    Thought hmmmm,
    You have "Erase before Programming" turned on ... right?

    So many straws to grab, not enough heads to make straw hats for.

    Maybe time to break out my virgin 4431 from the parts bin, and try the U2 and PICkit2.
    Do you have the original USB programmer or a U2?
    <br>
    DT

  9. #9
    Join Date
    Feb 2006
    Location
    Brussels, Belgium
    Posts
    104


    Did you find this post helpful? Yes | No

    Default

    Hi Darrell, yes - erase before programming is on. If I read the device after erasing it comes back as 3FFF's , Meprog also correctly recognises the device as an 18F4431,

    The programming error I get seems to flip between 0000 and 0018. It seems that sometimes it manages to start programming and then gives up after a few words.

    I do have the original USB programmer. My dilemma now is trying to decide:

    1) Is it the PIC itself - in which case I might try my luck at complaining to Microchip and getting some replacements.

    2) Is it the programmer - in which case I need to decide whether to go to a U2 or a PicKIT

    3) Is it the user - in which case I'm going to go and chop up some wood on my bandsaw and then spend several hours planing and sanding it and getting back into equilibrium with my inner self. Or have a few beers and a curry

    Thanks for your persistence in trying to help me

    Andrew

  10. #10
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Try few 0.1 uF + 10uF tantalum close to your pic when programming. If you have 2 Vdd, then you use 2 0.1+10uF. PGM pin load to gnd with <10k.

    Try to measure the MCLR line, and see if it's high enough... >12 V at very least.

    I already had some weird issue in the pas when the PIC programmer was too close of the PIC... weird, but happen.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  11. #11
    Join Date
    Feb 2006
    Location
    Brussels, Belgium
    Posts
    104


    Did you find this post helpful? Yes | No

    Default

    "If you have 2 Vdd, then you use 2 0.1+10uF. PGM pin load to gnd with <10k."

    Not sure what you mean - on the Melabs USB programmer there is only one Vdd supplied, i've already got a 0.1uF across that on the programmer board. If I try programming it in-situ on the Melabs X2 protoboard I can use it's own Vdd and it also has 0.1uF Vdd-Vss next to the PIC. Where would you add 10uF ?

    I've tried tying RB5/PGM to ground with 10k, perhaps I'll try something smaller.

    MCLR is going to 13.2V

    Spacing to programmer - I've seen some posts pointing at this. I'm using the short cable supplied by Melabs (<1" ?). I can try making a longer one

    My biggest headache is "is it my programmer or my PICS ?". If I could be sure that the U2 programmer works with no problems I'd buy it, or the PICKIT 2, but no answer from MELABS yet. I'll email them again in case they overlooked my first three emails.

    Micro chip pointed at the same note the Darrel posted - try playing with different Vdd values but could not tell me what to try and Vdd is not adjustable (to my knowledge) on the Melabs programmer. They didn't seem to buy in to my suggestion that 60% of the PICS they sent me were cxxp and they should give me some new ones. Of course I only bought 5 so I'm not very high up on their priority list

    What alternatives would you recommend to using the ICSP serial type programmers ?

  12. #12
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    PICKIT 2 usually works a treat. But yeah, if it's a silicon related issue, you may end up with the same results. I think Pickit 2 allow to play with MCLR voltage ...

    What's your Vdd voltage?

    Can you read the Silicon revision of your PIC?
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  13. #13
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    I thought trying a new 4431 here might shed some answers ... but I don't think this will help a bit.

    I've programmed it here with both the U2 and PICkit2 programmers.
    It works everytime no matter what I try.

    Unfortunately, I only have one 4431 in my bin.

    The Device ID/REV in my chip is 0882. Is yours the same?
    (meProg | Program | Get Target Information)

    If I could be sure that the U2 programmer works with no problems I'd buy it, or the PICKIT 2
    I like the PICkit2 better, but I have several programming adapters and ICSP cables wired for meLabs 10-pin format. So I usually end up using the U2. The PICkit2 has a 6-pin connector and I'm too lazy to make new cables.
    DT

  14. #14
    Join Date
    Feb 2006
    Location
    Brussels, Belgium
    Posts
    104


    Did you find this post helpful? Yes | No

    Default

    If I read the device I get

    Device 0000- 0882
    Config 0000- cf00 3f0f 9d3c 0085 c00f e00f 400f
    Code all FFFF

    Vdd is a nad over 5V.

    Got some advice from Melabs and changed the ProgTimes - one off improvement and then none of the pesky things will program.

    Went back to the original ProgTimes and now back to flakey results - some good some bad units.
    However, they now all program on my X2 board either with the board Vdd or the USB prog Vdd. so the X2 board has a cap right up against Vdd/Vss so I tried that on my ZIF adapter - no improvement.

    Verdict - beats me At least I've got a work around, that works tonight anyway. I'm wondering if Mister_E's cable length might be the clue ? I'll need to see if I can make a Melabs 10pin cable and try that.

    Andrew

  15. #15
    Join Date
    Sep 2007
    Location
    USA, CA
    Posts
    271


    Did you find this post helpful? Yes | No

    Default

    I've programmed a LOT of 18F2331's, all of them with MELabs programmers (I have 3 versions; epic, serial and USB). Here is what I've found:

    For ICSP I put in a jumper to disconnect the programming power supply from the rest of the board. That way only the PIC is powered when the programmer is in use. When I unplug the cable, the jumper is put on and the pic gets power from the board.

    Today I was programming some DIPs repeatedly, using the MELabs programmer and a zif adaptor. I had to add a jumper to the adaptor, as shown on their web site. (I think my adaptor was almost 10 years old!) Because the chip was being used on a development board, I didn't have the luxury of putting on a jumper. I was not surprised to find the chip wouldn't program ICSP.

    A couple months ago I did run in to a couple bad 18F2331 PICs. Some new code worked perfectly on several chips, but on several it did not. I was thankful that I didn't get the faulty chips for the first one, or I would have suspected my code!

Members who have read this thread : 1

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