- 98 -
Appendix
A: Digital I/O Setting
Digital I/O can read from or write to a line or an entire digital port, which is a
collection of lines. This mechanism helps users achieve various applications
such as industrial automation, customized circuit, and laboratory testing. Take
the source code below that is written in C for the digital I/O application example.
Sample Codes:
/*----- Include Header Area -----*/
#include “math.h”
#include “stdio.h”
#include “dos.h”
int SMB_PORT_AD = 0xF040;
int
SMB_DEVICE_ADD
=
0x6e;
/*
75111R’s
Add=6eh */
/*----- routing, sub-routing -----*/
void main()
{
DIO_Set(0xFFFF,0xFFFF);
delay(2000);
DIO_Set(0xFFFF,0x0000);
delay(2000);
DIO_Set(0xFFFF,0x5555);
delay(2000);
DIO_Set(0xFFFF,0xAAAA);
delay(2000);
}
unsigned int DIO_Set(unsigned int oMode, unsigned int oData)
{
unsigned int iData;
unsigned int iTemp;
/* GPIO10~17 control */
SMB_Byte_WRITE(SMB_PORT_AD,SMB_DEVICE_ADD,0x10,oMode & 0x00FF);
delay(10);
/* GPIO20~27 control */
SMB_Byte_WRITE(SMB_PORT_AD,SMB_DEVICE_ADD,0x20,(oMode & 0xFF00)
>> 8 );
delay(10);
/* GPIO10~17 Data */
SMB_Byte_WRITE(SMB_PORT_AD,SMB_DEVICE_ADD,0x11,oData & 0x00FF);
Summary of Contents for Rigid-772
Page 2: ...2 This page is intentionally left blank...
Page 3: ...i Revision History Version Date Description 1 0 2013 February Initial release...
Page 6: ...iv This page is intentionally left blank...
Page 12: ...x This page is intentionally left blank...
Page 13: ...1 1 Chapter 1 Introduction Chapter 1 Introduction...
Page 19: ...7 2 Chapter 2 Getting Started Chapter 2 Getting Started...
Page 23: ...11 Rear left...
Page 26: ...14 This page is intentionally left blank...
Page 27: ...15 3 Chapter 3 System Configuration Chapter 3 System Configuration...
Page 47: ...35 Engine of the Computer...
Page 55: ...43 4 Chapter 4 Installation and Maintenance Chapter 4 Installation and Maintenance...
Page 84: ...72 This page is intentionally left blank...
Page 85: ...73 5 Chapter 5 BIOS Chapter 5 BIOS...
Page 109: ...97 Appendix Appendix...