![CyberResearch CPGN C2-30-X Скачать руководство пользователя страница 116](http://html1.mh-extra.com/html/cyberresearch/cpgn-c2-30-x/cpgn-c2-30-x_user-manual_2703044116.webp)
116
©Copyright 2011
CyberResearch, Inc.
CPGN CPU Card
D.1 IIntroduction
The digital I/O is used for machine control and automation.
D.2 D
DIO Connector Pinouts
Located in the Connectors section of this document.
D.3 A
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
dx, 0A21h
; 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
; sets dx to 0A22h
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
dx, 0A21h
; GPIO output I/O base address
out
dx, al
; bit0 ~ bit3 as Output value
; bit4 ~ bit7 are Reserved
Содержание CPGN C2-30-X
Страница 2: ...2 Copyright 2011 CyberResearch Inc CPGN CPU Card...
Страница 3: ...Copyright 2011 CyberResearch Inc 3 Revision Date Version Changes 14 June 2011 1 0...
Страница 13: ...Copyright 2011 CyberResearch Inc 13 Chapter 1 1 Introduction...
Страница 20: ...20 Copyright 2011 CyberResearch Inc CPGN CPU Card Chapter 2 2 Packing List...
Страница 24: ...24 Copyright 2011 CyberResearch Inc CPGN CPU Card Chapter 3 3 Connectors...
Страница 46: ...46 Copyright 2011 CyberResearch Inc CPGN CPU Card Chapter 4 4 Installation...
Страница 63: ...Copyright 2011 CyberResearch Inc 63 Chapter 5 5 BIOS...
Страница 104: ...104 Copyright 2011 CyberResearch Inc CPGN CPU Card Appendix A A BIOS Options...
Страница 107: ...Copyright 2011 CyberResearch Inc 107 Discard Changes 103 Load Optimal Defaults 103 Load Failsafe Defaults 103...
Страница 108: ...108 Copyright 2011 CyberResearch Inc CPGN CPU Card Appendix B B Terminology...
Страница 112: ...112 Copyright 2011 CyberResearch Inc CPGN CPU Card Appendix C C Watchdog Timer...
Страница 115: ...Copyright 2011 CyberResearch Inc 115 Appendix D D Digital I O Interface...
Страница 117: ...Copyright 2011 CyberResearch Inc 117 Appendix E E Hazardous Materials Disclosure...