RL78/G16 ADC counts not getting as expected

I am using RL78/G16 32pin micro, I have set the required fields for ADC counts,

As per  smart configurator in CS+ peripheral devices are set, but there is no option of setting internal reference voltage as 0.815volts hence I found that my ADC counts 774 value on 0volts.

Instead it should read 0 on 0volts.

Is it because reference is taken 4.9 or 5volts by default by the configurator or something else ?

As i am getting 1023 count value at 5volts.

Parents Reply
  • Hello,

    Make sure that your connections have a common GND. In case you connect the ANI2 input to + of a power supply, make sure that the GND and - of the power supply are connected to the GND of the board.

    In case you do not have a common GND is normal to do not get correct values while reading.

    The value you  are mentioning is not a normal offset. Normally if your connections are correct you should see a reading like 5 for example from the ADC. Is normal to have a small offset due to many factors, like for example the capacitance of the cables.

    To make sure your connections are ok, connect the analog input pin to the GND of the board, where it sure that you have a common GND and you will get more accurate readings.



No Data