請先看『使用說明』
F81801U Hardware Monitor under Windows
From LEXWiKi
(Difference between revisions)
(New page: Category:AllowPages == The Sample code source you can download from == Source file: [ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/HardwareMonitor/f81801uhw_src.rar f81801uhw_src...) |
(→The Sample code source you can download from) |
||
Line 1: | Line 1: | ||
[[Category:AllowPages]] | [[Category:AllowPages]] | ||
== The Sample code source you can download from == | == The Sample code source you can download from == | ||
- | Source file: [ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/HardwareMonitor/ | + | Source file: [ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/HardwareMonitor/F81801Uhw_src.rar F81801Uhw_src.rar] |
- | Binary file: [ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/HardwareMonitor/ | + | Binary file: [ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/HardwareMonitor/F81801Uhw_bin.rar F81801Uhw_bin.rar] |
== How to use the DEMO application == | == How to use the DEMO application == |
Revision as of 20:40, 24 August 2011
Contents |
The Sample code source you can download from
Source file: F81801Uhw_src.rar
Binary file: F81801Uhw_bin.rar
How to use the DEMO application
- Press the "Read Value" button , and then you can find the values in the below text boxes.
Sample code Introduction
Define Registry
#define F81801U_DEFAULT_CHIP_ID_1 0x07 #define F81801U_DEFAULT_CHIP_ID_2 0x23 #define F81801U_CHIP_ID_1 0x20 #define F81801U_CHIP_ID_2 0x21 #define HW_MONITOR_INDEX 0x295 #define HW_MONITOR_DATA 0x296 #define CPU_FAN_MSB 0xA0 #define CPU_FAN_LSB 0xA1 #define F81801U_VOLTAGE_CORE 0x21 #define F81801U_VOLTAGE_3V 0x20 #define F81801U_VOLTAGE_VIN2 0x22 #define F81801U_VOLTAGE_VSB3V 0x27 //Modify the error in Fintek programming guide 0x25 ->0x27 #define F81801U_VOLTAGE_VBAT 0x28 //Modify the error in Fintek programming guide 0x26 ->0x28 #define F81801U_TEMPERATURE_SYSTEM 0x74 #define F81801U_TEMPERATURE_CPU 0x72
Open VT1211
SetPortVal(0x4E,0x87,1); if ((this->F81801U_Read(F81801U_CHIP_ID_1) == F81801U_DEFAULT_CHIP_ID_1) && (this->F81801U_Read(F81801U_CHIP_ID_2) == F81801U_DEFAULT_CHIP_ID_2 )) { return TRUE; } else { return FALSE; }
Read Data
DWORD dwPortVal; SetPortVal(HW_MONITOR_INDEX, dwAddrVal,1); GetPortVal(HW_MONITOR_DATA,&dwPortVal,1); return ( dwPortVal & 0x00FF);
GetTemperature
switch (dwAddrVal) { case F81801U_TEMPERATURE_CPU: return F81801U_Read(F81801U_TEMPERATURE_CPU); case F81801U_TEMPERATURE_SYSTEM: return F81801U_Read(F81801U_TEMPERATURE_SYSTEM) ; }
GetVoltage
switch (dwAddrVal) { case F81801U_VOLTAGE_CORE: return (float)(F81801U_Read(F81801U_VOLTAGE_CORE)*0.8)/100; case F81801U_VOLTAGE_3V: return (float)(F81801U_Read(F81801U_VOLTAGE_3V)*1.6)/100; case F81801U_VOLTAGE_VIN2: return (float)(F81801U_Read(F81801U_VOLTAGE_VIN2)*0.8)/100; case F81801U_VOLTAGE_VSB3V: return (float)((F81801U_Read(F81801U_VOLTAGE_VSB3V)*1.6)/100); case F81801U_VOLTAGE_VBAT: return (float)((F81801U_Read(F81801U_VOLTAGE_VBAT)*1.6)/100); }