That is also possible. You can use the bit AND operator (&).
The purpose of (porta & %00010101) is to strip out the unwanted information. Only the bit where you see a 1 will be kept from porta. Then you compare that with the value you are looking forCode:if (porta & %00010101)=%00010101 then
Edit: Looks like skimask got there before me!
Bookmarks