This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: TI C/C++ Compiler
Dear Sir,
I am using ADS7871 spi ADC interface with dspic33fj128mc706a controller. we can able to set register 7 . but we con't read the device id. Can you send the sample code for how to read the device id and followed by conversion data..
Hello,
In SPI protocol, there is no deice ID, or device address. There is no sample code available.
The CS pin enables or disable the digital communications pins, thus CS needs to be low for any data transfer. with CS is high, the digital pins are in tristate, this is when other devices can use the SDO/SDI signal lines.
I suggest using an oscilloscope, with the probes connected to the digital pins of the ADC to debug and build the software (CS, SDO, SDI,SCLK) . This will provide a visual of what the code is doing vs what it is expected to. Also, using a known DC input will help to see if the output data is correct. Using different DC voltages at the input will also help to distinguish what channel the data corresponds to. ex CH0 = GND, Ch1 = 1V, Ch2 = 2V, and so on. (but within the ADC input range)
I suggest trying to read ch0, without any other added features, such as PGA, based on Figure 17 of the datasheet. After that is successful, then start incorporating in the different selections, such as mux-ing different channels and different input configurations (single/diff). once you start reading the register values, try only changing one register value and then reading it back, and then build on that.
Regards
Cynthia