31 lines
392 B
C
31 lines
392 B
C
#include <avr/io.h>
|
|
|
|
int main(void)
|
|
{
|
|
|
|
//Taster-pin == input (-> pull-up/ oder nicht)
|
|
//if(Taster) -> PORTC = _BV(7)
|
|
|
|
DDRC = 0xf0;
|
|
PORTC = 0x00;
|
|
|
|
DDRE = 0x00;
|
|
PORTE = 0x00;
|
|
|
|
unsigned long i = 0;
|
|
|
|
while(1)
|
|
{
|
|
if(PINE & 0x04)
|
|
PORTC &= ~_BV(6);
|
|
else
|
|
PORTC |= _BV(6);
|
|
|
|
if((i++ % 10000) <= 5000)
|
|
PORTC &= ~_BV(7);
|
|
else
|
|
PORTC |= _BV(7);
|
|
}
|
|
return 0;
|
|
}
|