On Tue, Mar 26, 2002 at 10:29:59AM -0500, Chris Loiacono wrote: > I am doing a board with a PIC18, on which I'm planning what I'm calling an > expansion connector. > Basically I want to bring all the unused I/O, along with some other pins to > a connector that will allow me to make various daughter-boards that can be > plugged-in as future options. Always a good idea. > > Normally, I tie all unused I/O to Gnd. DOing this will be somewhat > challenging, since any of these will be made useless for future use if this > is done permanently. The options I can foresee are either shunt-jumpers to > Gnd, or perhaps setting all the unused pins as outputs. The latter is > something I have never tried. I'm hoping one of you has some insight to > share on this. Well you missed a third option. Actually your first option of tying directly to GND is a somewhat dangerous proposistion. If for any reason such a pin was ever set to an output and high, you'd blow it sky high. The third option is to use a very light pullup/pulldown resistor. Gives the same effect by forcing the input pin to a known state, with the additional advantage that it can be easily overridden either as an output or input. I like it best because it's not subject to programmatic failure. However it'll cost you a bit of board real estate and a bit of power consumption. Also it can hinder very high speed bus operation, But since a PIC isn't going to be able to twiddle I/O lines any faster that once every 200ns, it probably won't be a problem. 22Kohms is probably a good value for starters. Also places like Digikey carry resistor packs where 15 resistors with a common pin in a 16 pin package. Two of those should be able to cover the entire bus. Setting I/O pins to outputs is the next logical choice. However don't trust your code to set and forget. PIC code can sometimes flip bits in the output latches especially using read-modify-write instructions. BAJ -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body