beautypg.com

E.1 introduction, E.2 dio connector pinouts, E.3 assembly language example – IEI Integration KINO-PV-D4253_D5253 User Manual

Page 134: E .1 introduction, E .2 dio c onnector p inouts, E .3 as s embly l anguage e xample

background image

P age 122

K INO-P V-D5253-D4253 Mini-ITX Motherboard

E .1 Introduction

The digital I/O is used for machine control and automation.

E .2 DIO C onnector P inouts

Located in the Connectors section of this document.

E .3 As s embly L anguage 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