![Fibrenetix Mobix-II MB-502-5-5000-A2-CT Quick User Manual Download Page 67](http://html1.mh-extra.com/html/fibrenetix/mobix-ii-mb-502-5-5000-a2-ct/mobix-ii-mb-502-5-5000-a2-ct_quick-user-manual_2286876067.webp)
M
anu
al
1
30
12
0
67
:69 Mobix-II Series
Europe
−
Americas
−
Middle East [email protected] www.fibrenetix.com
GPIO Sample Code
GPIO Setting
Pin#
GPIO#
Default Configuration
18
XCOM–
17
XCOM+
16
OUT8
DIO Output8
15
IN8
DIO Input8
14
OUT7
DIO Output7
13
IN7
DIO Input7
12
OUT6
DIO Output6
11
IN6
DIO Input6
10
OUT5
DIO Output5
9
IN5
DIO Input5
8
OUT4
DIO Output4
7
IN4
DIO Input4
6
OUT3
DIO Output3
5
IN3
DIO Input3
4
OUT2
DIO Output2
3
IN2
DIO Input2
2
OUT1
DIO Output1
1
IN1
DIO Input1
The GPIO function is provided by Nuvoton NCT6106D, and it can be accessed through its GPIO index/data port. To access the GPIO
register, write index to the index port, and then read/write from/to data port. The configuration on the MobixII is described as below.
Psuedo Code
#define AddrPort 0x2e
#define DataPort 0x2f
#define SIO_UnLock_Value 0x87
#define SIO_Lock_Value 0xaa
#define SIO_LDN_GPIO 0x07
#define GPIO_Port 0xF1
//Enter_Config
WriteByte (AddrPort, SIO_UnLock_Value);
WriteByte (AddrPort, SIO_UnLock_Value);
WriteByte (AddrPort, 0x07);
WriteByte (DataPort, SIO_LDN_GPIO);
//Set OUT1~OUT8Value
WriteByte (AddrPort, GPIO_Port);
WriteByte (DataPort, 0x00); //set OUT1~OUT8 value, OUT1=Bit0, OUT2=Bit1
User Guide