Wouter, On Wed, 26 Jan 2005 11:39:10 +0100, Wouter van Ooijen wrote: > Just a thought that popped up druring some boring solder work. If you > want to do quick changes of I/O pins on 14-bit core PICs forget about > the PORT registers, use the TRIS registers. Write 0 to the relevant PORT > bits, and use pull-ups (as stiff as the PIC can handle, for instance > 1k). Now write a 0 to the TRIS bit to make the pin low, write a 1 to > make it input and hence high (due to the pull up). I was going to ask why you'd want to do this, then looked at the Subject and realised - it gets over the R-M-W problem! :-) The only downside I can see is that using 1k it draws 5mA for each pin that's being pulled high but driven low, and if you have a whole 8-bit port like this it's getting to be quite a drain on power, so not a Good Thing for a battery-operated device. Cheers, Howard Winter St.Albans, England -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist