AnsweredAssumed Answered

Issues while configuring and reading data from ad7792

Question asked by DNechita on Aug 14, 2015
Latest reply on Aug 14, 2015 by DNechita

Someone by email asked:

 

-----

We tried programming the part but seem to have issues with some registers such as Config and IO registers, which appear not to be programmable, in addition to reading the ADC register (single read) and getting the correct result.

We looked at the code (main.c) for the Renesas board connecting to the AD7792 dev board, and noticed some data level shifting involving the reading of the ADC.

Since we’re having trouble with programming this part to get correct values, we would like to ask why the need to add 0x8000 and subtract it from the ADC readings as shown below:

 

if(value > 0x8000)

            {

                value -= 0x8000;

                value = ((value * 1170) >> 15);

                ST7579_String(6,10,"+");

            }

            else

            {

                value = 0x8000 - value;

                value = ((value * 1170) >> 15);

                ST7579_String(6,10,"-");

            }

If possible, we’d like to ask a few questions about some issues we’re seeing with trying to write the CONFIGURATION and IO registers, which don’t seem to work. We can’t set the excitation current sources as we would like.

Any help would be greatly appreciated, as we’re struggling to get this part working reliably.

 

-----

Outcomes