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.

ADS7028: ADS7028 ZCD and RMS setting

Part Number: ADS7028

Hi,

I attempt to control ADS7028 via TMS320C2000 Experiment Kit(Piccolo F28069).

After the last discussion

(https://e2e.ti.com/support/data-converters-group/data-converters/f/data-converters-forum/1060295/ads7028-control-ads7028-via-tms320c2000-experiment-kit-piccolo-f28069/3930260#3930260)

, Now I can read the ADC value correctly (I use a logic analyzer and a potentiometer to verify the function).

 

Now I want to enable the RMS and ZCD functions, input a sine wave (from waveform generator) into ch0, get its RMS value and output the ZCD waveform from ch7 at the same time, but neither function is working properly.

 

Ⅰ. In the RMS part

It seems that there are values stored in the registers, but when I adjust the amplitude of the sine wave and start the RMS process again, the value always remains the same until I turn off the power and restart.

The process is shown in the figures below:

1.Write RMS_CFG 1 time

2.Start RMS computation

3.Poll the RMS_DONE bit in the SYSTEM_STATUS register

4.Read MSB

 

5.Read LSB

6.Repeat Step(2~5)

Ⅱ.In the ZCD part, my settings are as follows, but there is no output from ch7

 

Please let me know if I missed any step or set registers incorrectly,thanks!

  • Hi PoWei,

    The apps engineers support this device are on vacation because of holiday in the US, please check it back next week, thanks.

    Regards,

    Dale

  • Hello,

    Let me correct my previous description.

    I found out that ZCD actually has output under my settings

    But it can only be seen when the amplitude of the sine wave is higher than the AVDD (=DVDD=5V) .

     

    (Frequency 60Hz Amp 5V)

    (Frequency 60Hz Amp 5.5V)

    In addition, when I change the frequency of the sine wave to 20KHz, the output of the ZCD looks like a triangle wave (Is there a frequency limit for this function?).

    So it is still not working properly, but at least there is output.

  • Hi PoWei,

    I noticed that Cynthia had a communication with you about the same ADC in the following post. She will respond you when she is back in the office next week. Thanks for your patience.

    ADS7028: Control ADS7028 via TMS320C2000 Experiment Kit(Piccolo F28069)

    Best regards,

    Dale

  • Hi Dale,

    Thanks for your reply.

    I will check it back next week

  • Hi PoWei,

    The steps for the RMS look fine, and the steps for ZCD look fine. I am assuming that the value of RMS is correct. 

    and you are having trouble with ZCD. The issue here, it seems that you are using the same input channel for both of this functions. 

    I suggest using two different channels, ie Ch0 for RMS and Ch1 for ZCD. then feed the same input signal to both channels. What mode of operation are you using the device, meaning: manual mode, auto-sequence, on the fly?

    Regards, Cynthia

  • Hi Cynthia,

     

    RMS part,

    I set RMS_EN to 1 and get RMS_DONE after 100uS.

    Is this speed of computation normal?

    Do I need to set RMS_EN or RMS_DONE to 0 before restarting the computation?

    It is very strange that the RMS value does not even change after each computation.

     

    ZCD part,

    I follow your suggestion and use another channel CH1

    (Only modify CHANNEL_SEL Register to 0x10)

    As a result, CH7 has no output at all.

     

    I did not modify SEQ_MODE and CONV_MODE. The device should run in manual mode.

  • The RMS time can vary, depending on oscillation speed used and number of samples being used to make the calculation, thus yes, this is fine. Also, yes, both registers need to be cleared. 

    For ZCD you will also need to set the high threshold for Channel 1 for ZCD threshold. I suggest reviewing all steps for confirmation. 

    For background data, RMS and ZCD can be used for the same channel, as you were doing before, but the ZCD detection would use the RMS value, not the raw input value. 

    Regards

    Cynthia

  • Hi Cynthia,

     

    Thanks for your reply.

     

    After some tests and refer to your reply.

    I found that to restart RMS, the steps must be set as follows:

     

    1.clear RMS_DONE bit by writing "1" & clear RMS_EN by writing " 0"

    2."set RMS_EN by write 1"

     

    Now the RMS function seems to be working properly.

    I will continue to test the ZCD settings and will reply again if there is any progress

  • Hi Cynthia,

    In order to get the correct ZCD waveform now I test the RMS and ZCD channels separately

    Input the same waveform to CH0(RMS) & CH1(Output ZCD to CH7)

     

    After rechecking the ZCD settings many times, I added a few settings for the ZCD, but the situation is still the same as before, the input must exceed AVDD for the output to respond

    All my steps are as follows:

    1. Write GPIO_CFG [0x05]                                                             [0x80] (CH7 as gpio)
    2. Write GPIO_CFG [0x07]                                                             [0x80] (CH7 as digital output)
    3. Write GPO_DRIVE_CFG [0x09]                                                 [0x80] (CH7 Push-pull)
    4. Write ZCD_BLANKING_CFG [0x0F]                                          [0x00] (No need transient rejection time for now)
    5. Write CHANNEL_SEL [0x11]                                                      [0x10] (CH1 treat as ZCD input)
    6. Write HYSTERESIS_CH1 [0x24]                                                [0xF0] (HIGH_THRESHOLD_CH1_LSB)
    7. Write HIGH_TH_CH1 [0x25]                                                       [0x7F] (VDD/2 is set as the threshold)
    8. Write GPO_VALUE_ZCD_CFG_CH4_CH7 [0xE4]                     [0x80] (CH7 synchronous to ZCD)
    9. Write GPO_ZCD_UPDATE_EN [0xE7]                                       [0x80] (Update digital outputs GPO[7:0] synchronous to ZCD)
    10. Write GPO_TRIGGER_CFG [0xE9]                                            [0x80] (Digital output is updated when corresponding alert flags are set)
    11. Write GPO7_TRIG_EVENT_SEL [0xD1]                                     [0x82] (Alert flags for the AIN/GPIO corresponding to this bit trigger GPO7 output.)
    12. Write OPMODE_CFG [0x04]                                                       [0x20](Autonomous mode)
    13. Write AUTO_SEQ_CH_SEL [0x12]                                             [0x03](Analog input channel 0, 1 is enabled in scanning sequence)

    Am I missing any setting or which register is misunderstood?

  • I have set up the EVM and extracted the Register content to achieve desired goal, I highlighted relevant registers, but I suggest going through all of them

    The device is set up for auto sequence of ch0 and ch1. for ZCD, channel 1 is used and set to near mid scale, and the digital output to Ch7 will follow the opposite of the ZCD. 

    Below is a quick excerpt of the blanking from the EVM GUI to help understand the use of it, though I did not use it, NANOMUX_register Settings.csv

  • Hi Cynthia,
    Thank you so much.
    I will use GUI software to learn more detailed settings.