Advantech PCE-7210 User Manual Page 141

  • Download
  • Add to my manuals
  • Print
  • Page
    / 142
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 140
125 Appendix C
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
---------------------------------------------------------------
Configurate 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
Page view 140
1 2 ... 136 137 138 139 140 141 142

Comments to this Manuals

No comments