Computing.Net > Forums > Programming > Cpu Fan Speed in Visual Basic 6.0

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Cpu Fan Speed in Visual Basic 6.0

Reply to Message Icon

Name: InFeRnOsKuLL
Date: October 28, 2004 at 05:53:06 Pacific
OS: Windows 98 se
CPU/Ram: pentium 2
Comment:

HELP!!!!....I want to learn how to make a program that recognizes the motherboard I'm running off of. After it does that I want the program to monitor the CPU fan speed....all in VB6...Any help along with the code would be VERY helpful...thank you.

WeLcOmE To ThE HeLL I CaLL My LiFe



Sponsored Link
Ads by Google

Response Number 1
Name: StuartS
Date: October 28, 2004 at 16:34:10 Pacific
Reply:

I don't think you are going to do that in VB. To get the fan speeds you are going to have to address BIOS hardware ports and you can't do that with VB.

The only way is to write a DLL in C++ and get at it that way.

Stuart


0

Response Number 2
Name: InFeRnOsKuLL
Date: October 29, 2004 at 06:46:57 Pacific
Reply:

Thank you Stuart, so if I use C++ to make a DLL, what would the code look like, I'm not too well with looking up ports...what command would I use to look up the port for the fan?

WeLcOmE To ThE HeLL I CaLL My LiFe


0

Response Number 3
Name: StuartS
Date: October 29, 2004 at 09:06:24 Pacific
Reply:

Its a while since I did any C++ programming but you would be using commands like

yy = inp xx

xx Being the port number you are looking for.

outp xx,yy

Would write the value yy, to port XX.

To find out which ports you need to are going to have to get hold of some BIOS documentation. It is available on the Internet if you search Goggle.

Basically with the BIOS, you output a value to a particular port which tells the BIOS what value you are looking for, you then read the vale on another port.

Stuart


0

Response Number 4
Name: elric
Date: October 31, 2004 at 08:23:17 Pacific
Reply:

G'day,

You could accomplish this using VB6, but you would require a third party DLL.
Stuart is correct; you would require a DLL file to allow access to any low level functions. There are, however, third party files that can be used with Visual Basic.
Try this link: www.lvr.com
There is a whole wealth of info there and a dll file (io.dll or winio.dll I forget which) that can be used with WIN16 and WIN32 operating systems.
Another useful link is www.windmill.co.uk which gives a different spin on using VBA(Excel and Access) as an IO tool.
Having said all that, I'm not sure how you would go about determining the fan speed. I have no knowledge in this area (but would be happy to learn)and just where the information is kept I don't know.
I doubt that you would need to read a hardware IO port because it would be part of the motherboard ASIC chip (just guessing)and would probably be available through a RAM address if anything. So, you might have to peek() or poke() some RAM locations to get the info.
I think most newer fans have a Tacho output, but where that info is kept I don't know.
Anyway, good luck with it all, and don't forget to let us know how you got on.
regards,
Elric


0

Response Number 5
Name: StuartS
Date: October 31, 2004 at 08:57:50 Pacific
Reply:

>> I think most newer fans have a Tacho output, but where that info is kept I don't know. <<

Its stored in the CMOS memory somewhere along with the RTC. It has to be otherwise if it was in main memory the OS would overwrite it when the OS booted. As the fan speed is active before the OS boots, it has to be in CMOS. The fan speeds is a function of the BIOS and Windows will not allow an external device to write directly to memory.

The following will point you in the right direction:

http://members.iweb.net.au/~pstorr/pcbook/book5/cmos.htm

Further research is required to find out exactly where in the 128 bytes of CMOS memory the information is stored.

Stuart


0

Related Posts

See More



Response Number 6
Name: InFeRnOsKuLL
Date: November 1, 2004 at 08:42:24 Pacific
Reply:

Thank you, I shall start this tonight and see if I can get this thing to work!

WeLcOmE To ThE HeLL I CaLL My LiFe


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Cpu Fan Speed in Visual Basic 6.0

Problem In Visual Basic 6.0. www.computing.net/answers/programming/problem-in-visual-basic-60/9842.html

Visual Basic 6.0 www.computing.net/answers/programming/visual-basic-60/1237.html

Visual Basic 6.0 Progress Bar www.computing.net/answers/programming/visual-basic-60-progress-bar/7295.html