| [Quenteux | Broll | Diwo]
|
#include <avr/io.h>
main ()
{
DDRD = 0b10000100;
PORTD = 0b00000000;
DDRC = 0b00100000;
PORTC = 0b00000001;
while (1)
{
if (bit_is_clear(PINC,0))
{
PORTD = 0b10000100;
PORTC = 0b00100001;
}
else
{
PORTD = 0b00000000;
PORTC = 0b00000001;
}
}
}
|