How to communicate with GPIO on windows (Win 10) for non raspberry device?


I have a motherboard (KINO-DH310) with windows 10, the GPIO controller displays under Device Manager -> System devices -> Interl(R) Serial IO GPIO Host Controller.

How am I supposed to begin simple I/O with this controller? I've tried different strategies, different programming languages, but to no affect. The majority of examples / sample code I see online are for the raspberry pi, and don't seem to work for me. Is there a concept I'm not grasping?

GPIO Controller

I've tried toggling the output pins to low and high using assembly (from C++ application)

KINO-DH310 recommended assembly: Digital Output is 1001b

MOV AX, 6F09H ;setting the digital port as output
MOV BL, 09H   ;digital value is 09H

My C++ Code:

__asm {
mov AX, 6F09H
mov BL, 00H
INT 15H        <--- Generates "Access Violation reading location 0xFFFFFFFF" error

This always generates an access violation because you could potentially access memory that would harm the system. Is there a way to suppress this?

My C# Code:

var gpio = GpioController.GetDefault();

if (gpio == null)
    return;      <--- Always returns null

Always generates null. I was hoping since I could see it in device manager, Windows could detect it has access to a GPIO Controller.

Any clarification would be greatly appreciated, even if the answer would be Windows doesn't support it (which I'm hoping is not the case)

asked on Stack Overflow May 15, 2019 by Nick Delbar • edited May 20, 2019 by Nick Delbar

2 Answers


Just wanted to give an update if anyone is trying to do something similar. In the end, I needed to get the SDK from the motherboard manufacturer. (IEI)

There was a small bug in the BIOS, but they were nice enough to give me a patch to the BIOS, and after updating the BIOS version, the SDK worked perfectly.

Final Result

answered on Stack Overflow May 20, 2019 by Nick Delbar • edited May 20, 2019 by Nick Delbar

You cannot use BIOS interrupts when the CPU is in protected mode, which all modern operating systems use. Looking at the manual for your board, it seems the example you're using is meant for bare-metal applications.

As far as using C#, it looks like the GpioController class is only supported on Windows IoT.

It should be possible to use the IO by interfacing with the driver, but information about that is difficult to find, so you may be out of luck.

answered on Stack Overflow May 15, 2019 by cj.vaughter

User contributions licensed under CC BY-SA 3.0