Hallo,

danke für die Tipps gebracht hats bis jetzt leider nichts. Das mit den Return Anweisungen wusste ich nich, das man die bei void funktionen nicht braucht, jetzt weis ichs. Das main keine Endlosschleife ist war auch mein Fehler (liegt warscheinlich an den alten Bascom gewohnheiten) jetzt hab ich mir ne Endlosschleife mit do-while gebastelt, hoffentlich funktioniert das.

Leider springt das Programm immer noch in die Interruptfunktion vom Timer1 trotz eindeutig abgeschalteter Interrupts, hier nochmal der jetzige Code:

Code:
#include <avr/io.h>
#include <stdlib.h>
#include <avr/pgmspace.h>
#include <avr/interrupt.h>

	#ifndef F_CPU
	#define F_CPU 8000000UL /* Interner Oszillator mit 8Mhz */
	#endif


/* Variablen definieren */

    uint8_t Statusbyte = 0; /* Statusbyte für verschiedene Operationen */
	volatile uint16_t Waittime = 0; /* Countvariable für Waitfunktion */
	volatile uint16_t Waitcount = 0; /* Countvariable für Waitfunktion */	

/* Variablen für Geschwindigkeitsmessung */

	volatile uint8_t overflowcount = 0; /* Zähler für Timer Overflows */
	uint16_t timer1counts = 0; /*Zählerstand von Timer1 */
	float zeit = 0.0; /* Gemessene Timer1 Zeit */
	float ov_summ_zeit = 0.0; 
	float v_float =  0.0; /* Geschwindigkeit mit Kommastelle*/
	uint16_t V = 0; /* Geschwindigkeit ohne Kommastelle */

/* Variablen für Displayanzeige */
	
	char Display[5];


/* Konstanten */

	const float H0_10cm = 31.32;
	const float N_10cm = 115.2;
	const float overflowzeit = 2.097152;
	const uint16_t cps = 31250;
	const uint8_t disp_char0 = 0x00;
	const uint8_t disp_char1 = 0x10;
	const uint8_t disp_char2 = 0x20;
	const uint8_t disp_char3 = 0x30;

/* Konstanten für Displaychars */ 
const uint8_t wertetabelle[] PROGMEM = {0x00 , 0x08 , 0x04 , 0x0C , 0x02 , 0x0A , 0x06 , 0x0E , 0x01 , 0x09 , 0x05 , 0x0D , 0x03 , 0x0B , 0x07 , 0x0F };



/* ++++++++++++++++++++++++++++++++++++INTERRUPTS++++++++++++++++++++++++++++++*/

	ISR(TIM0_OVF_vect)
	{ Waitcount ++;
	}

	ISR(TIM1_OVF_vect)
	{ overflowcount ++;
	}


/* Prototypen */
	
	void init_io();
	void timer_init();
	void wait(uint16_t zeit, uint8_t faktor);
	uint16_t messung();
	void Anzeige(uint8_t zeichen, uint8_t place); 

/* ++++++++++++++++++++++++++++++++++++FUNKTIONEN++++++++++++++++++++++++++++++*/
/* IOs initialisieren */ 
void init_io()
{ 
	DDRA |= 0xff;
	PORTA |= 0xC0;

	DDRB |= 0x0C;
	PORTB |= 0x07;

	#define disp_blank PA7
 	#define disp_write PA6
 	#define disp_clear PB2
 
 }

/* Timer initialisieren und Interrupts einrichten*/

void timer_init() /* Timer1 wird initialisiert aber nicht gestartet */
	{
	/* Timer0 */
	TCCR0A = 0;
	TCCR0B = 0;
	TIMSK0 |= (1<<TOIE0);


	TCNT1 = 0;	
	TCCR1A = 0;
	TCCR1B = 0;
	TIMSK1 |= (1<<TOIE1);

	}

/*+++++++++++++++++++++++++++++++++++++WARTEFUNKTION+++++++++++++++++++++++++++*/
	
	void wait(uint16_t zeit, uint8_t faktor)
	{
	const float CPMS = 5; /*31.25;  Counts pro Milisekunde */
	uint8_t temp;
	temp = SREG;
	Waitcount = 0;
    Waittime = (zeit * faktor)*CPMS;
	TCNT0 = 0;
	sei();
	TCCR0B |= (1 <<CS00);
	while (Waitcount < Waittime)
	{
	};	

	TCCR0B &=~ (1<< CS00);
	cli();
	SREG = temp;

	}

/*+++++++++++++++++++++++++++++++++++++Messfunktion++++++++++++++++++++++++++++*/

	uint16_t messung()
	{
	/* MESSUNG */
	while (PINB0 == 1){}
	TCNT1 = 0;
	TCCR1B |= (1<<CS12);
	sei();

	while (PINB1 == 1) {}
	TCCR1B &=~ (1<<CS12);
	cli();

	timer1counts = TCNT1;

/*+++++++++++++++++RECHNUNG++++++++++++*/

	zeit = timer1counts / cps;
	ov_summ_zeit = overflowzeit * overflowcount;
	zeit = zeit + ov_summ_zeit;
	v_float = H0_10cm/zeit;
	V = v_float;

	/*itoa(V,Display,10);*/   /* Integer Wert in ASCII String umwandeln */
	return(V);
	}

/* ANZEIGE */

	void Anzeige(uint8_t zeichen, uint8_t place) 
	{

	/* ANZEIGE */	
	}

/*+++++++++++++++++++++++++++++++++++++HAUPTPROGRAMM+++++++++++++++++++++++++++*/
int main(void)
{
	init_io();
	timer_init();
	wait(1, 1);
	do
	{
	V = messung();
	Anzeige(15,2);

 }while(1);	
}
Hier mal der ganze Code damit ihr seht was bis jetzt so geschrieben steht.


Danke für eure Hilfe und noch einen schönen Bastel-Samstag


Wolfgang