17 General Purpose Inputs/outputs
Kontron User's Guide EPIC/CE
51
Selecting a Logical Device
You can select a logical device by writing the value 07hex to the Index Register address and the logical
device number to the Data Register address. The example below shows how to select logical device 7 of
the first Super-I/O controller.
Example code:
MOV DX,2EH
;Index Register Address
MOV AL,07H
;Logical Device Select Code
OUT
DX,AL
;
MOV
DX,2FH
;Data
Register
Address
MOV
AL,07H
;Logical
Device
Number
OUT
DX,AL
;
Reprogramming Configuration Registers of the Logical Device
After a logical device is selected, a set of configuration registers is available. These registers are
responsible for the configuration of the GPIO functionality. You can set the direction (input/output) of
every single GPIO with the configuration register F0hex. You also can invert every single GPIO for read as
well as write operation by setting the corresponding bit in the configuration register F2hex.
Configuration register F1hex is the data register to read from or write to.
Configuration Register
Purpose
Explanation
Default Value
F0hex
Direction
0 = output,
1 = input
11111111bin
F1hex
Data
Can only be read when programmed as
input, can be read/written when
programmed as output
00000000bin
F2hex
Inversion
0 = not inverted,
1 = inverted
00000000bin
The meaning of the single bits in each of these configuration registers is shown in the table below.
Super-I/O
(Device)
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
2
nd
(7)
GP0
GP1
GP2
GP3
GP4
GP5
GP6
GP7
2
nd
(9)
RSVD (*)
RSVD (*)
GP8
GP9
GP10
GP11
GP12
GP13
2
nd
(8)
GP14
GP15
GP16
GP17
GP18
GP19
GP20
GP21
1
st
(7)
RSVD (*)
GP22
GP23
GP24
GP25
RSVD (*)
RSVD (*)
RSVD (*)
Notes
: (*)
Do not write to bits marked as reserved (RSVD).
These bits are used for other purposes. Normal operation of the board cannot be guaranteed if they
are intentionally modified!
The example below shows how a selected GPIO port (logical device) of the first Super-I/O can be read.
Example code:
MOV DX,2EH
;Index Register Address
MOV AL,F1H
;Select config register for data
OUT
DX,AL
;
MOV
DX,2FH
;Data
Register
Address
IN AL,DX
;Read data from data register
Summary of Contents for EPIC/CE
Page 1: ...Kontron User s Guide EPIC CE Document Revision 1 14...
Page 2: ...This page intentionally left blank...
Page 88: ...25 Appendix C Block Diagram Kontron User s Guide EPIC CE 88 25 Appendix C Block Diagram...
Page 93: ...27 Appendix E Connector Layout Kontron User s Guide EPIC CE 93 27 2 Bottom Side...