Introduction
The tcDspTlv254x class is used to set up and receive data from a TI TLV254X family A-to-D converter. The converter is accessed via a McBSP interface.
The converter uses the TMS320 FS control to initiate read sequences.
- Note:
- The channel numbers for the TLV-2548 chip run from 0-7. For the TLV-2544 chip, channel numbers increment by 2 (0, 2, 4, and 6). It is up to the user of this class to ensure that the proper channel numbers are passed in for the specific device being accessed.
- See also:
- MityDSP::tcDspTlv254x Class Reference
Example
This is a simple example of tcDspTlv254x creation and usage:
{
class tcFPGA : public tcDspOutputLatch
{
...
public:
typedef enum
{
...
eeADC_CS,
...
} teOutputs;
int SetOuput(unsigned int ID, unsigned int Value);
...
}
int main (int argc, char *argv[])
{
tcFPGA FPGA;
tcDspMcbsp MCBSP(0x018C0000,
tuCfrReg config;
config.mnWord = 0;
config.msBits.REF_VOLTb =
REF_2V;
tcDspTlv254x ADC(&MCBSP,config,&FPGA,tcFPGA::eeADC_CS);
ADC.request_data(0);
TSK_sleep(1);
unsigned short adc_value = ADC.read_data();
}
}