- 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);
Содержание Rigid-772
Страница 2: ...2 This page is intentionally left blank...
Страница 3: ...i Revision History Version Date Description 1 0 2013 February Initial release...
Страница 6: ...iv This page is intentionally left blank...
Страница 12: ...x This page is intentionally left blank...
Страница 13: ...1 1 Chapter 1 Introduction Chapter 1 Introduction...
Страница 19: ...7 2 Chapter 2 Getting Started Chapter 2 Getting Started...
Страница 23: ...11 Rear left...
Страница 26: ...14 This page is intentionally left blank...
Страница 27: ...15 3 Chapter 3 System Configuration Chapter 3 System Configuration...
Страница 29: ...17 Engine of the Computer FMB i77M1 Board Bottom 1 1 5 6 C1 C4 C2 C5 C3 C6 1 1 1 4 7 2 3 5 6 1 4 7 2 3...
Страница 47: ...35 Engine of the Computer...
Страница 55: ...43 4 Chapter 4 Installation and Maintenance Chapter 4 Installation and Maintenance...
Страница 84: ...72 This page is intentionally left blank...
Страница 85: ...73 5 Chapter 5 BIOS Chapter 5 BIOS...
Страница 109: ...97 Appendix Appendix...
Страница 113: ...101 This page is intentionally left blank...