Hi.
I use S12AD1 in my project and read correct value. But S12AD0 read value of 12908, that is out of scale. I use right alignment.
Any idea?
Thanks
Paolo
Hi Paolo,Can you please share the project?Thanks,Panos
Hi.I share test program.
Best Regards
TEST_ADC0.zip
Hi,Do you use a custom board? Can you share the schematics?Thanks,Panos
Hi Panos.
Yes, it's a custom board. I can't share the schematics.
What could be about the schematic be the problem? If it had the wrong reference it would give the wrong value but still in the 12-bit range. Or would it?
How do you read the 12908? From expression/variables or via registers directly?What is the value of this register?
I read the adc_val variable with that value.
Now I try to read the register directly.
I tried.
Register value is 1 and variable is over 12000 :(.
both values seem wrong to me.
Of course, I put the breakpoint after the read function.
Can you try connect the ADC pin with known voltage (3.3V, 0V etc) and let me know the value of the register?