Appendix D: Digital I/O Setting - Lead International FPC-7500 User Manual

Fanless intel socket g core i5/i7 box pc
Table of Contents

Advertisement

Appendix

Appendix D: Digital I/O Setting

Digital I/O can read from or write to a line or an entire digital port, which is a col-
lection of lines. This mechanism can be used to meet user's various applica-
tions such as industrial automation, customized circuit, and laboratory testing.
The source code below written in C is the applicable sample for programming.
D.1 Source Code in C
/*-----
Include Header Area -----*/
#include "math.h"
#include "stdio.h"
#include "dos.h"
void main(void){
int SMB_PORT_AD = 0xF000;
int SMB_DEVICE_ADD = 0x6E;
//programming DIO as output
//0:input 1:Output
/*
Index 10, GPIO1x Output pin control
SMB_Byte_WRITE(SMB_PORT_AD,SMB_DEVICE_ADD,0x10,0xff);
delay(10);
/*
Index 20, GPIO2x Output pin control
SMB_Byte_WRITE(SMB_PORT_AD,SMB_DEVICE_ADD,0x20,0xff);
delay(10);
/*
Index 40, GPIO3x Output pin control
SMB_Byte_WRITE(SMB_PORT_AD,SMB_DEVICE_ADD,0x40,0xff);
delay(10);
//programming DIO default LOW
/*
Index 11, GPIO1x Output Data value
SMB_Byte_WRITE(SMB_PORT_AD,SMB_DEVICE_ADD,0x11,0x00);
delay(10);
/*75111R's Add=6eh */
*/
*/
*/
*/
- 73 -

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fpc-7502

Table of Contents