//intledad.c #include<90s8535.h> #include #define clock 4000000 #define baud 19200 unsigned int timecount=0; unsigned int rohw; unsigned int i; interrupt [TIM0_OVF] void timer0_ovf_isr(void) { TCNT0=6; if (++timecount==1000) { PORTD=PORTD^0x60; timecount=0; } } interrupt [EXT_INT0] void ext_int0_ist(void) { PORTD=0x80; } interrupt[ADC_INT] void adc_isr(void) { rohw=ADCW; } void main(void) { DDRD=0xf0; UCR=0x18; UBRR=0x0C; printf("--Hallo--\r\n\n\n\n\n\n\n"); for (i=0;i<10000;i++) { } TCCR0=0x02; TCNT0=0x00; TIMSK=0x01; GIMSK=0x40; MCUCR=0x02; ADMUX=0x0; ADCSR=0xE9; #asm("sei") while (1) { printf("Kan:%x Wert:%d \r\n", ADMUX,rohw); if(ADMUX<0x7) { ADMUX=ADMUX+0x1; }else { ADMUX=0x0; printf("\n"); } } }