
A-4
WDT, GPIO, DIO
MS-9A76
GPIO Sample Code
2.
General Purposed IO – GPIO/DIO
The GPIO port configuration addresses are listed in the following table:
Name
IO Port
IO address
Name
IO Port
IO address
N_GPI0
0xA05
Bit 7
N_GPO0
0xA05
Bit 3
N_GPI1
0xA05
Bit 2
N_GPO1
0xA05
Bit 4
N_GPI2
0xA05
Bit 1
N_GPO2
0xA05
Bit 5
N_GPI3
0xA05
Bit 0
N_GPO3
0xA05
Bit 6
2.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 = Inportb (
0xA05
);
// Read value from
N_GPO0
port.
val = val | (1<<
3
);
// Set
N_GPO0
address (bit 3) to 1 (output
“high”).
Outportb (
0xA05
, val);
// Write back to
N_GPO0
port.
Example:
Set
N_GPO1
output “low”
val = Inportb (
0xA05
);
// Read value from
N_GPO1
port.
val = val & (~(1<<
4
));
// Set
N_GPO1
address (bit 4) to 0 (output
“low”).
Outportb (
0xA05
, val);
// Write back to
N_GPO1
port.
2.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 = Inportb (
0xA05
);
// Read value from
N_GPI2
port.
val = val & (1<<
1
);
// Read
N_GPI2
address (bit 1).
if (val) printf (“Input of
N_GPI2
is High”);
else
printf (“Input of
N_GPI2
is Low”);
Содержание MS-9A76
Страница 1: ...i MS 9A76 Industrial Data Machine ...
Страница 8: ......
Страница 10: ...1 2 Overview System Overview 4 Slot SKU 2 Slot SKU h h System I O Controls 6 1 2 3 4 5 7 8 9 11 10 12 14 7 13 ...
Страница 20: ...1 12 Overview Block Diagram MS 9A76 Q170 C236 ...
Страница 21: ...1 13 MS 9A76 Motherboard Jumpers JCMOS1 JAT1 JME1 JCOMP1 ...
Страница 23: ...1 15 MS 9A76 Mechanical Overview 4 Slot SKU h h System Dimensions ...
Страница 24: ...1 16 Overview h h System Dimensions with Wall Mount ...
Страница 25: ...1 17 MS 9A76 h h PCI Express Card Dimensions ...
Страница 26: ...1 18 Overview ...
Страница 27: ...1 19 MS 9A76 h h PCI Card Dimensions ...
Страница 28: ...1 20 Overview ...
Страница 29: ...1 21 MS 9A76 Mechanical Overview 2 Slot SKU h h System Dimensions ...
Страница 30: ...1 22 Overview h h System Dimensions with Wall Mount ...
Страница 31: ...1 23 MS 9A76 h h PCI Express Card Dimensions ...
Страница 32: ...1 24 Overview h h PCI Card Dimensions ...
Страница 35: ...2 3 MS 9A76 4 Remove the top cover from the system ...
Страница 36: ...2 4 Getting Started CPU 1 Locate and loosen the heatsink screws 2 Remove the heatsink 3 Find the CPU socket ...
Страница 45: ...2 13 MS 9A76 10 Route the cables through the cable routing clip ...
Страница 51: ...2 19 MS 9A76 4 Connect the fan power connector to the motherboard ...
Страница 54: ...2 22 Getting Started 4 Connect the fan power connector to the motherboard ...
Страница 58: ......
Страница 82: ......