Howdy, some (ds)PICs with big memory come only with a high number of pins. So, if I only need to use few I/Os, one thing I usually do is to leave the unnecessary ones unconnected, and then (immediately at reset time, and if I'm being paranoid about cosmic rays, every now and then in the main loop or in some interrupt routine) the first thing I do is to set those PORTs as output to avoid (as you may have already well intuited) floating inputs, which draw unnecessary current, and probably do no good to the transitors inside the chip as well. Some people prefer to keep them inputs, and use resistors to tie them to ground. I don't, because I don't want to solder unnecessary resistors and because the PCB is much simpler (and allows more opportunities to route other signals) if I keep those I/Os unconnected. Anyway, now I am faced with this problem: my circuit must draw as little current as possible (usually it sleeps), and there are some pins which can be used as outputs, inputs, or tri-stated. When they're outputs, no problems. When they're inputs, no problems either (the other end will make sure the line is not floating), but when they must be tri-stated, then I'm faced with a problem. The best solution I thought so far (and I am writing to seek a possibly better option I'm currently ignoring) is a 1M resistor to ground (not Vdd, but ground. It seems there's less leakage current this way, but it may be only the case I measured). 10Mohm was definitely too much, and 100K (or so) will draw unnecessary current, so I've selected the magic 1M value. Do you think there's a better approach to the problem? Thanks, Mario -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist