Would You please show me how to read if an input from a switch.
I have been trying on many ways, but it dosen't work proberly - I get
strange results.
Here is an example of one my tryes.
int main (void)
{
IO1DIR = 0xff000000;
while(1)
{
if ((IO1PIN & 0x00ffffff) >= 0x00000000)
IO1SET = 0xff000000;
else
IO1CLR = 0xff000000;
};
return 0;
}
What is wrong?