83
MIC-7900 User Manual
Appendix B
P
rogramming
the
G
PIO
B.1.2
GPIO Example Program
------------------------------------------------------------
Enter the extended function mode, interruptible double-write
------------------------------------------------------------
MOV DX, 2EH
MOV AL, 87H
OUT DX, AL
OUT DX, AL
------------------------------------------------------------
Configure logical device 7(GP40~GP47), configuration register CRF0, CRF1, CRF2
------------------------------------------------------------
MOV DX, 2EH
MOV AL, 07H ; Point to Logical Device Number Reg.
OUT DX, AL
MOV DX, 2FH
MOV AL, 07H ; Select logical device 7
OUT DX, AL
------------------------------------------------------------
Configure GPIO1 I/O Register
------------------------------------------------------------
MOV DX, 2EH
MOV AL, F0H
OUT DX, AL
MOV DX, 2FH
MOV AL, ??H ; 0: The respective GPIO1 PIN is programmed as an output port
;1: The respective GPIO1 PIN is programmed as an input port.
OUT DX, AL
------------------------------------------------------------
Configure GPIO1 Inversion Register
------------------------------------------------------------
MOV DX, 2EH
MOV AL, F2H
OUT DX, AL
MOV DX, 2FH
MOV AL, 00H ; Set GPIO is normal not inverter
OUT DX, AL
------------------------------------------------------------
Configure GPIO1 Data Register
------------------------------------------------------------
MOV DX, 2EH
MOV AL, F1H
OUT DX, AL
MOV DX, 2FH
MOV AL, ??H ; Put the output value into AL
OUT DX, AL
------------------------------------------------------------
Exit extended function mode |
------------------------------------------------------------
MOV DX, 2EH
MOV AL, AAH
OUT DX, AL
Summary of Contents for MIC-7900
Page 1: ...User Manual MIC 7900 Embedded Fan less IPC System 866 412 6278 CoastIPC com...
Page 11: ...Chapter 1 1 General Introduction This chapter gives background information on MIC 7900...
Page 16: ...MIC 7900 User Manual 6...
Page 28: ...MIC 7900 User Manual 18...
Page 29: ...Chapter 3 3 AMI BIOS Setup This chapter introduces how to set BIOS configuration data...
Page 77: ...Chapter 4 4 Software Installation This chapter introduces driver installation...
Page 82: ...MIC 7900 User Manual 72...
Page 83: ...Appendix A A Programming the Watchdog Timer...