Re: ADC reading calculation
I am in need of some help calculating the voltage measured using the ADC on a c8051.
This is a Microchip PIC forum. Microchip do not make a "c8051"
The ref voltage I know is 2.4volts and it is using a 12bit step (4096 from my understanding and according to the notes of the last guy who programmed this thing).
The ADC value should then be (Vin / 2.4) * 2^12
It's easy to rearrange that formula to calculate Vin from the ADC count
It seems to have ADLJST set to right justify. In my readings I am getting 8A on ADC0H, and 0D on ADC0L.
With that information, is it possible to get the actual battery voltage being read?
No idea about those registers as this is not a PIC chip.
This forum is mis-configured so it only works correctly if you access it via https
The Microchip website links to it using http
protocol. Will they ever catch on?PicForum
"it just works"