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 > > > Hi Torsten, > > > > > > Im am afraid the other running modes you programmed do not work so well > > > as the free running mode. > > > - ADCaptureRun runs 15% slower than ADCaptureRunFree and shows some > > > glitches. > > > - ADCaptureRunQuiet shows strange behaviour. > > > See attached figures. What do you think? > > > > > > What might work is an 'ADCaptureRunFreeQuiet'. > > > > > > Regards, > > > Pepe > > > > Hi Torsten, > > > > The ATmega128 manual (p. 237) says ADC Noise Reduction mode is only possible > > in single conversion mode. So don't bother to try an 'ADCaptureRunFreeQuiet'. > > > > I now understand the reason for the $20 offset in SRAM addresses that is sometimes > > needed. Instructions in and out work on I/O registers and start counting from $00 (PINF). > > lnstructions ld and st reach all SRAM menory, including the working registers R0...R31. > > For these instructions R0 has address $00 and therefore the first I/O register has > > address $20. In CC-pro DirAcc_Read and DirAcc_Write also start counting from R0 so > > here I/O addresses also need an offset of $20. > > > > The CC-pro manual states 'An Assembler call cannot be interrupted by Multithreading > > or an Bytecode Interruptroutine'. This agrees with my observation that it does not > > matter wether ADCaptureRunFree begins with cli or sei. > > This also means that ADCaptureRun has no purpose since it cannot be interrupted. > > > > But I have a new challenge. My FFT routine needs its data in an array of float rather > > than in an array of word. Would it be possible to adapt ADCaptureRunFree to store > > its values in an array of float? I have searched internet for suitable chunks of byte code > > but I could not find any. Do you know a good source? > > > > Regards, > > Pepe > > Having browsed through the 'Beginners Introduction to theAssembly Language of > ATMEL-AVR-Microprocessors' I now think that it might be better and faster to > rewrite the FFT routine to work with integers than having ADCaptureRunFree > to produce floats. What do you think? Here's the FFT routine I use. > > Pepe