On 30 Mar 2017 at 8:48, alan.b.pearce@stfc.ac.uk wrote: > If you are really after low power then you don't want any pull-ups. >=20 > Default state is set port to output with all pins at 0 (assuming > switches are to ground). When you need to read it set all pins to 1, > do read and return pins to 0. Yes the output FETS will see short > circuit current for about 5us while you do the read, but the average > of that with 0 current over a significant period of time will be > much less than even the internal pull-ups.=20 I like this idea. Asbolute minimal parts, high noise immunity, power consum= ption=20 great so long as not reading too often. PIC's are generally OK with brief s= horts on=20 outputs, though for complete confidence you'd want to establish that doing = so=20 doesn't take anything outside of datasheet specs. Variations on the theme include combining with internal or external pull-up= s and=20 setting idle output states hi/lo to match switches after reading them. Smal= l delay=20 before reading to give pull-up time to overcome capacitance. --=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 .