0

Trying to get the temperature of the processor.

Have already tried using WQL (WMI class MSAcpi_ThermalZoneTemperature), but apparently it is not implemented for all the platforms yet. On most of the machines it simply returns every existing error message via HRESULT return value. The temperature itself is not returned.

The idea is to read this temperature directly via the bus port. I have found the library, which gives the functionality of outp and inp functions, and with it managed to start initiate the connection (NTPort), however, the question becomes which port to connect to in order to read the data. The microcontroller is IT8728F. SpeedFan (the application that is able to read the temperature) in its logs says that it reads the data from port 0x290. However, when connecting to it, the data that comes back does not look like temperature (it always returns 29).

So what the next thing that was tried was to read from whatever port, trying to determine if any data that came through looked like temperature. However, from every port some data came through that was either too low or too high to be the real temperature.

int CPU_TEMP;
Outp(INDEX, BANK_SET);
Outp(DATA, Inp(DATA)|0x01);
for(CPU_TEMP=0x0;CPU_TEMP<0x999;CPU_TEMP++)
{
  Outp(INDEX, CPU_TEMP);
  printf("CPU temp: %iC\n", Inp(DATA));
}
Jonas
  • 121,568
  • 97
  • 310
  • 388
v010dya
  • 5,296
  • 7
  • 28
  • 48

1 Answers1

0

maybe your processor is 29 degrees Celsius and stable. That seems legit for a processor.

Also: is that 0x00000029 or DEC 29? that makes a big difference

Bfitzy
  • 1
  • Checking the temperature with software like SpeedFan shows that it is not the case. Also have tried 'warming up' the processor with a loop prior to checking, didn't help. – v010dya Mar 18 '14 at 17:47