MANO561 Mini ITX Motherboard
50
Digital I/O
Appendix B
Digital I/O
B.1 About Digital I/O
The onboard digital I/O has 8 bits. Each bit can be set to function as input or output by software
programming. In default, all pins are pulled high with +5V level (according to main power). The
BIOS default settings are 4 inputs and 4 outputs.
B.2 Sample Program
#include
"stdafx.h"
#ifdef
_DEBUG
#define
new
DEBUG_NEW
#endif
#include
<windows.h>
#include
<stdio.h>
#include
<tchar.h>
#include
<stdlib.h>
#pragma
comment
(
lib
,
"User32.lib"
)
#define
IDT_TIMER
WM_USER
+ 200
#define
_CRT_SECURE_NO_WARNINGS
1
#define
setbit
(value,x) (value |=(1<<x))
#define
clrbit
(value,x) (value &=~(1<<x))
#define
GPIO_HIGH
1
#define
GPIO_LOW
0
HINSTANCE
hinstLibDLL =
NULL
;
LONG
u8AHData = 0;
LONG
u88HData = 0;
LONG
u89HData = 0;
static
int
DI0status = 1;
static
int
DI1status = 1;
static
int
DI2status = 1;
static
int
DI3status = 1;
typedef
ULONG
(*
LPFNDLLGETIOSPACE
)(
ULONG
);
LPFNDLLGETIOSPACE
lpFnDll_Get_IO;
typedef
void
(*
LPFNDLLSETIOSPACE
)(
ULONG
,
ULONG
);
LPFNDLLSETIOSPACE
lpFnDll_Set_IO;
int
_tmain
(
int
argc
,
_TCHAR
*
argv
[])
{
if
(hinstLibDLL ==
NULL
)
{
hinstLibDLL =
LoadLibrary
(
TEXT
(
"diodll.dll"
));
if
(hinstLibDLL ==
NULL
)
{
Summary of Contents for E38M561100
Page 5: ...v This page is intentionally left blank ...
Page 6: ......
Page 10: ...MANO561 Mini ITX Motherboard 4 Introduction 1 4 Block Diagram ...
Page 12: ...MANO561 Mini ITX Motherboard 6 Board and Pin Assignments Bottom View ...
Page 59: ...MANO561 Mini ITX Motherboard Digital I O 53 This page is intentionally left blank ...