MityDSP Documentation Index

tcDspAdc8402

Introduction

The tcDspAdc8402 class may be used to provide access to the MityDSP ADS8402 interface core. The ADS8402 interface core marries the MityDSP to a Burr Brown ADS8402 series high speed 16 bit analog to digital converter.

This class allows for configuring the ADC to provide continuous or burst data colletion data.

See also:
MityDSP::tcDspAdc8402 Class Reference
MityDSP::tcDspAdcBase High Speed ADC Base Class Reference

Example

This is a simple example of tcDspAdc8402 creation and usage:

 {
     tcDspAdc8402* mpADC;
     int numwords;
     volatile unsigned int* lpData;
     unsigned int tmp, index;

     // new up the ADS8402 core.
     mpADC = new tcDspAdc8402((void*)BASE_ADDR);

     // burst capture of 512 samples
     mpADC->Enable(false);
     mpADC->DrainFIFO();
     mpADC->SetBurstCapture(true);
     mpADC->SetCaptureLength(512);
     mpADC->ClearBurstComplete();
     mpADC->Enable(true);
     mpADC->SetPack(false);

     while(false == mpADC->IsBurstComplete());
     mpADC->Enable(false);    
     numwords = mpADC->GetFIFOLevel();
     lpData = mpADC->GetFIFODataPtr();
     index = 0;
     while(false == mpADC->GetFIFOLevel(eeEmpty))
     {
        tmp = *lpData;
        printf("%d - %8.8X\r\n",index,tmp);
     }
     
     ... 

 } 

  
Generated on Fri Sep 23 16:33:44 2011 for MityDSP Core by  Doxygen Version 1.6.1
Copyright © 2009, Critical Link LLC, All rights reserved.