I used S12G currently. Now want to use VDDF as a more accurate voltage reference. Below is my understanding:
1. First get the ADC result, stored it in IFR 0x0_4022/0x0_4023. It's a reference value which typical voltage is 2.82v.
Condition listed below from S12G datasheet.
Regulator supply voltage VDDR 5 V
I/O supply voltage VDDX 5 V
Analog supply voltage VDDA 5 V
ADC reference voltage VRH 5 V
ADC clock fADCCLK 2 MHz
ADC sample time tSMP 4 ADC clock cycles
Bus frequency fbus 24 MHz
Junction temperature Tj 150 and -40 °C
Code execution from RAM
2. In the code, just get the value and use calculation below:
Result=ConvertedADInput *(StoredReference • 5V/ConvertedReference 2n)
Am i right above? Thanks.
My questions are listed below:
1. Why in S12G we used VDDF as an accurate reference voltage? For other part, we have bandgap voltage as a reference.
2. How is the data format stored in 0x0_4022/0x0_4023?