Copyright © 2011 NEXCOM International Co., Ltd. All Rights Reserved.
71
Appendix B: GPI/O Programming Guide
NISE 2100, NISE 2100A, NISE 2110, NISE 2110A User Manual
A
ppendix
B: Gpi/O p
rOGrAmminG
Guide
GPIO Programming Sample Code
#define GPIO_PORT 0x284
#define GPO3 (0x01 << 4)
#define GPO5 (0x01 << 5)
#define GPO7 (0x01 << 6)
#define GPO9 (0x01 << 7)
#define GPO3_HI outportb(GPIO_PORT, 0x10)
#define GPO3_LO outportb(GPIO_PORT, 0x00)
#define GPO5_HI outportb(GPIO_PORT, 0x20)
#define GPO5_LO outportb(GPIO_PORT, 0x00)
#define GPO7_HI outportb(GPIO_PORT, 0x40)
#define GPO7_LO outportb(GPIO_PORT, 0x00)
#define GPO9_HI outportb(GPIO_PORT, 0x80)
#define GPO9_LO outportb(GPIO_PORT, 0x00)
void main(void)
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 NISE 2100/2110 Series. The pin definition is shown in
the following table:
Pin
GPI/O
Mode
Power On
Default
Address
Pin
GPI/O
Mode
Power On
Default
Address
1
VCC
-
-
2
GND
-
-
3
GPO
Low
284h (Bit4)
4
GPI
High
284h (Bit0)
5
GPO
Low
284h (Bit5)
6
GPI
High
284h (Bit1)
7
GPO
Low
284h (Bit6)
8
GPI
High
284h (Bit2)
9
GPO
Low
284h (Bit7)
10
GPI
High
284h (Bit3)
J8 - GPI/O connector
Control the GPO pin (3/5/7/9) level from I/O port 284h bit (4/5/6/7).
The bit Set/Clear indicated output High/Low.