ts-7000
[Top] [All Lists]

[ts-7000] TS-7400 ADC sampling rate

To:
Subject: [ts-7000] TS-7400 ADC sampling rate
From: "ambro653" <>
Date: Sat, 22 Sep 2007 21:14:58 -0000
Hi,
I need to use the integrated ADC on TS-7400 and I am having some 
problems. I succeeded in capturing the values, but the sampling rate 
is too low. I've used the routines from ep93xx_adc.h and captured by 
calling the following function repetedly:

void ReadADC (double *voltages)
{
        int i, j, avg, cur_ch;
        double val;

        for (i = 0; i < ADC_CHANNELS; i++)
        {
                switch(i)
                {
                        case 0:
                                cur_ch = ADC_CH0;
                        break;
                        case 1:
                                cur_ch = ADC_CH1;
                        break;
                        case 2:
                                cur_ch = ADC_CH2;
                        break;
                        case 3:
                                cur_ch = ADC_CH3;
                        break;
                }

                read_channel(adc_page, cur_ch);
                read_channel(adc_page, cur_ch);

                usleep(10000);
                avg = read_channel(adc_page, cur_ch);

                if(avg < 0x7000)
                        avg = avg + 0x10000;

                avg = avg - 0x9E58;
                val = ((double)avg * 3.3) / 0xC350;

                voltages[i] = val;
        }
}

Basically it works, but the sampling rate is extremly low, about 5 
per second. Changing te 'usleep' call to only wait 1000us gives me 10 
per second, but I couldn't achieve any more.
According to EP9302 docs the ADC is capable of capturing at least at 
around 900 per second, and around 300 if you count in channel 
switching.
How come it's that slow? I need much greater sampling rate.



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

<Prev in Thread] Current Thread [Next in Thread>
  • [ts-7000] TS-7400 ADC sampling rate, ambro653 <=
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU