Kommentar: Einfügen von HTML im Kommentar: Link einfügen: <a href="LINKURL" target="_blank">LINKTITEL</a> Bild einfügen: <img src="BILDURL"> Text formatieren: <b>fetter Text</b> <i>kursiver Text</i> <u>unterstrichener Text</u> Kombinationen sind auch möglich z.B.: <b><i>fetter & kursiver Text</i></b> C Quellcode formatieren: <code>Quellcode</code> BASIC Quellcode formatieren: <basic>Quellcode</basic> (Innerhalb eines Quellcodeabschnitts ist kein html möglich.) Wichtig: Bitte mache Zeilenumbrüche, bevor Du am rechten Rand des Eingabefeldes ankommst ! -> I > > What is Wrong ? > > > > Thanks Bram. > > > > > > SPI_Disable(); > > > > Serial_Init(PORT,SR_8BIT|SR_1STOP|SR_NO_PAR,SR_BD19200); > > > > // Read ADC and transfer the data to the Serial Port > > > > while (1) > > { > > ADC_SetInt(40,1); > > ADC_StartInt(); > > Serial_WriteText(0,"ADC1:rn"); > > Serial_Write(0,ADC_ReadInt()); > > Serial_Write(0,(13)); > > AbsDelay(1000); > > } > > > > } > > Dear Bram, > > I didn't checked it on my MEGA, but the first failure which I see is that > you must write the 40 as a HEX-value: 0x40! Only "40" is a decimal-value. > > <b>ADC_SetInt(0x40,1);</b> > > And additional: I never tested the ADC in Interrupt-mode, but I think you must > also activate the ADC-IRQ (INT_ADC) and use it before you can read the value. Please check this link: > <a href="http://www.c-control-pro.de/documentation/index.html?interrupt.htm" target="_blank">Interrupt in the manual</a> > > Best regards, > Tobias