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.

ADS8331: How to read 4-channel data sequentially

Part Number: ADS8331

Hi Team,

This is a inquiry from my customer.

The processing that the customer wants to do is to read data for four CHs sequentially at regular intervals (ex. 1 ms).

 

Q1: The customer believes that a combination of auto-channel select mode and manual-trigger mode is suitable to do that.

Is that recognition correct?

 

Q2: The customer is examining the following pseudo code as a sequence to read data for 4 CHs sequentially.

Is it possible with such a sequence?

 

************* Pseudo code currently being verified ***************************************************************************************

1. Initialization processing

Set CFR. Command = 0b 1110 1110 1111 1111 // auto-channel select mode, manual-trigger mode, Use / INT Pin, tag bits = ON

 

2. Normal processing (loop)

A timer interrupt (ex. 1 ms) occurs on the Master side.

 

3. Timer interrupt

/ CONVST Low

wait 1 μs

/ CONVST High

 

4. External interrupt

An external interrupt due to / INT occurs.

 

Received Data [0] = 0b1101 0000 0000 0000 // Read data

TagData [0] = 0b1000 0000 0000 0000 // Dummy data

 

Received Data [1] = 0b1101 0000 0000 0000 // Read data

TagData [1] = 0b1000 0000 0000 0000 // Dummy data

 

..... (repeat 4times to receive 4ch data sequencially)

 

*************************************************************************************************************************************

 

Q3: If you have any recommendation to achieve their requirement, please advise.

 

Best regards,

H. Someno

  • To H. Someno,

     

    1. I believe that you have correctly configured your CFR register according to your goal.

    CMR Register

     

    CRF Register

    D15-12

     

    D11

    D10

    D9

    D8

     

    D7

    D6

    D5

    D4

     

    D3

    D2

    D1

    D0

    Write CFR

     

    Auto channel select

    Conversion clock (CCLK) = internal OSC

    Manual-Trigger: conversions manually start

    on falling edge of CONVST

    500kSPS (21 CCLKs)

     

    EOC/INT active low

    Pin used as EOC

    Pin 10 is used as EOC/INT output

    Auto-NAP Power-Down mode disabled

     

    Nap Power-Down disabled

    (resume normal operation)

    Deep Power-Down disabled

    (resume normal operation

    TAG bit output enabled. TAG bits appear

    after conversion data

    Normal operation

    1110

     

    1

    1

    1

    0

     

    1

    1

    1

    1

     

    1

    1

    1

    1

     

    2.  I am a little unsure about your interrupts. Based on your pseudo code, it looks like you have two different interrupt routines. One that is a timer interrupt and one that is an external interrupt.

      1. For the timer interrupt, you toggle CONVST low and then high again. This will initiate one conversion on the channel currently selected.
      2. For the external interrupt, you cycle through and read each channel. Since you selected “Manual Trigger Mode (D9)”, you will need to toggle CONVST low then high again for each conversion. Remember that this is a multiplexed device and for each multiplexer channel reading, you will need to initiate a conversion.
      3. If you do not want to toggle CONVST for each conversion you may want to consider Automatic Trigger mode.

    Best regards,

    Art