WSB-G41A CPU Card
Page 106
D.1 Introduction
The digital I/O is used for machine control and automation.
D.2 DIO Connector Pinouts
Located in the Connectors section of this document.
D.3 Assembly Language Example
;**************************************************
; DIO Port:
0A21h[3:0] (4 Out)
;
0A22h[3:0] (4 In)
;**************************************************
;==================================================
; Get current input and output values into AL register
; AL: bit0~bit3 as output value
;
bit4~bit7 as Input value
;==================================================
mov
; GPIO output I/O base address
in
al, dx
; Get output status
jmp
$+2
;
Wait
jmp
$+2
;
Wait
and
al,
0Fh
mov
bl, al
; Move al to bl temporarily
inc
dx
in
al, dx
; Get input status
jmp
$+2
;
Wait
jmp
$+2
;
Wait
and
al,
0Fh
rol
al, 4
; Shift input values over
or
al, bl
; Merge all results into AL
; AL: bit0~bit3 as output value
; bit4~bit7 as input value
;==================================================
; Output value (x) to GPIO
; AL: bit0~bit3 as output value
;==================================================
mov
al, 0xh
; x is the output value (0 ~ Fh)
mov
; GPIO output I/O base address
out
dx, al
; bit0 ~ bit3 as Output value
; bit4 ~ bit7 are Reserved
Содержание WSB-G41A-R11
Страница 11: ...WSB G41A CPU Card Page xi Table 5 1 BIOS Navigation Keys 60...
Страница 13: ...WSB G41A CPU Card Page 1 Chapter 1 1 Introduction...
Страница 21: ...WSB G41A CPU Card Page 9 Chapter 2 2 Packing List...
Страница 26: ...WSB G41A CPU Card Page 14 Chapter 3 3 Connectors...
Страница 47: ...WSB G41A CPU Card Page 35 Chapter 4 4 Installation...
Страница 70: ...WSB G41A CPU Card Page 58 Chapter 5 5 BIOS...
Страница 107: ...WSB G41A CPU Card Page 95 Appendix A A BIOS Options...
Страница 110: ...WSB G41A CPU Card Page 98 Appendix B B Terminology...
Страница 114: ...WSB G41A CPU Card Page 102 Appendix C C Watchdog Timer...
Страница 117: ...WSB G41A CPU Card Page 105 Appendix D D Digital I O Interface...
Страница 119: ...WSB G41A CPU Card Page 107 Appendix E E Hazardous Materials Disclosure...