This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Logic Characters code

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?