General Purposed Io - MSI MS-98M9 Manual

Industrial computer board
Table of Contents

Advertisement

General Purposed IO

1. General Purposed IO – GPIO/DIO
The GPIO port configuration addresses are listed in the following table:
Name
IO Port
N_GPI0
0x12
N_GPI1
0x12
N_GPI2
0x12
N_GPI3
0x42
N_GPI4
0x12
N_GPI5
0x12
N_GPI6
0x12
N_GPI7
0x12
Note: GPIO should be accessed through controller device 0x9C on SMBus. The associated access
method in examples (SMBus_ReadByte, SMBus_WriteByte) are provided in part 3.
1.1
Set output value of GPO
1. Read the value from GPO port.
2. Set the value of GPO address.
3. Write the value back to GPO port.
Example: Set N_GPO0 output "high"
val =SMBus_ReadByte (0x9C, 0x21);
val = val | (1<<0);
SMBus_WriteByte (0x9C, 0x21, val);
Example: Set N_GPO1 output "low"
val = SMBus_ReadByte (0x9C, 0x21);
val = val & (~(1<<1));
SMBus_WriteByte (0x9C, 0x21, val);
1.2
Read input value from GPI:
1. Read the value from GPI port.
2. Get the value of GPI address.
Example: Get N_GPI2 input value.
val = SMBus_ReadByte (0x9C, 0x12);
val = val & (1<<2);
IO address
Name
Bit 0
N_GPO0
Bit 1
N_GPO1
Bit 2
N_GPO2
Bit 3
N_GPO3
Bit 4
N_GPO4
Bit 5
N_GPO5
Bit 6
N_GPO6
Bit 7
N_GPO7
// Read value from N_GPO0 port through SMBus.
// Set N_GPO0address (bit 0) to 1 (output "high").
// Write back to N_GPO0 port through SMBus.
// Read value from N_GPO1 port through SMBus..
// Set N_GPO1 address (bit 1) to 0 (output "low").
// Write back to N_GPO1 port through SMBus.
// Read value from N_GPI2 port through SMBus.
// Read N_GPI2 address (bit 2).
IO Port
IO address
0x21
Bit 0
0x21
Bit 1
0x21
Bit 2
0x21
Bit 3
0x21
Bit 4
0x21
Bit 5
0x21
Bit 6
0x21
Bit 7
MS-98M9
A-3

Advertisement

Table of Contents
loading

Table of Contents