//********************************************************************
//*                                                                  *
//*  Project Name: Basic Hour Timer Controll                         *
//*  File Name: main.h                                               *
//*  Author: Raymond C. Moore III                                    *
//*  Date: Jan 7, 2005                                               *
//*  Version: 1.0                                                    *
//*  Microcontroller: ATMega8                                        *
//*  Purpose: To Turn on or off an external device according to a    *
//*           preset time.                                           *
//*                                                                  *
//*  Method: Using an external RTC 32768hz crystal setup with a      *
//*          prescaler so that it ticks once per second, update      *
//*          a 24 hour clock.  At each hour update, compare on       *
//*          and off times and set an I/O pin to the proper status.  *
//*                                                                  *
//*  Extras: Hour is output in binary on the Port-C pins 1 to 5.     *
//*              (Physical pins 24,25,26,27,28                       *
//*          Flashing heartbeat is on Port-C pin 0                   *
//*              (Physical pin 23)                                   *
//*          Port-D pin 0 set to input for reset button.             *
//*              (Physical pin 2)                                    *
//*          Port-D pin 1 set to input for hour increment.           *
//*              (Physical pin 3)                                    *
//*          Port-D pin 2 set to input for hour decrement.           *
//*              (Physical pin 4)                                    *
//*          32khz crystal goes across XTAL1 & XTAL2                 *
//*              (Physical pins 9 & 10)                              *
//*          Port-B pin 0 is turned on/off at the required times     *
//*              (Physical pin 14)                                   *
//*                                                                  *
//********************************************************************

#include <avr/io.h>
#include <inttypes.h>
#include <stdio.h>
#include <stdarg.h>
#include <avr/interrupt.h>
#include <avr/signal.h>


typedef struct{
	unsigned char second;
	unsigned char minute;
	unsigned char hour;
} time;

volatile time t;

unsigned char turnon = 5;	//turn on at hour 5
unsigned char turnoff = 8;	//turn off at hour 8

int main(void);

