User guide

Page 122
K INO-PV-D5253-D4253 Mini-ITX Motherboard
E.1 Introduction
The digital I/O is used for machine control and automation.
E.2 DIO Connector Pinouts
Located in the Connectors section of this document.
E.3 Assembly Language E xample
;**************************************************
; DIO Port: Int15 (Fintek 81865)
Input ax=6F08h
bl: bit 0 ~ 3
output ax=6F09h
bl: bit 0 ~ 3
;**************************************************
Din :
mov dx, 2Eh ;Select Index Register
mov al, 87h
out dx, al ;Write twice
mov al, 87h
out dx, al
mov ax, 0607h ;Logic Device 6
mov dx, 2Eh ;Select Index Register
out dx, al
inc dx ;DX = data port address
xchg al, ah
out dx, al
mov al, 0F2h ;GPIO pin status register
mov dx, 2Eh ;Select Index Register
out dx, al
inc dx ;DX = data port address
in al, dx
and al, 00Fh
mov bl, al
mov dx, 2Eh ;Select Index Register
mov al, 0AAh
out dx, al ;Eixt configuration mode
Dout :
mov dx, 2Eh ;Select Index Register
mov al, 87h
out dx, al ;Write twice
mov al, 087h
out dx, al