Other Parts Discussed in Thread: TMS320F2808,
Tool/software:
Hi,
I am using two ADC128S102 A/D converters for sampling 10 analog channels. The two ADC128S102 chips are connected to a TMS320F2808 DSP through the SPI D port.
The DSP uses two GPIOs for driving each of the ADC128S102 chip's CS pins - one GPIO per ADC CS line.
However, the SPI clock, MISO and MOSI lines of each ADC128S102 chip are combined into the SPI-D lines of the DSP - i.e. the SPI clock of both ADC's are connected together to the DSP's SPI-D clock line, and the same for the MOSI and MISO lines.
I have configured my SPI lines as follows:
1. The CS line of each ADC128S102 is connected to a pin of the DSP configured as a general purpose output with internal pull up enabled.
2. The SPI-D clock is set at 10 Mhz.
3. The GPIO PUD register for the SPI-D MISO and MOSI lines are configured with internal pull up enabled.
4. The SPI-D baud rate register is configured in 16-bit word mode so that the entire 12 bit ADC value response can be clocked in from the ADC chip and read from the SPI-D RX register.
When I read the analog channel ADC values from a ADC128S102, I enable the chip select line of a single ADC128S102 chip by pulling it low and then make the SPI reads - i.e. when I read one ADC128S102 chip, the CS line of the other ADC128S102 chip is disabled (set to digital state high).
The ADC reference voltage on VA is 3.3V. VD is also 3.3V.
The GND for both the ADC chip, the DSP and the analog input is the same.
Here are my observations:
When I read just the analog channel, say IN0, from one of the ADC128S102 chip, I get only half of the actual ADC value of the analog signal. So, for example, if the IN0 analog signal is 2.361V, I get an ADC value of 1464, when I should get a value of 2928. I have confirmed my DSP code is correct, and this is the value I get when I read the RX register. Why is this? Am I missing something?