"Tim Forcer" said: > (Warning - all the following is concerned with PIC'84, although much of it > will apply to other PICs too.) > > I wouldn't go along with the original message's last statement - in my > experience PICs are pretty tough little ICs! We get a lot which are put in > wrong-way-round and the like, and most of them survive. The only reason I managed to kill two of my PIC16F874s is because my RS232 linedriver was spiking MCLR below ground when the bootloader software issued a reset. A BC547 transistor and a few resistors cured that slight problem. The PICs appear to be stone dead though... > Generally, what seems to break PICs is similar to what breaks many digital > ICs, namely contention on output pins. That is, an output pin tries to go > HI when it is connected either to GND or to another pin which is trying to > drive LO. (Or it's trying to drive LO and is connected to VDD or to > another pin which is trying to drive HI.) PICs can source/sink a fair bit > of current, and the resultant dissipation in a contention situation is > enough to blow the driver, rendering that pin dead (sometimes the pin can > be used for input, but generally the bondwire goes too, making it open > circuit). Very nasty... Which is why I use resistors to pull I/O lines down. The reason being, if the pin is accidentally set as an output, the resistor will start dissipating power. If it's left as an input, the resistor just pulls it up/down. I tend to use SIL resistor packs a lot more than individual 4k7s though. > After a lot of messing around, I ended up producing a little unit with an > 18-pin ZIF socket, some LEDs, a dc-dc converter, an analogue switch and a > second PIC. The latter attempts to program the device under test (DUT) - > if programming fails, this is indicated on a LED and the control PIC > stops. The DUT is programmed to have a 4-bit twisted ring counter pattern > (0000 > 0001 > 0011 > 0111 > 1111 > 1110 etc) on sets of four output pins > at a time, with the pins connected A0 to A4 to B0 to B4 (etc). The control > PIC monitors the 4-bit set, looking for the right patterns, and gives a > fault indication if the expected patterns don't appear. Once all four > patterns have been detected (ie each subset of pins has worked OK as an > output), the control PIC gives an "OK" indication. > > Source is just over 900 lines of heavily commented assembler - if anyone's > interested it's at . Very nice. I'll save that URL for future reference. Later. -- Phil. philpem@dsl.pipex.com http://www.philpem.dsl.pipex.com/ -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.