Compare commits

...

1 Commits

Author SHA1 Message Date
Niclas Thobaben 9324341fae commit nachricht...joa...aufgabe 1 voll und ganz bewältigt. Note 1++. 2017-12-26 14:08:49 +01:00
3 changed files with 27 additions and 3 deletions

View File

@ -1,7 +1,7 @@
CFLAGS+=-DF_CPU=16000000
CFLAGS+=-DF_CPU=16000000 -O0
AVR_FUSE_LOW=0xDE
AVR_FUSE_HIGH=0xD1
AVR_FUSE_EXTENDED=0xF0
AVR_FUSE_EXTENDED=0xC0
DEPENDS=avr-fw-modules/cpu/atmega32u4

BIN
bin/.swp 100644

Binary file not shown.

View File

@ -1,6 +1,30 @@
#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;
}