Hi Peter,

Thanks for the advice and I'll make port A all output as I'm only using port B. Oh and yes the inputs on the switches are tied high via a 10K resistor.