/*
	Title:		MC library
	Author:		W.Kahl
	Date:		03/2007
	Purpose:	Definitions Projekt "DiffEasy" 
	needed Software: AVR-GCC with AVR-Libc 1.4.4 to compile
	needed Hardware: ATtiny2313
*/

/*=====================================================================
Port-map of the MCU
++++++++++++++++++
PD2 	= Int0 Channel Input
PD6 	= ICP Capture Input from Channel Input
PB1 	= Output 1
PB0		= Output 2
PD5		= button
PD4		= LED
=======================================================================
*/
#ifndef MC_HF_H
#define MC_HF_H
//################################################################################
#define button					PD5
#define LED						PD4
#define	Out_1					PB1
#define Out_2					PB0
//################################################################################
// Definitions Flag
#define fl_Int0					0
#define fl_calculation			1
#define fl_Negativ				2
#define	fl_setOutp_1			3
#define	fl_setOutp_2			4
#define	fl_ButtonDown			5
#define	fl_LED_activ			6
// value ---------------------------------------------
#define  Diff_0					1
#define  Diff_1					2
#define  Diff_2					3
#define  Diff_3					4
#define  Diff_4					5
#define  Diff_5					6
#define  Diff_6					7
#define  Diff_7					8
#define  Diff_8					9
#define  Diff_9					10
// .....................................................
// High value in Modus
#define	fl_Invers				4				// Input invers
#define	fl_DiffInvers			5				// Diff invers
// ----------------------------------------------------
//################################################################################
// Definitions Times
#define 	cfreq        		8000000			// 8MHz processor 
#define 	cTimer1_button		3035			// 500 ms
#define 	cTimer1_LED			34285			// 250 ms
#define 	cMinCapture			900
#define 	cMaxCapture			2100
// ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
#define		maxProgs			13
//#################################################################################

#endif

