ahmed_mahmoud
Junior Member level 1

I use gcc compiler WinAVR and I want to check the input
if(PINB0==1)
{
//do something
}
However, when I set the B0 nothing happens, but when I use
if((PINB&0x01)==0x01)
{
//do something
}
it works perfectly; nevertheless, its not practical to write like that each time i use if condition.
Regards,
Ahmed
if(PINB0==1)
{
//do something
}
However, when I set the B0 nothing happens, but when I use
if((PINB&0x01)==0x01)
{
//do something
}
it works perfectly; nevertheless, its not practical to write like that each time i use if condition.
Regards,
Ahmed