Appendix a: gpi/o programming guide – Acura Embedded AcuPanel 17 User Manual
Page 83
![background image](/manuals/248843/83/background.png)
Appendix A: GPI/O Programming Guide
Appendix A: GPI/O Programming Guide
GPI/O (General Purpose Input/Output) pins are provided for custom system
design. This appendix provides definitions and its default setting for the ten
GPI/O pins in the AcuPanel 17. The pin definition is shown in the following
table:
6
1
5
10
Pin
1
2
3
4
5
6
7
8
9
10
GPI/O mode PowerOn
Default
+5V
GPI20
GPI21
NC
NC
GND
GPO22
GPO23
NC
NC
-
High
High
-
-
-
Low
Low
-
-
Address
-
A04h (bit0)
A04h (bit1)
-
A04h (bit2)
A04h (bit3)
-
-
Control the GPO pin (7/8) level from I/O port A04h bit (2/3).
The bit is Set/Clear indicated output High/Low
78
GPIO programming sample code
#define GPIO_PORT
#define GPO7
#define GPO8
#define GPO7_HI
#define GPO7_LO
#define GPO8_HI
#define GPO8_LO
void main(void)
{
GPO7_HI;
GPO8_LO;
}
0xA04
(0x01 <<2)
(0x01 <<3)
outportb(GPIO_PORT, 0x04)
outportb(GPIO_PORT, 0x00)
outportb(GPIO_PORT, 0x08)
outportb(GPIO_PORT, 0x00)