dbuezas / lgt8fx

Board Package for Logic Green LGT8F328P LGT8F328D and LGT8F88D
359 stars 90 forks source link

Anyone figured out how to read internal Vcc? #203

Closed ErikApption closed 2 years ago

ErikApption commented 2 years ago

I tried many Arduinos samples to read the internal voltage but I am not able to get any reading that makes sense, although the ADC is supposed to have a decent precision. None of the samples I've tried, both to get the Ref voltage or to read the internal Vcc worked. Any suggestions?

jayzakk commented 2 years ago

The fix in #130 would allow to select 4/5th VCC, which would allow to read that data. But currently the ADMUX can only select the first 8 inputs, not the extended ones. You may be able to merge it for yourself.

LaZsolt commented 2 years ago

Try to use this program: https://github.com/LaZsolt/Arduino_Vcc More info in this link: https://github.com/dbuezas/lgt8fx/discussions/123

LaZsolt commented 2 years ago

One more solution: https://github.com/RafaelReyesCarmona/Vcc

ErikApption commented 2 years ago

Try to use this program: https://github.com/LaZsolt/Arduino_Vcc More info in this link: #123

wow thanks for sharing this one. that's exactly what I was looking for