Appendix B: Gpi/O Programming Guide; J3 - Gpio Connector; Gpio Programming Sample Code - Nexcom EBC 352 User Manual

Embedded computing (3.5” cpu board)
Hide thumbs Also See for EBC 352:
Table of Contents

Advertisement

Appendix B: GPI/O Programming Guide

A
B: Gpi/O p
ppendix
GPI/O (General Purpose Input/Output) pins are provided for custom system
design. This appendix provides definitions and default settings for the ten
GPI/O pins in the EBC 352 series. The pin definition is shown in the follow-
ing table:

J3 - GPIO Connector

Pin
GPI/O
PowerOn
Address Pin
Mode
Default
1
VCC
-
-
3
GPO
Low
284h
(Bit4)
5
GPO
Low
284h
(Bit5)
7
GPO
Low
284h
(Bit6)
9
GPO
Low
284h
(Bit7)
Control the GPO pin (3/5/7/9) level from I/O port 284h bit (4/5/6/7).
The bit Set/Clear indicates output High/Low.
Copyright © 2011 NEXCOM International Co., Ltd. All Rights Reserved.
rOGrAmminG
GPI/O
PowerOn
Address
Mode
Default
2
GND
-
-
4
GPI
High
284h
(Bit0)
6
GPI
High
284h
(Bit1)
8
GPI
High
284h
(Bit2)
10
GPI
High
284h
(Bit3)
G
uide

GPIO Programming Sample Code

#define GPIO_PORT
0x284
#define GPO3
#define GPO5
#define GPO7
#define GPO9
#define GPO3_HI
outportb(GPIO_PORT, 0x10)
#define GPO3_LO
#define GPO5_HI
outportb(GPIO_PORT, 0x20)
#define GPO5_LO
#define GPO7_HI
outportb(GPIO_PORT, 0x40)
#define GPO7_LO
#define GPO9_HI
outportb(GPIO_PORT, 0x80)
#define GPO9_LO
void main(void)
{
GPO3_HI;
GPO5_LO;
GPO7_HI;
GPO9_LO;
}
55
(0x01 << 4)
(0x01 << 5)
(0x01 << 6)
(0x01 << 7)
outportb(GPIO_PORT, 0x00)
outportb(GPIO_PORT, 0x00)
outportb(GPIO_PORT, 0x00)
outportb(GPIO_PORT, 0x00)
EBC 352 User Manual

Advertisement

Table of Contents
loading

Table of Contents