Appendix D: Digital I/O Setting - ROHS EmETXe-i9652 User Manual

Table of Contents

Advertisement

Appendix

Appendix D: Digital I/O Setting

Below are the source codes written in assembly & C, please take them
for Digital I/O application examples. The default I/O address is 6Eh.
Assembly Code
mov
mov
mov
out
mov
mov
mov
out
mov
mov
mov
out
mov
mov
mov
out
mov
mov
mov
out
mov
mov
mov
out
;-------------------------------------------------------------
mov
mov
mov
out
ax,402h
dx,ax
al,00h
dx,al
ax,400h
dx,ax
al,0ffh
dx,ax
ax,404h
dx,ax
al,06eh
dx,ax
ax,403h
dx,ax
al,010h
dx,ax
ax,405h
dx,ax
al,0ffh
dx,ax
ax,402h
dx,ax
al,048h
dx,ax
ax,402h
dx,ax
al,00h
dx,al
; clear i2c bus
; clear i2c bus status
; Set I2C Device Address=6eh
;select GPIO 1 (index=10h)
;Set all GPIO 1 pin as output
;start write, active
; clear i2c bus
- 71 -

Advertisement

Table of Contents
loading

Table of Contents