3-6 PCI-DIO32 User’s Guide
Programming Examples
All examples assume a base address of 300 Hex.
Read inputs at port A :
Set Relay #3 on, write a “1” in bit position D3, to port address Base+3,
or 303 hex
:
Another method, which takes into account the read-back capability of
the output ports C and D:
Note: Reading back the ports (C and D) results in the binary complement of
the output.
MOV DX,300H
;Set DX to Port A
IN AL, DX
;Get Input Port Data
NOT AL
;Data read is negative logic
MOV DX, 303H
;Set DX to Port D
MOV AL, 00001000B
;Set bit 3 to a ‘1’
OUT DX, AL
MOV DX, 303H
;Set DX to Port D
IN AL, DX
;Get old port setting
NOT AL
; Invert input – see note below
OR AL,00001000B
;OR in bit 3
OUT DX, AL
;Set bit 3
Summary of Contents for PCI-DIO32
Page 1: ...PCI DIO32 Interface Adapter Board User s Guide Manual PN 931 0007 00 A July 2000...
Page 4: ...iv PCI DIO32 User s Guide This page intentionally left blank...
Page 6: ...vi PCI DIO32 User s Guide This page intentionally left blank...
Page 10: ...x PCI DIO32 User s Guide This page intentionally left blank...
Page 14: ...xiv PCI DIO32 User s Guide This page intentionally left blank...
Page 27: ...Board Layout Drawing B 1 Appendix B Board Layout Drawing 6 00 3 825 4 200...