- 63 -
Appendices
B: Digital I/O Setting
Below are the source codes written in C, please take them for Digital I/O
application examples. The default I/O address is 6Eh.
/*----- Include Header Area -----*/
#include “math.h”
#include “stdio.h”
#include “dos.h”
#define DELAY_TIME
10
int SMB_PORT_AD = 0xF000;
int SMB_DEVICE_ADD = 0x6e;
/* 75111R’s Add=6eh
*/
unsigned char DIO_Set(unsigned char oMode, unsigned char oData);
unsigned char SMB_Byte_READ(int SMPORT, int DeviceID, int iREG_INDEX);
void SMB_Byte_WRITE(int SMPORT, int DeviceID, int oREG_INDEX, int oREG_DATA);
/*----- routing, sub-routing -----*/
void main()
{
DIO_Set(0xFF,0xFF);
delay(2000);
DIO_Set(0xFF,0x00);
delay(2000);
DIO_Set(0xFF,0x55);
delay(2000);
DIO_Set(0xFF,0xAA);
delay(2000);
}
unsigned char DIO_Set(unsigned char oMode, unsigned char oData)
{
unsigned char bData;
/* GPIO10~17 pin control */
SMB_Byte_WRITE(SMB_PORT_AD,SMB_DEVICE_ADD,0x10,oMode);
delay(DELAY_TIME);
/* GPIO10~17 pin Data */
SMB_Byte_WRITE(SMB_PORT_AD,SMB_DEVICE_ADD,0x11,oData);
delay(DELAY_TIME);
/* GPIO10~17 pin Status */
bData = SMB_Byte_READ(SMB_PORT_AD,SMB_DEVICE_ADD,0x12);
return bData;
}
unsigned char SMB_Byte_READ(int SMPORT, int DeviceID, int iREG_INDEX)
{
Содержание Rigid-314
Страница 2: ...Revision History Version Date Description 1 0 2013 08 initial release...
Страница 10: ...viii This page is intentionally left blank...
Страница 11: ...1 Introduction 1 Chapter 1 Introduction Chapter 1 Introduction...
Страница 17: ...7 Getting Started 2 Chapter 2 Getting Started Chapter 2 Getting Started...
Страница 21: ...11 System Configuration 3 Chapter 3 System Configuration Chapter 3 System Configuration...
Страница 37: ...27 Installation and Maintenance 4 Chapter 4 Installation and Maintenance Chapter 4 Installation and Maintenance...
Страница 50: ...40 This page is intentionally left blank...
Страница 51: ...41 BIOS 5 Chapter 5 BIOS Chapter 5 BIOS...
Страница 71: ...61 Appendices Appendices Appendices...