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.

ADS7038-Q1: Behavior of ADS7038 in Mixed-Channel Configuration (GPI/GPO and Analog I/P) in Manual Mode

Part Number: ADS7038-Q1
Other Parts Discussed in Thread: ADS7038

Hi,

   In the datasheet of ADS7038-Q1, the behavior of GPI/GPO in Manual mode is not mentioned clearly. Can you please support on what will be the output behavior in the following scenario ?

CH_ID Pin configuration Tx in Manual Mode Output Behaviour? (Rx frame)
0 AN0 Send request to read the CH_ID 0's ADC value in Manual mode in address 0x11 -> MANUAL_CH_SEL
Switch to AIN0
1 AN1 Send request to read the CH_ID 1's ADC value in Manual mode in address 0x11 -> MANUAL_CH_SEL
Switch to AIN1
2 Digital I/P Read value from GPI_VALUE register Which data is received in the Rx frame ?
AN0's value or Digital I/P value of Channel 2 ?
3 AN3 Send request to read the CH_ID 1's ADC value in Manual mode in address 0x11 -> MANUAL_CH_SEL
Switch to AIN1
Will we get value of AN1 in this N+2 iteration ?
4 Digital O/P Write Digital HIGH to Channel 4 Will the Channel become high in this iteration itself ?
5 Digital I/P Read value from GPI_VALUE register

Will we get the I/P value of GPI Channel 5 in this iteration itself ?

What happens to the AN3 Value which we are supposed to receive in this N+2 ?

6 AN6 Send request to read the CH_ID 6's ADC value in Manual mode in address 0x11 -> MANUAL_CH_SEL
Switch to AIN1
7 AN7 Send request to read the CH_ID 7's ADC value in Manual mode in address 0x11 -> MANUAL_CH_SEL
Switch to AIN1

Referred the following diagram in User Manual

  • Hi Supritha,

    Give me a day or two to go over your query.  I'll get back to you by COB Wednesday (Dallas time).

  • Hello Tom,

        Can you please provide your inputs on the below query as well ?

    For accessing GPI value, in the datasheet it is mentioned that we need to send 0xD GPI_VALUE which will return the Input Level.

    What is the sequence that needs to be followed in Manual mode to access the GPI Value ?

    Is my below understanding correct ?

    For GPI

    Step 1: Configure the PINs as GPI

    Step 2: Select the CH ID using command 0x11 MANUAL_CH_SEL 

    Step 3: Read the GPI Value from 0xD GPI_VALUE

    For GPO

    Step 1: Configure the PINs as GP0

    Step 2: Select the CH ID using command 0x11 MANUAL_CH_SEL 

    Step 3: Write the GPO Value from 0xB GPO_VALUE

    Please provide clarity on which cycle the GPIO related changes will reflect.

    Also request your input on the previously asked scenario.

    Thank you

  • Hi Supritha,

    Your understand looks right to me.  One thing I'd like to point out though is that the ADS7038 has an Alert function which is mapped by default to AIN0/GPIO0 in the ALERT_PIN_CFG register.  If you set the ALERT_PIN bits to be anything from 1 through 7 (hex) you should get the push-pull functionality on GPIO0.  You will loose the push-pull functionality on whatever pin was re-assigned to cover the Alert function.

  • Hello Tom,

        I have configured all 8 Channels as "GPI" and while trying to read the Pins' states from register read "GPI_VALUE" with the following configuration:

    1. Manual Mode

    2. Status Flag appended

    3. CRC enabled

    I am able to see the following result. Please help in decoding the received data.

    The first 8 bit's I am able to see a change in the state of "CH0" alone while trying to test that CH0's state by giving HIGH and LOW to the CH0.

    The value is not changing for "CH1" and "CH2" even though I change the levels during testing.

    Please help to decode the "CRC" and "Status Bits" in the received frame.

    Thanks and Regards

  • Hi Supritha,

    There is a CRC calculator tool for the ADS7038 located here: https://www.ti.com/tool/download/SBAR008  From Figure 8-13, the first 8 bits show the GPIO state and the second 8 bits shows the CRC value.  For 0x01, the CRC would be 0x07.