On Wed, 5 Nov 1997 10:22:29 +1000 TONY NIXON 54964 writes: >> I am bulding a pic programmerr and was wondering how is it possible >to detect >> when the device is inserted incorrectly, i.e. wrong way round or not >aligned >> with pin one. Any body got any idea how this is done? >> >I guess one way would be to monitor the current going into Vcc on the >PIC chip. If the chip is plugged in the wrong way around the current >flow would be excessive. This could be used via other circuitry to >turn on a LED and disconnect Vcc. PICs, like most chips, have effectively a large diode between Vdd and Vss. It will conduct a large current at low voltage if Vdd and Vss are reversed (which is the case when an 18-pin PIC is inserted backward). Using a power supply with a low current limit (such as a 78L05 regulator), this condition could be detected rather simply by measuring the Vdd voltage at the PIC. Likely it will register a logic 0 on a CMOS input if the target PIC is reversed. > >I don't know if I have been lucky, but I have inadvertantly placed >the chips into programmer(s) the wrong way around, but have not >damaged any chips. Usually what happens is the programmer software >reports an error with programming. > The PICSTART Plus doesn't seem to contain any special circuitry, other than the inherent current limit of the pin drivers and a PTC thermistor that limits the current into the whole programmer from the power cube to a couple hundred mA. I haven't had any PICs damaged by reversing them or plugging in one pin off (so pin 1 of the chip is in pin 2 of the socket). This would result in the Vpp voltage being applied to A4 rather than MCLR, both of these pins are OK for high voltage. Granted I haven't done this very often, but I think it's safe to consider the PIC a rather durable chip that doesn't need much protective circuitry in the programmer to prevent being burned out by the occasional mistake.