> > There is another way of doing it that removes the need for any pullups. > > > > Set the pins as outputs. Set the outputs to all ones. Now read them > > and see which ones are high and which are low, and save the states. > > > > Now set all the pins as 0. Again read all the pins and compare the > > states to the previous read. If the state has changed the output is > > not connected to anything. If the state doesn't change the output is > > shorted to somewhere by the dip switch. > > > > > It is really abusive to short digital outputs high or low like this. Many= parts will > withstand it, but it almost certainly exceeds the absmax ratings on the p= ort > outputs. Abusive for a handful of microseconds (unless using an extremely slow clock= ) In reality the abuse the output transistors will see is the short circuit c= urrent specified in the data sheet for a very short time (unless the code i= s badly written). I wonder how that 'abuse' differs from the current glitch= the same transistor would see driving a reasonable frequency signal (i.e. = non-steady state). That is likely to be charging and discharging a capacito= r at a rate that will cause a reasonable amount of 'abuse' to the transisto= r. --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .