void setup() {
// put your setup code here, to run once:
DDRF|=(1<<PF0);
DDRF&=~(1<<PF1);
PORTF|=(1<<PF1);//enabling internal pull up resistor to avoid floating values.
PORTK|=(1<<PK0);//enabling internal pull up resistor to avoid floating values.
PORTA|=(1<<PA0);//enbaling internal pull up resistor
DDRK|=(1<<PK1);
DDRK&=~(1<<PK0);
DDRA|=(1<<PA0);
}
void loop() {
// put your main code here, to run repeatedly:
if(!(PINF&(1<<PF1))){
PORTF|=(1<<PF0);
}
else{
PORTF&=~(1<<PF0);
}
if(!(PINK&(1<<PK0))){
PORTK|=(1<<PK1);
}
else{
PORTK&=~(1<<PK1);
}
if(!(PINA&~(1<<PA0))){
PORTA|=0xFF;
}
else{
PORTA|=0xFF;
}
}