diff -r 3b2bcba8c02d -r 31858ba46e9c Hardware/LPC/IT87XX.cs --- a/Hardware/LPC/IT87XX.cs Tue Aug 17 20:25:27 2010 +0000 +++ b/Hardware/LPC/IT87XX.cs Tue Aug 17 21:44:02 2010 +0000 @@ -53,6 +53,8 @@ private float?[] voltages = new float?[0]; private float?[] temperatures = new float?[0]; private float?[] fans = new float?[0]; + + private readonly float voltageGain; // Consts private const byte ITE_VENDOR_ID = 0x90; @@ -102,6 +104,13 @@ voltages = new float?[9]; temperatures = new float?[3]; fans = new float?[5]; + + // The IT8721F uses a 12mV resultion ADC, all others 16mV + if (chip == Chip.IT8721F) { + voltageGain = 0.012f; + } else { + voltageGain = 0.016f; + } } public Chip Chip { get { return chip; } } @@ -156,8 +165,10 @@ for (int i = 0; i < voltages.Length; i++) { bool valid; - float value = 0.001f * ((int)ReadByte( - (byte)(VOLTAGE_BASE_REG + i), out valid) << 4); + + float value = + voltageGain * ReadByte((byte)(VOLTAGE_BASE_REG + i), out valid); + if (!valid) continue; if (value > 0)