> > If you are really after low power then you don't want any pull-ups. >=20 > Conceptually, I concur, Alan, but actual implementation is another matter= .. > Code becomes more complex and what if something happens and the PIC > gets stuck and the pin is left to an Output? Also, I don't think I am fo= llowing > your train of thought completely. (Sorry.) What are the long term > implications of that 5us "short circuit" in terms of product life and rel= iability? > What if I am connecting to a DIP switch which is either open-circuit (flo= ating) > or GND? How can you READ a floating state? (You can't.) >=20 > By the way, I need to poll DIP switches regularly, not just when the Igni= tion is > ON. I don't know when someone will flip a switch. There is very little extra code (2 instructions?) to implement this in the = read loop. Using Pseudo code ... ; arrive with port set to output, all pins at 0 Set port to all ones Nop? Read port ; value read from port (NOT LAT register) will reflect state of D= IP switches, OFF =3D 1, ON =3D 0 Set port to all 0s Use value read from port The 'long term implications' of the short circuit if the PIC gets stuck wit= h the outputs set to 1 is that the chip will draw the short circuit current= for each pin where the switch is on. This will be in the region of 25mA/pi= n typically. Note that the chip you are using may have a maximum total curr= ent you can draw through the power supply pins which may limit the number o= f pins you can use this way. There never is a 'floating state' as the port is always configured as an ou= tput (how to confuse someone attempting to reverse engineer your code!). th= e pins you call 'floating' (where the switch is OFF) will go to a one state= when you set the port to all 1s, and the pins where the switch is ON will = stay at 0. You then read the port and the value is the 'inverse' of the swi= tch settings. If you do need to read the switches regularly then have a little subroutine= you call on whatever interval is desired that does the read. But realistic= ally how regular do the switches need to be read? I would still think in te= rms of requiring an ignition off/on cycle (or some other available function= such as an on board push button to reset the PIC) to read the configuratio= n. Its surely not going to be done while the vehicle is mobile? If it is wh= y the low power requirement? --=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 .