Blinking Led video and source code

This is my first microcontroller project video.

January 31, 2008

I programmed my first attiny2313

I programmed my first Atmel ATTiny2313 today. Of course this was a blinking led program. I used the following code: #define F_CPU 8000000UL #include <avr/io.h> #include <util/delay.h> int main(void) { DDRB |= 1<<PB0; /* set PB0 to output */ while(1) { PORTB &= ~(1<<PB0); /* LED on */ _delay_ms(100); PORTB |= 1<<PB0; /* LED off */ _delay_ms(900); } return 0; } This will blink a led if it’s connected to PB0 (or pin 12 on the microcontroller)....

January 30, 2008