By standard practice, you want to minimize current flows AND oscillations. So, all unused inputs to simple gates, I will tie to ground, or disable it if its a tri-state buffer or that type of device. You don't want the output gates switching. Programmable logic, ie, PIC's, are a different story. In some cases, such as Altera, you don't do anything with them because they take care of them in the burn file. Micro's, who's ports can be either way, should not be grounded. Its been stated before, that since its a programmable I/O, it might be set to be an output and drive current direct to ground. Not real good on the system to do this. As suggested, but default, program these to be outputs, and don't drive them. Problem is on the development of a system, not just PIC's, but in general, is not enough thought is taken to the simple things, like decoupling, routing of clocks, parallelism of traces, ground planes, power planes. The list goes on. I'm doing a board now, 12 layers, 99.99% surface mount, 4 clock domains (including 100 MHz). Management says hurry up, get it done. I tell em to cool off, ask if they would rather have me spend a week extra to make sure we don't have to turn the card again, or just hurry and do it. They shut up pretty quick. If you don't have time to do it right the first time, how do you have time to do it a second time? Sorry for being a little off topic...but it might help someone out there.