The tcDspAdc9235 class may be used to provide access to the MityDSP ADC9235 interface core. The ADC9235 interface core marries the MityDSP to a Analog Devices 9235 series high speed 12 bit analog to digital converter.
This class allows for configuring the ADC to provide continuous or burst data collection data.
This is a simple example of tcDspAdc9235 creation and usage:
{ tcDspAdc9235* mpADC; int numwords; volatile unsigned int* lpData; unsigned int tmp, index; // new up the ADC9235 core. mpADC = new tcDspAdc9235((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); } ... }