Hello,
I have designed a board with the AD74412R and the thing is that I am having problems getting it to work to measure voltage (ADC).
The configuration of registers that I get once the board starts reading through the SPI I think is correct.
If I apply a voltage of 5.00V to the four inputs and configure through the SPI for ADC mode (range 0-10v), the status of the registers is as follows:
(column with values "after reset" and column "configured" after configuracion)
Address (DEC) | Address (HEX) | Name | value after reset | value configured | comment |
0 | 0 | NOP | 0x0 | 0x0 | |
1 | 1 | CH_FUNC_SETUPA | 0x0 | 0x3 | voltage input, which measures the voltage across the I/OP_x to I/ON_x screw terminals. |
2 | 2 | CH_FUNC_SETUPB | 0x0 | 0x3 | voltage input, which measures the voltage across the I/OP_x to I/ON_x screw terminals. |
3 | 3 | CH_FUNC_SETUPC | 0x0 | 0x3 | voltage input, which measures the voltage across the I/OP_x to I/ON_x screw terminals. |
4 | 4 | CH_FUNC_SETUPD | 0x0 | 0x3 | voltage input, which measures the voltage across the I/OP_x to I/ON_x screw terminals. |
5 | 5 | ADC_CONFIGA | 0x0 | 0x4 | voltage between the I/OP_x screw terminals and the AGND_SENSE pin. Enable 200Kohm. Disable 50hz reject |
6 | 6 | ADC_CONFIGB | 0x0 | 0x4 | voltage between the I/OP_x screw terminals and the AGND_SENSE pin. Enable 200Kohm. Disable 50hz reject |
7 | 7 | ADC_CONFIGC | 0x0 | 0x4 | voltage between the I/OP_x screw terminals and the AGND_SENSE pin. Enable 200Kohm. Disable 50hz reject |
8 | 8 | ADC_CONFIGD | 0x0 | 0x4 | voltage between the I/OP_x screw terminals and the AGND_SENSE pin. Enable 200Kohm. Disable 50hz reject |
9 | 9 | DIN_CONFIGA | 0xb | 0xb | |
10 | A | DIN_CONFIGB | 0xb | 0xb | |
11 | B | DIN_CONFIGC | 0xb | 0xb | |
12 | C | DIN_CONFIGD | 0xb | 0xb | |
13 | D | GPO_PARALLEL | 0x0 | 0x0 | |
14 | E | GPO_CONFIGA | 0x0 | 0x0 | |
15 | F | GPO_CONFIGB | 0x0 | 0x0 | |
16 | 10 | GPO_CONFIGC | 0x0 | 0x0 | |
17 | 11 | GPO_CONFIGD | 0x0 | 0x0 | |
18 | 12 | OUTPUT_CONFIGA | 0x0 | 0x0 | |
19 | 13 | OUTPUT_CONFIGB | 0x0 | 0x0 | |
20 | 14 | OUTPUT_CONFIGC | 0x0 | 0x0 | |
21 | 15 | OUTPUT_CONFIGD | 0x0 | 0x0 | |
22 | 16 | DAC_CODEA | 0x0 | 0x0 | |
23 | 17 | DAC_CODEB | 0x0 | 0x0 | |
24 | 18 | DAC_CODEC | 0x0 | 0x0 | |
25 | 19 | DAC_CODED | 0x0 | 0x0 | |
26 | 1A | DAC_CLR_CODEA | 0x0 | 0x0 | |
27 | 1B | DAC_CLR_CODEB | 0x0 | 0x0 | |
28 | 1C | DAC_CLR_CODEC | 0x0 | 0x0 | |
29 | 1D | DAC_CLR_CODED | 0x0 | 0x0 | |
30 | 1E | DAC_ACTIVEA | 0x0 | 0x0 | |
31 | 1F | DAC_ACTIVEB | 0x0 | 0x0 | |
32 | 20 | DAC_ACTIVEC | 0x0 | 0x0 | |
33 | 21 | DAC_ACTIVED | 0x0 | 0x0 | |
34 | 22 | DIN_THRESH | 0x0 | 0x0 | |
35 | 23 | ADC_CONV_CTRL | 0x0 | 0x50f | Enables conversions on Channel A,B,C,D. Starts single sequence conversion |
36 | 24 | DIAG_ASSIGN | 0x0 | 0x0 | |
37 | 25 | DIN_COMP_OUT | 0x0 | 0x0 | |
38 | 26 | ADC_RESULTA | 0x0 | 0x641d | (25629/65535)*10 = 3.91 volts |
39 | 27 | ADC_RESULTB | 0x0 | 0x635b | (25435/65535)*10 = 3.88 volts |
40 | 28 | ADC_RESULTC | 0x0 | 0x6382 | .. |
41 | 29 | ADC_RESULTD | 0x0 | 0x6304 | .. |
42 | 2A | DIAG_RESULTA | 0x0 | 0x0 | |
43 | 2B | DIAG_RESULTB | 0x0 | 0x0 | |
44 | 2C | DIAG_RESULTC | 0x0 | 0x0 | |
45 | 2D | DIAG_RESULTD | 0x0 | 0x0 | |
46 | 2E | ALERT_STATUS | 0x0 | 0x0 | |
47 | 2F | LIVE_STATUS | 0x0 | 0x4000 | ADC_DATA_RDY |
48 | 30 | ALERT_MASK | 0x0 | 0x0 | |
49 | 31 | 0x0 | 0x0 | ||
50 | 32 | 0x0 | 0x0 | ||
51 | 33 | 0x0 | 0x0 | ||
52 | 34 | 0x0 | 0x0 | ||
53 | 35 | 0x0 | 0x0 | ||
54 | 36 | 0x0 | 0x0 | ||
55 | 37 | 0x0 | 0x0 | ||
56 | 38 | 0x0 | 0x0 | ||
57 | 39 | 0x0 | 0x0 | ||
58 | 3A | 0x0 | 0x0 | ||
59 | 3B | 0x0 | 0x0 | ||
60 | 3C | ALERT_MASK | 0x0 | 0x0 | |
61 | 3D | 0x0 | 0x0 | ||
62 | 3E | 0x0 | 0x0 | ||
63 | 3F | 0x0 | 0x0 | ||
64 | 40 | 0x0 | 0x0 | ||
65 | 41 | READ_SELECT | 0x41 | 0x41 | |
66 | 42 | ADC_CONV_CTRL_80SPS | 0x0 | 0x0 | |
67 | 43 | THERM_RST | 0x0 | 0x0 | |
68 | 44 | CMD_KEY | 0x0 | 0x0 | |
69 | 45 | SCRATCH | 0x0 | 0x0 | |
70 | 46 | SILICON_REV | 0x8 | 0x8 |
As you can see, the value of the registers related to the ADCs show values of 3.91V and not 5.00V as expected.
What could be wrong?
I have checked the voltages and everything seems to be within the correct range.
I have tried a multitude of tests, both firmware and HW, but I never get the correct values.
Say that if I configure the DAC voltage output from 0 to 10V it works correctly
Regarding the board itself, say that the analog part is identical to the evaluation board. I've been through it dozens of times
I would be very grateful if you could help me.
thank you in advance