Re: ADC in Free Running Mode Kategorie: Programmierung C (von PepeV - 2.02.2013 13:28) | ||
Als Antwort auf Re: ADC in Free Running Mode von PepeV - 31.01.2013 21:16 | ||
| ||
> 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 | ||
Antwort schreiben Antworten: Re: ADC in Free Running Mode (von PepeV - 2.02.2013 15:31) Re: ADC in Free Running Mode (von Torsten - 4.02.2013 19:38) Re: ADC in Free Running Mode (von PepeV - 5.02.2013 13:27) Re: ADC in Free Running Mode (von Torsten - 6.02.2013 21:43) Re: ADC in Free Running Mode (von PepeV - 8.02.2013 17:43) Re: ADC in Free Running Mode (von Torsten - 9.02.2013 10:18) Re: ADC in Free Running Mode (von PepeV - 9.02.2013 14:57) Re: ADC in Free Running Mode (von PepeV - 11.02.2013 18:29) Re: ADC in Free Running Mode (von Torsten - 11.02.2013 21:07) Re: ADC in Free Running Mode (von PepeV - 12.02.2013 19:54) |
Zur Übersicht - INFO - Neueste 50 Beiträge - Neuer Beitrag - Suchen - Zum C-Control-I-Forum - Zum C-Control-II-Forum