85
PCA-6782 User Manual
Appendix C
P
rogramming
the
G
PIO
C.1.2
GPIO Example Program-1
------------------------------------------------------------
Enter the extended function mode, interruptible double-write
------------------------------------------------------------
MOV DX, 2Eh
MOV AL, 87h
OUT DX, AL
OUT DX, AL
------------------------------------------------------------
Configure logical device 7(GP10~GP17), 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
MOV DX, 2Eh
MOV AL, F0h
OUT DX, AL
MOV DX, 2Fh
MOV AL, 00h; 01: Input, 00: output for GP10~GP17
OUT DX, AL
MOV DX, 2Eh
MOV AL, F2h ;
OUT DX, AL
MOV DX, 2Fh
MOV AL, 00h; Set GPIO is normal not inverter
OUT DX, AL;
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
Содержание PCA-6782
Страница 7: ...PCA 6782 User Manual viii...
Страница 12: ...Chapter 1 1 Hardware Configuration...
Страница 22: ...Chapter 2 2 Connecting Peripherals Jumper Settings...
Страница 38: ...Chapter 3 3 AMI BIOS Setup...
Страница 56: ...Chapter 4 4 Value Added Software Services...
Страница 60: ...Chapter 5 5 Chipset Software Installation Utility...
Страница 63: ...PCA 6782 User Manual 52...
Страница 64: ...Chapter 6 6 Integrated Graphic Device Setup...
Страница 66: ...Chapter 7 7 LAN Configuration...
Страница 68: ...Appendix A A Programming the Watchdog Timer...
Страница 76: ...Appendix B B I O Pin Assignments...
Страница 94: ...Appendix C C Programming the GPIO...