First solution, clear all unused ports and then set it as outputs. Write small re-initialization routine to control the state of ports and call it occasionally to avoid direction or data changes on unused ports. The second way, connect them to gnd or power via resistor like Adam already mentioned. Andrej _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. Share information about yourself, create your own public profile at http://profiles.msn.com. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.