While developing my application, I performed a register test to an fpga on the ts7300 which managed around 4Mbytes per second.
Regards, Mike
On Mon, Sep 7, 2009 at 3:01 PM, bburtan65 <> wrote:
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 ts-7000%40yahoogroups.com, 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? > > > > > > >
__._,_.___
__,_._,___
|