ts-7000
[Top] [All Lists]

[ts-7000] TS-ADC24 max sample rate?

To:
Subject: [ts-7000] TS-ADC24 max sample rate?
From: "bburtan65" <>
Date: Mon, 07 Sep 2009 16:44:19 -0000
Okay, so Technologic states several times in the literature for the ADC24 board 
that it has a 1Msps sample rate.  However, in my experience so far just 
sampling the minimum four channels, the absolute best I seem to be able to do 
is 100ksps before the buffer overflows and the ADC stops.

Here is a code snippet:

adc = (ADC_Data_Type *)mmap(0, getpagesize(), PROT_READ|PROT_WRITE, MAP_SHARED, 
fd, IO_BASE);
adc += (ADC_OFFSET)/sizeof(ADC_Data_Type);
adc_channel_address = adc + 0x4;        // For slightly faster access to the 
channel register
adc_data_address = adc + 0x5;           // For slightly faster access to the 
sample data

ADC(2) = 0;             // Reset the ADC
configuration = configuration | diff_mode;
if (diff_mode == kDiff_Mode_Single_Ended)
        configuration = configuration | kDiff_Mode_Single_Ended_8bit;
configuration = configuration | input_range;
configuration = configuration | ((num_channel_blocks-1) << 1);
num_channels = num_channel_blocks * 4;
ADC(2) = configuration | 1;



The main loop is here:

do {
        current_channel = ((*(adc_channel_address)) >> 1) & 0x1f;
        sample_data = (*(adc_data_address));
} while (current_channel != 0);
                
adcValue = (sample_data & 0x07ff) + (!(sample_data & 0x800)*0x800);


If I do nothing else but the above do/while and adcValue lines, 100ksps is 
about the maximum.  If I'm running other threads that slows way down.  So why 
can I never get 1Msps?




------------------------------------

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>
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