HI, KD60...

You say : I connect my switches to PortA ... and you define PortB as the inputs ... while you read Portb.

Where are your switches really connected ???

would a little look there help you ????

Alain