WinAVR C-compiler

WinAVR is a set of open source software development tools for C programming the AVR microcontroller family. It includes the GNU GCC compiler for C and the Programmers Notepad.To learn programming in C you have to install WinAVR first. This small project let you make running leds. You need a attiny2312 microcontroller, eight LED's and 8 resistors of 150ohm.

Programmers Notepad

The C code will be written using the Programmers Notepad, it is included in the WinAVR package.

Hardware

You can use the ATTiny2313 projects board and a small breadboard to build your C-projects on. You can buy it at www.bizztronix.eu. To build the circuit you can use the LED board or use a small breadboard.

Put the LED in the breadboard with the short leg on the resistor side. Use the 150-Ohm resistors to jumper to the ground strip. Use a flat cable and connect the wires to the beadboard. Plug in the flat-cable connector in the PORTB connector of the ATTiny2313 board. Below you see the schematic.

In the WinAVR main folder make a new sub folder called 'runningleds' for this project. Copy '../WinAVR/Samples/makefile' (notice that is has no extension) to the 'runningleds' folder. Open Programmers Notepad, click File, then click New, then click C/C++ and name it runningleds.c. Save it in the runningleds folder and type exactly as shown below: (or copy and paste it)