Gpio Example Program-1 - Advantech PCE-7214 User Manual

Dual socket 771 intel quad-core/dual-core xeon processor card with pci express / vga / dual gigabit lan / fsb 1333 mhz
Hide thumbs Also See for PCE-7214:
Table of Contents

Advertisement

C.1.2

GPIO Example program-1

------------------------------------------------------------
Enter the extended function mode, interruptible double-write
------------------------------------------------------------
MOV DX,4EH
MOV AL,87H
OUT DX,AL
OUT DX,AL
------------------------------------------------------------
Configure logical device 7(GP10~GP17), configuration register CRF0,CRF1,CRF2
------------------------------------------------------------
MOV DX,4EH
MOV AL,07H ; point to Logical Device Number Reg.
OUT DX,AL
MOV DX,4FH
MOV AL,07H ; select logical device 7
OUT DX,AL ;
MOV DX,4EH
MOV AL,F0
OUT DX,AL
MOV DX,4FH
MOV AL,00H ; 01:Input 00:output for GP10~GP17
OUT DX,AL
MOV DX,4EH
MOV AL,F2H ;
OUT DX,AL
MOV DX,4FH
MOV AL,00H
;Set GPIO is normal not inverter
OUT DX,AL;
MOV DX,4EH
MOV AL,F1H
OUT DX,AL
MOV DX,4FH
MOV AL,??H ; Put the output value into AL
OUT DX,AL
------------------------------------------------------------
Exit extended function mode |
------------------------------------------------------------
MOV DX,4EH
MOV AL,AAH
OUT DX,AL
79
PCE-7214 User Manual

Advertisement

Table of Contents
loading

Table of Contents