Hi What is the code used to say port2 = port2 anded with 0x7f This will clear all bits of port 2 but bit 7? I thought it was P2 &= 0x7f this doesnt work, so i tried P2 = (P2 && x7f) This also didnt work. Anyone know what it is?
"I actually have to set the bits high because its inverted" If you want to set bits 0-6 and leave bit 7 unchanged you need to OR: P2 |= 0x7f;