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.

Channel selection of the ADS7865

Other Parts Discussed in Thread: ADS7865

hi!

I'm trying to develop an algorithm for the ads7865 using vhdl, i used a state machine for the implementation of the algorithm and it's divided like this:

Wait state:  CS high, input signals ignored and 3-state outputs
CONVST high conversion doesn't start
RD high, synchronization doesn't start

Adq_data: CS down to 0,adc enabled, normal operation

WR low, parellel interface doesn't read data

data present on input are storage on the fpga

3 clock pulses are required for this state

Conv_data: CONVST low

fpga reads high busy and start counting 13 clock cycles

next state is wait state

Write_ref: WR high for write in conf register

GPIO_1(21) <= '0'; -- R1
GPIO_1(20) <= '1'; -- R0
GPIO_1(14) <= '0'; -- A2
GPIO_1(13) <= '0'; -- A1
GPIO_1(12) <= '1'; -- A0

GPIO_3(11) <= '1'; -- second pulse of write for enter data
GPIO_1(23) <= '0'; -- DB11
GPIO_1(22) <= '0'; -- DB10
GPIO_1(21 downto 12) <= "1111111111";
state <= WAIT_STATE;

Channel_select:


when "00" => -- Channel 0
GPIO_1(23) <= '0'; --c1 of the ADC register
GPIO_1(22) <= '0'; --c0 of the ADC register

when "11" => -- Channel 1
GPIO_1(23) <= '1';
GPIO_1(22) <= '1';

But i'm not sure if the only thing i need to do for channel selection is write c1 and c0 on the configuration register, and i don't how if i need another state for read data.

  • Hi Alejandro,

    When selecting the channels without sequencer, C1 and C0 bit in the Configuration register should be programmed, but R1/R0 and A2/A1/A0 bits should be set together, C1 and C0 decide selected channels, R1 and R0 should be set to 01 to enable Register update, A2,A1 and A0 should be set to "Configuration register update only". Please refer to the Digital section in page 17 and Figure 32 in the datasheet.

    If selecting the channels with the sequencer, you will have to program the Sequencer register as well with two writing accesses, the first access will enable to program the Sequencer, the second access will write the Sequencer register with the data on the data bus. Please refer to Figure 33 and 34 in the datasheet.

    Thanks.

    Best regards

    Dale Li