
FabiaTech Corporation
TTL I/O(GPIO) programming
The following is an Assembly program, which demonstrates how to set the GPIO
type and how to read and write values.
;------------------------------------------------------------------------------------------
; Enter the extended function mode, interruptible double-write
;------------------------------------------------------------------------------------------
Mov
dx, 2eh
; Enter to extended function mode
Mov
al, 87h
Out
dx,al
Out
dx,al
;------------------------------------------------------------------------------------------------------
; Configurate logical device7 , configuration register CRF0,CRF1,CRF2
; CRF0 (GP0-GP7 I/O selection register.)
;
When set to a “1”, respective GPIO port is programmed as input port.
;
When set to a “0”, respective GPIO port is programmed as an output port.
; CRF1 (GP0-GP7 data register.)
;
if a port is programmed to be an output port, then its respective bit can be
read/written.
;
If a port is programmed to be an input port, then its respective bit can only
be read.
; CRF2 (GP0-7 inversion register.)
;
When set to a “1”, the incoming/outgoing port value is inverted.
;
When set to a “0”, the incoming/outgoing port value is same as in data
register.
;------------------------------------------------------------------------------------------------------
Mov
dx,2eh
Mov
al,07h
Out dx,al
;
point to Logical Device Number Reg.
Mov dx,2fh
Mov al,07h
Mov
dx,al
; Select Logical devive 7
Mov
dx,2eh
Mov al,f0h
Out dx,al
;Select
CRF0
Mov dx,2fh
Mov
al,03h
;Set GP0-1 is input and GP2-3 is output
Out
dx,al
;update CRF0 with value 0Fh
Mov
dx,2eh
Mov al,f1h
Out dx,al
;Select
CRF1
Mov dx,2fh
In al,dx
And
al,03h
;read GP0-1 value
Mov
ah,0ch
;Set GP2-3 value is “xxxx11xxb”
Or
al,ah
Out
dx,al
; update CRF1 with value
64
Содержание FX5653
Страница 15: ...FabiaTech Corporation g3 FX5622K1 Rack Mount 11 ...
Страница 35: ...FabiaTech Corporation Super IO Configuration This section describes the function of Super I O settings 31 ...
Страница 41: ...FabiaTech Corporation Chipset This section describes the configuration of the board s chipset features 37 ...
Страница 42: ...FabiaTech Corporation Host Bridge Host Bridge Parameters 38 ...
Страница 45: ...FabiaTech Corporation South Bridge South Bridge Parameters 41 ...
Страница 69: ...FabiaTech Corporation Exit extended function mode Mov dx 2eh Mov al aah Out dx al 65 ...
Страница 82: ...FabiaTech Corporation Appendix Dimension a FX5653 250 REF 50 REF 180 REF 78 ...
Страница 83: ...FabiaTech Corporation b FX5504K1 61 2 REF 118 REF 75 100 19 REF 7 75 100 75 REF 12 5 8 79 ...
Страница 84: ...FabiaTech Corporation c FX5501K1 278 REF 264 REF 58 REF 37 47 140 90 REF 8 10 80 ...
Страница 85: ...FabiaTech Corporation 81 d FX5622K1 455 REF 469 REF 480 REF 31 75 44 50 REF ...