Rob, you really get me going with your posts. Thank you.
What we know:
Vin is voltage divided: 2.2/12.2 = 0.180
Vin has diode protection dropping it ~0.2 V
Vadc = 0.180*(Vin-0.2) = Vin*0.180 - 0.036
The Atmega ADCs are 10 bit with programmable gains of x1, x10, x200
bits = 1024/5*Vadc (0.00488 Volt/bit) [999*0.00488=4.878 or a -2.5% FS error)
?????? divide by 4 (255 bits or 0.0195 Volt/bit) is simply dropping the last two bits. (bit shift)
Combining the above I get:
bits*5/(0.18*1024)+0.2 = Vin
or
bits*0.0271+0.2 = Vin
I think "the TELVOLTTWK has a resolution of 0.27v / bit," is a typo. I am guessing it is 27mV/bit.
Your "bits + (128 - TVOLTTWK)" is probably the correct answer.
I don't have a TT4 here to test this out.
Thoughts?
btu, AC1DW
PS> So I went to the TT4 firmware manual to see where the 0.27V/bit came from.
???????? Yup; typo. From the manual "Default is 128 and each adjustment unit up or down will tweak the reading by 27mV"
???????? But I had fun reverse engineering it just the same.