
APPENDIX
56
MI987 User’s Manual
File of the MAIN.CPP
//---------------------------------------------------------------------------
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
// PURPOSE.
//---------------------------------------------------------------------------
#include <dos.h>
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include "NCT5523D.H"
//---------------------------------------------------------------------------
int main (void);
void Dio5Initial(void);
void Dio5SetOutput(unsigned char);
unsigned char Dio5GetInput(void);
void Dio5SetDirection(unsigned char);
unsigned char Dio5GetDirection(void);
//---------------------------------------------------------------------------
int main (void)
{
char SIO;
SIO = Init_NCT5523D();
if (SIO == 0)
{
printf("Can not detect Nuvoton NCT5523D, program abort.\n");
return(1);
}
Dio5Initial();
//for GPIO20..27
Dio5SetDirection(0x0F); //GP20..23 = input, GP24..27=output
printf("Current DIO direction = 0x%X\n", Dio5GetDirection());
printf("Current DIO status = 0x%X\n", Dio5GetInput());
printf("Set DIO output to high\n");
Dio5SetOutput(0x0F);
printf("Set DIO output to low\n");
Dio5SetOutput(0x00);
return 0;
}
//---------------------------------------------------------------------------
Содержание MI987
Страница 1: ...MI987 Intel Q87 H81 Based Mini ITX board Mini ITX Motherboard USER S MANUAL Version 1 0 ...
Страница 4: ...iv MI987 User s Manual This page is intentionally left blank ...
Страница 9: ...INSTALLATIONS MI987 User s Manual 5 Connectors on MI987 錯誤 尚未定義書籤 ...
Страница 12: ...INSTALLATIONS 8 MI987 User s Manual Jumper Locations on MI987 Jumpers on MI987 Page ...
Страница 15: ...INSTALLATIONS MI987 User s Manual 11 JP10 Power On Type JP10 Function 1 2 ATX Mode Default 2 3 AT Mode 3 1 ...
Страница 17: ...INSTALLATIONS MI987 User s Manual 13 Connector Locations on MI987 ...
Страница 26: ...INSTALLATIONS 22 MI987 User s Manual This page is intentionally left blank ...
Страница 56: ...DRIVER INSTALLATION 52 MI987 User s Manual This page is intentionally set blank ...