Timers
Schematic (Circuit Diagram)
Program
/****************************************************** A Simple Device Timer project designed using ATmega8 AVR MVU. The Timer is usefully for keeping a device "ON" for a specific period of time. After the set time elapse the timer automatically turns the load off. The Timer uses a standard 16x Web site. Use avr-gcc + AVR Studio to compile. ******************************************************/
#include <avr/io.h> #include <avr/interrupt.h> #include "lcd.h" //Connection of Load #define LOAD_DDR DDRC #define LOAD_PORT PORTC #define LOAD_POS PC0 //Global variable for the clock system volatile unsigned int clock_millisecond=; volatile char clock_second=; volatile char clock_minute=; volatile char clock_hour=;
For more detail: