ts-7000
[Top] [All Lists]

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

To:
Subject: [ts-7000] Re: TS-ADC24 max sample rate?
From: "bburtan65" <>
Date: Mon, 07 Sep 2009 22:01:31 -0000
That lib file is for shell scripts.  I never found a real driver for this board 
(or most peripherals from TS).

I just wonder if there's some PC/104 or FPGA limitation that prevents you from 
sucking the data across faster.

You get about 100,000 samples per second but that's really four channels at a 
time so that's 400,000 12-bit samples.  That works out to less than 586k of 
data per second.  So 1Msps is 5.859 meg per second you'd have to be able to 
transfer and process.  I suppose that's a lot.


--- In  mike ingle <> wrote:
>
> You are seeing the result of linux being a multi-tasking OS.  Your
> application runs for xxx cycles the gets switched from to some other task.
> You need to use a device driver and interrupts to get the data off the adc
> card before the buffer overflows.
> 
> ftp://ftp.embeddedarm.com/pc104-peripherals/ts-adc24/   has .lib files I am
> not sure where the expected .o files and the api description is.  You should
> contact technologics.
> 
> 
> On Mon, Sep 7, 2009 at 9:44 AM, bburtan65 <> wrote:
> 
> >
> >
> > 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