X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;f=avr%2Fblink%2Fhelloworld.c;fp=avr%2Fblink%2Fhelloworld.c;h=f0ffecb83faf7862a48edacee6eabe7bdf532440;hb=1375f65d6d332f228e3e62831d42895bdff67423;hp=0000000000000000000000000000000000000000;hpb=8462ced4f6de0a6a524a8adf8ce96cb62c070723;p=mirrors%2FPrograms.git diff --git a/avr/blink/helloworld.c b/avr/blink/helloworld.c new file mode 100644 index 0000000..f0ffecb --- /dev/null +++ b/avr/blink/helloworld.c @@ -0,0 +1,40 @@ +#define F_CPU 100000UL // Sets up the default speed for delay.h +// this is the header file that tells the compiler what pins and ports, etc. +// are available on this chip. +#include + +// define what pins the LEDs are connected to. +// in reality, PD6 is really just '6' +#define LED PD5 + +// Some macros that make the code more readable +#define output_low(port,pin) port &= ~(1<