1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

USB Pic programmers

Discussion in 'Microcontrollers' started by Beefer3, Jun 12, 2005.

  1. Mike - K8LH

    Mike - K8LH Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    3,637
    Likes:
    109
    Location:
    Michigan, USA
    Ahhhh, thank you Jay... Good info'...

    I use 12F683 (and other PICs) with INTOSC and MCLR disabled for I/O function and these devices will not enter High Voltage Program/Verify mode if VDD is "always on" so I definately need ICD2 controlled Target VDD functionality for programmer operation...

    I also prefer P-Channel MOSFET High-Side switches in a TO-92 package but they seem to be dissappearing fast only to be replaced with much more expensive part numbers... I used to buy TP0610L in TO-92 package (very similar to BS250 or BSS84 specs') for well under $1 USD but they have become discontinued... The BSS84 is still relatively inexpensive but only comes in an SO-23 package...

    So, does your RA4 Target VDD PNP circuit look like the PNP drawing below? Do you think a 2N2907A PNP would work ok with these values to provide <100-ma to the Target?

    Does the drawing using a P-Channel MOSFET look ok? The low Drain-Source resistance should allow higher current to the target, yes, no?

    Regards, Mike
     

    Attached Files:

  2. Jay.slovak

    Jay.slovak Active Member

    Joined:
    Jan 11, 2005
    Messages:
    1,726
    Likes:
    5
    That pull-up resistor should be *before* the base resistor, otherwise you are making voltage divider which could prevent the transistor to get into saturation. If you move that pull-up resistor, it wil l definitely work. That MOSFET diagram looks OK, I would increase value of that resistor to 4K7, 1K5 is kind of low, but it's not critical and will work with it.

    Here are some PICs of my ICD2 (Under construction)
     

    Attached Files:

  3. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,228
    Likes:
    641
    Location:
    Derbyshire, UK
    I disagree! - it's perfectly OK as it was, and I would design it that way - it's the standard way that type of circuit is normally used. As the Vbe of the transistor limits the voltage to 0.7V, then your voltage divider argument doesn't have any relevance.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. Jay.slovak

    Jay.slovak Active Member

    Joined:
    Jan 11, 2005
    Messages:
    1,726
    Likes:
    5

    Hmm strange, I did this since I started and it always worked ok.
     
  6. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,228
    Likes:
    641
    Location:
    Derbyshire, UK
    Hmm strange, I did this since I started and it always worked ok.[/quote]

    Your way will probably work OK, but it has no advantages over the conventional way? - my concern was that you were casting doubts on the original circuit, when it had nothing wrong with it!.
     
  7. Jay.slovak

    Jay.slovak Active Member

    Joined:
    Jan 11, 2005
    Messages:
    1,726
    Likes:
    5
    I am sorry for that :oops: , the thing is I learned everything without assistance of any Teacher... so there is a chance that I "see" things differently.
     
  8. evandude

    evandude New Member

    Joined:
    Oct 1, 2003
    Messages:
    1,395
    Likes:
    5
    Location:
    Maine, USA
    hey, anyone who can build an ICD2 from scratch, including modifications, without any formal education is alright in my book :D
     
  9. Jay.slovak

    Jay.slovak Active Member

    Joined:
    Jan 11, 2005
    Messages:
    1,726
    Likes:
    5
    Thanks! I appreceate that!
     
  10. Mike - K8LH

    Mike - K8LH Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    3,637
    Likes:
    109
    Location:
    Michigan, USA
    Jay (and gang),

    Thank you for all the help and guidance... I think I've finalized the last bit of circuitry to finish up the ICD2 clone (drawing below)...

    Now I'm trying to figure out the best way to squeeze those four transistors, 2 LEDs, and other components into that tiny 3/4 inch by 3/4 inch blank area on the prototype board (picture below)... Wish me luck...

    If you're wondering -- I use machined pin sockets and I put the five 0.1 uf monolythic caps' in the socket open space under the RS232 chip and I put the bypass cap' and the six ADC resistors in the open space under the 16F876 chip... T'was the only way I could think of to squeeze everything onto this tiny prototype board...

    Regards, Mike
     

    Attached Files:

  11. evandude

    evandude New Member

    Joined:
    Oct 1, 2003
    Messages:
    1,395
    Likes:
    5
    Location:
    Maine, USA
    one of you guys should draw up a PCB layout for this modified design.

    make it single-sided, and I'll etch one for free for whoever does it! :D
     
  12. Jay.slovak

    Jay.slovak Active Member

    Joined:
    Jan 11, 2005
    Messages:
    1,726
    Likes:
    5
    I see that you decided for Transistor tree solution, why led you to do so?
     
  13. evandude

    evandude New Member

    Joined:
    Oct 1, 2003
    Messages:
    1,395
    Likes:
    5
    Location:
    Maine, USA
    following up my last post... even if someone could make a schematic in Eagle, I could do the layout for it. I'd be interested in making one of these, but would want to put it on a nice PCB, and I'm sure others would like to have a PCB for it as well!

    thanks
     
  14. Mike - K8LH

    Mike - K8LH Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    3,637
    Likes:
    109
    Location:
    Michigan, USA
    Jay,

    It works... Yippee!!! I'm pretty 'geeked' (grin)... I thought I might have had a problem but then realized I had to tell MPLAB to power the Target from the ICD2... I successfully erased, programmed and verified a '628A and will check it out in much more detail in coming days...

    Thank you again for helping me brain-storm the final Target MCLR circuits...

    Regards, Mike
     

    Attached Files:

  15. Jay.slovak

    Jay.slovak Active Member

    Joined:
    Jan 11, 2005
    Messages:
    1,726
    Likes:
    5
    Congratulations! ICD2 will serve you well... :D
     
  16. Mike - K8LH

    Mike - K8LH Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    3,637
    Likes:
    109
    Location:
    Michigan, USA
    Jay,

    I'm sorry, I missed this post as it jumped onto a new page...

    I didn't use the Op Amp circuit because I would have to adjust the VPP voltage every time I used a different power brick... I have three different ones on the Lab Bench, each with a slightly different voltage between 15 and 18 volts...

    I really liked your opto-isolator scheme... T'was very compact and elegant but I didn't have any nice 4-pin opto's and I also worry that switching time may be slower than bipolar or mosfet switches...

    I used transistors because I had them... I used the BAT43 and 3K6 on the Target MCLR line to eliminate one transistor...

    Regards, Mike
     
  17. Mike - K8LH

    Mike - K8LH Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    3,637
    Likes:
    109
    Location:
    Michigan, USA
    Jay (and gang),

    The Serial ICD2 Clone has been working well and I even tested it on a 12F683 with INTOSC selected and MCLR disabled...

    The only "annoyance" is that MPLAB will not remember my COM1 setting for the ICD2... It always defaults to USB... I even tried using the ICD2 Installation Wizard but still "no joy" getting the COM1 setting to "stick"...

    As Evandude suggested, a PCB would be nice and probably would have cut down my assembly time from four hours total over several days to about a half-hour in a single sitting, provided you had all the parts on hand...

    Regards, Mike
     
  18. Jay.slovak

    Jay.slovak Active Member

    Joined:
    Jan 11, 2005
    Messages:
    1,726
    Likes:
    5
    Yes, I hate that... nobody (or nothing ) is perfect :cry:
     
  19. williB

    williB New Member

    Joined:
    Aug 30, 2004
    Messages:
    2,217
    Likes:
    3
    Location:
    New Jersey
    I've been reading this thread all along ..
    and Correct me if i'm wrong , but no one seems to be using USB , mikes latest design , which is nice work btw , is serial ? no??
    And Jays design is clearly serial , also very nice work ,
    so my question is
    why isnt anyone using the USB port??

    this doesnt look to hard to copy.. granted it is just a USB programmer , with no ICD2 capabilities , but one of us should be able to at least figure out what is so mysterious about USB..
     

    Attached Files:

    • usb.jpg
      usb.jpg
      File size:
      27.5 KB
      Views:
      918
  20. evandude

    evandude New Member

    Joined:
    Oct 1, 2003
    Messages:
    1,395
    Likes:
    5
    Location:
    Maine, USA
    ALL the USB PIC programmers that I have seen so far simply use a USB-serial adapter chip. (usually FTDI or similar)

    for instance, that one in the picture does. (as do all the other ones by that manufacturer) and if you look at the latest ICD2 clone design, it too has a USB-RS232 chip on there (small surface-mount chip with leads on all 4 sides)

    it's just some extra circuitry to interface it with an otherwise serial-port-oriented design.

    however, those chips aren't all that easy to find, or cheap. I got a couple as free samples by emailing the compnay, but to purchase them, I believe is expensive.

    and that programmer you posted only does low-voltage programming. so it can only do pics with FLASH memory that support LVP, and you also need a separate programmer to program them the first time to enable LVP. (and do it again, if you ever accidentally change it)
     
  21. Beefer3

    Beefer3 New Member

    Joined:
    Sep 1, 2003
    Messages:
    76
    Likes:
    0
    Location:
    Connecticut
    Hey all. If some of you don't remember, I am the one who started this thread. Long time ago :lol:

    Anyway, I recieved my laptop and have a USB to RS232 convertor in hand. I am still in the process of looking for a USB programmer.

    But in the meantime I would like to use my new laptop with my trusty old uJDM programmer. Schematic seen here: http://www.semis.demon.co.uk/uJDM/uJDMmain.htm

    As mentioned before, I have a USB to Serial converter that I know works fine. I have successfully communicated with temp controller at work. But my delema is the convertor will not work wit the uJDM. I have never had any failures with this uJDM since I built it. Granted, all my programming was done on a desktop not a laptop.

    When I try to program an 877A I get the dreaded "Verify Failed at Address 000h" error. From previous posts I get the idea that this error is caused by too low of voltage when programming. Is this correct and if so, how can I modify the schematic above to boost my power during programming?

    Any suggestions while I still look for a USB programmer?

    Thanks
     

Share This Page