> 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? My preferred approach is to have a programmable supply with 3 settings (off, low-current, and high-current), and to have the data wire from the PC wired such that the PC can pull weakly high or down. If when I try to read back memory address zero the PIC outputs active data when and only when it should, then I assume the PIC is inserted correctly. If not, I shut off the power. Even twelve volts, if current limitted to a couple of mA, isn't likely to hurt the PIC in the short time it's applied.