In your current code, you are not setting P2 pins in a way that could cause contention. The code is okay in that respect. But I think the way you read the P1 input is incorrect. for example, your have: if ((P1IN & BIT7)) row row_sel|=0x08; This line should have been: if ((P1IN & BIT7)==0) row row_sel|=0x08;
↧