Appendix b: gpi/o programming guide – NEXCOM NISE 3520 User Manual
Page 110
Copyright © 2013 NEXCOM International Co., Ltd. All Rights Reserved.
97
NISE 3500, NISE 3500M User Manual
Appendix B: 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 NISE3500 series. The pin definition is shown in the
following table:
Appendix B: GPI/O Programming Guide
Pin
No.
GPI/O
mode
PowerOn
Default
Address Pin
No.
GPI/O
mode
PowerOn
Default
Address
1
VCC
-
-
2
GND
-
-
3
GPO
Low
3E4h (Bit4) 4
GPI
High
3E4h (Bit0)
5
GPO
Low
3E4h (Bit5) 6
GPI
High
3E4h (Bit1)
7
GPO
Low
3E4h (Bit6) 8
GPI
High
3E4h (Bit2)
9
GPO
Low
3E4h (Bit7) 10 GPI
High
3E4h (Bit3)
GPIO programming sample code
#define GPIO_PORT
0x3E4
#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)
{
GPO3_HI;
GPO5_LO;
GPO7_HI;
GPO9_LO;
}
JP2 – GPI/O Connector
Control the GPO pin (3/5/7/9) level from I/O port 3E4h bit (4/5/6/7).
The bit is Set/Clear indicated output High/Low