programming PIC12F683 via USB

Discussion in 'General Electronics Chat' started by magnet18, Nov 27, 2013.

  1. magnet18

    Thread Starter Senior Member

    Dec 22, 2010
    1,232
    124
    I recently got a couple PIC12F683 uC's to play around with, and I now realize that all of the circuits I see to program use a serial port

    does anyone know how I could program one with just USB?
    from the datasheet (http://ww1.microchip.com/downloads/en/DeviceDoc/41211D_.pdf)
    it uses
    +5V pin 1
    GND pin 8
    Vpp pin 4, programming voltage, I assume to put the device in programming mode?
    clock, pin 6
    data, pin 7

    there has to be a way to program these for those of us that don't still have outdated serial ports on our computers

    could anyone help?
    this is for "in circuit programming", are their simpler ways or simpler circuits?

    Thanks!
     
  2. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Get a PICKIT programmer ;)
     
  3. GopherT

    AAC Fanatic!

    Nov 23, 2012
    5,976
    3,677
    Pickit2 or pickit3
     
  4. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    ...a pick it 3 if you intend on ever progressing to the newer PICs...
     
  5. magnet18

    Thread Starter Senior Member

    Dec 22, 2010
    1,232
    124
    is there any chance an Ethernet to serial or a usb to serial would work?
     
  6. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    Ethernet : NO

    USB -> serial : NO. The USB frame frequency is 1mS however, serial port programmers need to control various lines directly with much higher frequency.

    This is one reason, also the voltages are not right.

    Serial port : YES. It is possible to build a simple programmer with a few diodes an resistors.

    I have built a programmer for PIC 16f716, with 2x AAA batteries onboard and a simple dc/dc converter to generate 12 volts programming voltage. It is just a transistor and 2 coils.

    The schematic is from the web however I modified it to use batteries.

    I never used it in the end- only some PICs can be programmed. The newer PICs have different timing, and different voltages, so it would be a big mess to support them.

    There are cheap PICKIT3 clones on eBay, and regular PICKIT3 costs 50 dollars or so.
     
    magnet18 likes this.
  7. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    I use a PICkit 2 and like it. I use it on a solderless breadboard with my own adapter design. http://www.ebay.com/itm/PIC-Solderl...500?pt=LH_DefaultDomain_0&hash=item2332a4d4a4

    On the other hand, it's pretty easy (and cheap) to add a serial port to most desktop computers. I added one to mine for free by using a card from an old box that was put out for trash. You probably know this, but it's easy to forget that sometimes "old" works too.
     
  8. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    While I would say it is technically possible, it would require much more work (and probably money) than buying a $30 device that is known to work...
     
  9. BobTPH

    Active Member

    Jun 5, 2013
    782
    114
    +1 on the PICKIT. The time you will waste making your own programmer is not worth it.

    Bob
     
  10. GopherT

    AAC Fanatic!

    Nov 23, 2012
    5,976
    3,677
    But, then again, almost all the projects discussed on this site can be purchased instead of built.
     
  11. magnet18

    Thread Starter Senior Member

    Dec 22, 2010
    1,232
    124
    Alrighty, looks like I'll just get the pickit since I'm planning on lots of projects in the future
    Too bad I can't add a serial port to my laptop :p
    I definitely don't want to pay $50, can anyone recommend a pickit 3 clone?
    (Looking for a knockoff that's not also a ripoff ;))
     
  12. magnet18

    Thread Starter Senior Member

    Dec 22, 2010
    1,232
    124
  13. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
  14. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    Yes, it is. Thanks. And I have a 14-pin version coming soon.
     
  15. electron_prince

    Member

    Sep 19, 2012
    93
    3
  16. magnet18

    Thread Starter Senior Member

    Dec 22, 2010
    1,232
    124
    I looked into that, unfortunately they don't have much support for 8 pin devices, which is what I need at the moment

    question about programming that I haven't read into yet, would the PIC's be programmable with the MSP 430 equipment?

    I doubt it, but I don't know how standardized things are
     
  17. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    A MSP430 programmer will only work on a MSP430 series IC. Looked at ebay many offers a PICKIT or clones bundled with a ZIF socket. You do not really need the ZIF socket. It is only an extra cost factor.
    This is an example of a lowcost PICKIT 2 clone. I think the member Mark77 use one of those. Not sure PICKIT 2 support your PIC though
    http://www.ebay.com/itm/Bid3-iCP02v...ultDomain_0&hash=item5af8405ff9#ht_4565wt_961
     
  18. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    I don't know anything about the iCP02v2 programmer, but a PICkit 2 does work with the 12F683. The iCP02v2 programmer does have an ICSP feature, which is necessary for experimentation. It eliminates putting the PIC in a programmer, programming it, taking it out of the programmer, and putting it in a circuit, and repeating this every time you make a change in the code.

    I don't know your budget, but for $50, you might be better off in the long run with this. http://www.digikey.com/product-detail/en/PG164130/PG164130-ND/2171224
     
  19. magnet18

    Thread Starter Senior Member

    Dec 22, 2010
    1,232
    124
    I just got a PICkit 3 on ebqy for $30!
    Hopefully the MSP430 will be a Christmas gift :)
     
  20. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    It is probaly a clone. But that does not matter much. As long as MPLAB will see it as a real PICKIT
     
Loading...