Pch 7791 – Acnodes PCH 7791 User Manual
Page 63
PCH 7791
17 inch Atom Fanless Panel PC
© Copyright 2012 Acnodes, Inc.
All rights reserved. Product description and product specifications
are subject to change without notice. For latest product information,
please visit Acnodes’ web site at www.acnodes.com.
14628 Central Ave.
Chino, CA91710
Tel:909.597.7588, Fax:909.597.1939
Examp le C code:
outportb(0x4E, 0xE 6);
//GP IO I/O sel ection reg.
outportb(0x4 F, 0x0); //0
– normal, 1 - inverted
outportb(0x4E, 0xE 4);
//GP IO
i nvers ion
reg.
outport b(0x4F, 0xFF);
//0
– Output, 1 - Input or
outportb(0x4E, 0xE 4);
//GP IO inversi on reg.
outportb(0x4 F, 0xF0);
//0
– Output, 1 - Input
R ead GPIO value
Examp le x86 assembly code:
mov
mov
dx, 4E h
al, 0 E5h
;GP IO data reg.
out
dx, al
mov
dx, 4Fh
in
al, d x
;B it[3::0] = GP I[3 ::0] val ue
Examp le C code:
outportb(0x4E, 0 xE 5);
//GP IO data reg.
GP = inportb(0x4F);
//B it[3::0] = GP I[3::0]
Writ e GPIO value
Examp le x86 assembly code:
;Set G PO62
mov
dx, 4E h
mov
al, 0 E5h
;GP IO data reg.
out
dx, al
mov
dx, 4Fh
in
al, d x
or
al, 0 0000100b
;B it2 = G PO62
out
dx, al
;Clear GP O62