ICSP question

ICSP question

Postby E3po » Fri Jul 15, 2011 10:33 am

Hey guys!
I just got access to a PIC programmer to play with. I was gonna "muck with" the tactile metronome (my first PIC based toy) to try to learn a few things.
The PIC programmer only supports a 14 pin PIC16F685 (the one in the tactile metronome is 20 pin) and the ICSP header on the programmer is 6 pins (labeled GND, VCC, CLK, DAT, LOW, and VPP) and the header on the tactile metronome is 5 pin (MEMCLR/VPP, VCC, GND pin 1, ICSP DAT, CLK) the order in schematic.
I am wondering if it is possible to connect the two by simply omitting the LOW connection and does the device need to be powered to reprogram the chip?

I'm willing to try a few things but I don't want to destroy anything.

Thanks
-e
Last edited by E3po on Fri Jul 15, 2011 11:08 pm, edited 1 time in total.
E3po
 
Posts: 21
Joined: Tue Mar 01, 2011 12:47 am

Re: ICSP question

Postby layne » Fri Jul 15, 2011 12:28 pm

Awesome! Congrats on getting a PIC programmer. Which one did you get?

I've never heard of a pic programmer that only worked with one specific chip, usually they can handle at least one whole family (PIC16 or PIC18, for example), and most that I've seen can handle almost all the different PIC families (12, 14, 16, 18 at the least, maybe even 24, 33, and dsPIC).

You're right, the standard PIC ICSP header is 6 pins, but hardly anyone uses the 6th pin (it's used for a low voltage programming mode, but it requires an extra IO pin that you can't use for anything other than low-voltage programming mode, so we never use it). The 5-pin header on the tactile metronome is a standard icsp header except for the missing and unused 6th pin. In fact, that's how I usually program and test the PIC chips that end up in the kits.

The device does need to be powered in order to program, but every programmer I've seen has an option to provide said power. During development of the TM firmware, I always just powered it from my programmer, a PicKit 2, which I highly recommend (also has Linux and OSX support)! At least on the Pickit 2, it should detect if the chip is already powered (say, from the batteries), or provide power if it's not already powered.

Hope that makes sense, let us know if you need any help with it. Good luck!
Matthew "Layne" Beckler - Wayne and Layne, LLC - http://wayneandlayne.com/
layne
Wayne and Layne staff
 
Posts: 156
Joined: Thu Aug 19, 2010 12:51 pm
Location: Pittsburgh, PA, USA

Re: ICSP question

Postby E3po » Fri Jul 15, 2011 11:46 pm

Thanks for the reply!! I am sorry for the confusion, but I meant the programmer I got doesn't currently support the 20 pin version of the PIC 16F685. The current software the company (MCUMALL) has for my programmer (PRG-017 USB PIC programmer) currently has support for up to 18 pin PIC16's chips I think, but supports other chips and chip families. One such supported chip is a 14 pin package 16f685. I have been trying to get the thing to even read the 16F685 in the tactile metronome or even in the ZIF socket of the programmer with no success. The ZIF socket on this guy is 40 pin, so my issue is not that this PIC fits. I have even been trying to get on the forum of MCUMALL to find out how to change chip definitions in their CHIPINFO.cid file.

I would be satisfied if I could program via the ICSP headers on both devices. Do the pins on the tactile metronome directly correspond to MEMCLR/VPP, VCC, GND pin 1, ICSP DAT, CLK
in that order?

Pin 1 is the only one labeled and seems to be ground. Is that right? If so do I simply connect the other 4 in order (VCC, CLK, DAT, and VPP) skipping the low?

I only have wires. I do not own a "ICSP cable" if such a thing exists. i.e. each connection is manual.

As I currently only own a Windows machine without a serial port, I looked for the cheapest PIC programmer that supported PIC16F685 (PRG-017 USB PIC programmer from MCUmall) not knowing it did not currently DIRECTLY support the PIC used in your device. (I guess the thing is in BETA support and testing for a PIC16F685 and only 14 pin) The software and specs are only available after purchased...
...I am trying to salvage the purchase and to use ICSP to program the chip.

I am wondering if I select the 16F685 and the ICSP option, can I use their programmer to program the chip? I am in way over my head but want to learn.

There are a lot of Pickit 2 clones and such on ebay. Can you link to an affordable (I know it is relative) example? My non working one was $30 shipped.

You guys rock.
-e
E3po
 
Posts: 21
Joined: Tue Mar 01, 2011 12:47 am

Re: ICSP question

Postby layne » Sat Jul 16, 2011 10:57 pm

When you said this:
One such supported chip is a 14 pin package 16f685.

Did you actually mean some other chip, not the 685? As far as I know there is only the 20 pin version of the 16F685, the one used in the Tactile Metronome, but I certainly am no expert on all the PIC micros.

The tactile metronome has a standard PIC ICSP header, except it does not include the last pin, pin #6 (the low voltage programming pin). The first file pins are the standard pinout:
Code: Select all
1 - VPP / MCLR
2 - VDD
3 - VSS
4 - ICSPDAT / PGD
5 - ICSPCLK / PGC

As far as I know, the ICSP programming details are sort of by family, and since that programmer appears to support at least some form of the 16F685 and friends, I'll bet you have a good chance at getting it to work! Additionally, the five connections in the ICSP header are all in the pins near the top of the chip, so it's not like there are any connections to the pins that would only be on the 20-pin part (and not a 14-pin part) (if that makes sense).

Adam (the other guy at W&L) has an official Pickit 2, and I have a $30 Pickit 2 clone I got from ebay about 4 years ago. I know that they've released a pickit3 and are starting to phase-out the PK2, but I still really like my PK2 for the great linux support.

Hopefully that makes sense, please let us know if it doesn't. We're more than happy to help you get up and running with your ICSP programming of a Tactile Metronome. Can't wait to see what cool hacks and mods you come up with!
Matthew "Layne" Beckler - Wayne and Layne, LLC - http://wayneandlayne.com/
layne
Wayne and Layne staff
 
Posts: 156
Joined: Thu Aug 19, 2010 12:51 pm
Location: Pittsburgh, PA, USA

Re: ICSP question

Postby E3po » Sun Jul 17, 2011 10:53 pm

Your replies make perfect sense. My confusion is only enhanced by the communication with the maker of this programmer and the documentation provided by the seller.

All I know is when I open the software that goes with this programmer and select PIC16F685, an image of a 14 pin chip comes up and it doesn't recognize my 20 pin PIC16F685. You guys are certainly more fluent in this stuff than I so I do believe that the 20 pin example is the only one.

I have made an effort to contact the seller to see if they will honor a refund as this thing doesn't seem to support the chip in question. I will probably try to get some PK2 or equiv. as that is what you can vouch for.

I am pulling my hair out trying to make sense of this programmer so I will probably just wait to hack this thing until I get another programmer.

Thanks for your help with this and your patience with me on this.

-e
E3po
 
Posts: 21
Joined: Tue Mar 01, 2011 12:47 am


Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron