I have a MCU that i am not using all the pins. Can I tie the pins directly to Vss or do i need a pull-down resistor? If I need a resistor, can I use one resistor for all or several pins or do I need a resistor for each pin?
As JimB said, if a pin is an input only, you need to tie it up or down - not just leave it floating. Any bi-directional pins (almost all of them) should be set as outputs and set either high or low - is consumption is critical, it'sworth measuring to which (if either) gives the lowest current consumption.Or you can just leave them as is and not address those pins in code at all. Easier to write 0's to those pins and configure them as outputs. No additional components necessary.
Like I said, it was discussed endlessly decades ago - a weak pullup is usually still wasting power - pulling the down down is likely to be better. But simply setting the pins as outputs, may be better as well.The only time I've had an issue is with older PIC16's that use a dedicated LVP select pin (16F88x comes to mind). If you dont tie this pin low and leave LVP enabled in the configuration word, it will float in and out of programming mode. Disabling LVP on these pics stopped that.
The newer PICs don't have a dedicated LVP pin and use MCLR just like HVP so its a non issue on the newer parts.
I think most of the newer PIC18F parts have weak internal pull ups on every port that can be enabled as well. This option would probably offer the least current consumption.