I'm using an atmega88 microcontroller. I have a pushbutton switch connected to pin 24, which is PC1. the button's other side is wired to ground am i'm using the avr's internal pullup resistors. Here is my code:
while( (PINC & _BV(PC1)) == 1 )
This while loop pauses the program until the button is pressed, but the program does not pause. The hardware is correct and the inputs are configured correctly.
Can anyone tell me what I'm doing wrong???