Simple way to read values from the SMBus in C#, on a Windows machine?
-
16-12-2020 - |
Question
I've been at it for a month, and still can't find a solution to this deceptively difficult problem. Specifically, I would like to read temperatures from the W83793 chip, using C#, on a Windows machine. I have virtually no experience with low-level programming. All I know is that in order to read from this chip, I need to access the SMBus, and that alone will get me started.
Despite going through every SMBus document I could find online, I am still clueless as to how I should start. I searched for C# SMBus libraries online, but couldn't find anything aside from a few Linux related documents. I don't want to re-invent the wheel here. There's got to be a library, a tutorial, or other resource out there to explain exactly how to access the SMBus in C# on Windows.
What is a simple way to access the SMBus in C#? If you can help me out to the point where I can pull SOME value, ANY value, out of a slave device on the SMBus, that will get me started.
Solution
Look at OpenHardware monitor. It will have code dealing with that already.
Else use WinRing0, if you feel adventurous. :) You would normally access the smbus via ISA port IIRC. (I did this previously before I discovered OpenHardwareMonitor, a very fun exercise).
A helpful tool is called 'ReadWriteEverthing' for poking at all kinds of hardware ports. Expect blue screens or freezes :)
OTHER TIPS
Have you looked at the Windows Driver Kit? Searching around the web, it seems like its the place to start when communicating on SMBus from within windows.