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.

ADS7128: Clarification of information about the RMS calculation procedure.

Part Number: ADS7128

In the datasheet on ADS7128, paragraph 8.3.12 it is written:

...

The procedure for using the RMS module is outlined in the steps below:
1. Select the channel for the RMS computation using the RMS_CHID field in the RMS_CFG register.
2. Define the time over which the RMS is to be computed by configuring the RMS_SAMPLES field.
3. Start the RMS computation by setting RMS_EN to 1 in the GENERAL_CFG register.
4. The device starts computing the RMS result when the sample size defined by RMS_SAMPLES is converted
on the analog input selected for RMS computation. An additional 40 samples must be converted to complete
the RMS computation.
5. To monitor for when the RMS computation completes, poll the RMS_DONE bit in the SYSTEM_STATUS
register. The ALERT pin can also be used for requesting an interrupt by configuring the ALERT_RMS bit in
the ALERT_MAP register.

...
Please explain how to organize 40 additional samples to complete the RMS computation.

Indeed, without this addition, the flag RMS_DONE is not set and the operation is not completed...

Thank`s Sergiy Shaganian

  • Hello Sergiy,

    The 40 samples are needed in addition to the RMS_SAMPLES configured.

    Depending on what mode the device is operating will dictate how the additional samples are converted

    If you are using Manual mode, Auto-sequence mode, then the host has to initiate the RMS_SAMPLEs + 40 conversions.
    If you are using  Autonomous mode, the device will initiate the conversion for additional samples.

    Regards

    Cynthia

  • Thanks for the answer.

    I'll ask you differently:
    1. The RMS_SAMPLES field has only two bits and defines:

    "Number of samples for computing RMS result. Additional 40 samples are required for completing RMS computation.
    0b = 1024
    1b = 4096
    10b = 16384
    11b = 65536"

    how can I add 40 more samples?

    Thanks

  • Sergiy,

    You do not need to add any more samples. 

    You only need to take 40 more samples than the selected number from the list you shared. 

    Example, in manual mode, you have selected 1b=4096

    You then being the conversion of 4096 conversions + 40 conversions, for a total of 4136 conversions. 

    The device expects 4136 manual conversions, to complete the RMS calculations.

    If using the device in autonomous mode, then the device will automatically take the extra 40 conversions

    Regards

    Cynthia