![background image](http://html.mh-extra.com/html/ics/pci-16rel/pci-16rel_user-manual_615037021.webp)
Technical Description 3-3
Programming Examples
Below are two examples using 80X86 Assembly code for energizing and
checking the state of the reed relays on the PCI-16REL. Both examples
assume a base address of 300h:
Set Relay #3 on, write a ‘1’ in bit position D2, to port address Base+3, or 303h.
MOV DX, 303H
;Set DX to Port D
MOV AL, 00001000B
;Set bit 3 to a ‘1’
OUT DX, AL
Another method, which takes into account the read-back capability of output
ports C and D:
MOV DX,303H
;Set DX To Port D
IN AL,DX
;Get old port setting
NOT AL
;Invert Bits – see note below
OR AL,00001000B
;OR in bit 3
OUT DX,AL
;Set Bit 3
Note:
Reading back the ports (C and D) results in the binary complement of the output
.
Содержание PCI-16REL
Страница 1: ...PCI 16REL Interface Adapter Board Manual PN 931 0006 00 A June 2000 ...
Страница 4: ...iv PCI DIO16 User s Guide This page intentionally left blank ...
Страница 6: ...vi PCI DIO16 User s Guide This page intentionally left blank ...
Страница 10: ...x PCI DIO16 User s Guide This page intentionally left blank ...
Страница 14: ...xiv PCI DIO16 User s Guide This page intentionally left blank ...
Страница 16: ...xvi PCI 16REL User s Guide This page intentionally left blank ...
Страница 25: ...This page intentionally left blank ...
Страница 27: ...Board Layout Drawing B 1 Appendix B Board Layout Drawing 3 9 5 0 ...