NAR-5050/5070 Series User
’
s Manual
44
out dx,al
mov dx,Data_IO_Port
in al,dx
mov bh,al ; High Byte I/O Base Addr --> BH
mov dx,Index_IO_Port
mov al,61h ; Read Index 61h
out dx,al
mov dx,Data_IO_Port
in al,dx
mov bl,al ; High Byte I/O Base Addr --> BL
mov dx,bx ; Load Base Addr to DX
rol edx,10h ; Save I/O Base Addr,to EDX_Bit[31..16]
;GPO_OUT Step 3 : Out GPO_Bit Bit-by-bit way
; Bit7 of Ch start ------------------------------
; GPIO30
; EBX_Bit[31..24] : GPDO Offset value = 08h,
; EBX_Bit[23..16] : GPO Data = Bit7 of Ch ---> Bit0 , other bits --> 0
; EBX_Bit[15..8] : GPCFG1(LDN07_Index_F1h) Data = ( read value ) or 07h
; EBX_Bit[7..0] : GPSEL (LDN07_Index_F0h) Data , Port# and Pin# = 30h
mov bl,30h ; EBX_Bit[7..0] = 30h
mov dx,Index_IO_Port ; Read Index F1h first
mov al,GPCFG1
out dx,al
mov dx,Data_IO_Port
in al,dx
or al,07h ; OR 07h
mov bh,al ; EBX_Bit[15..8]
ror ebx,10h ; Swap EBX high and low word
mov bl,ch
and bl,80h ; Other bits = 0 except Bit7
ror bl,07h ; Bit7 rotate to Bit0 for EBX_Bit[23..16]
mov bh,GPDO3 ; EBX_Bit[31..24]
rol ebx,10h ; Restore the Swap of EBX high and low word
call LOOP_GPO_BITS ; call output GPDO
; Bit7 of Ch end ---------------------------------
; ; Bit6 of Ch start ------------------------------
; ; GPIO37
; ; EBX_Bit[31..24] : GPDO Offset value = 08h,
; ; EBX_Bit[23..16] : GPO Data = Bit6 of Ch ---> Bit7 , other bits --> 0
; ; EBX_Bit[15..8] : GPCFG1(LDN07_Index_F1h) Data = ( read value ) or 07h
; ; EBX_Bit[7..0] : GPSEL (LDN07_Index_F0h) Data , Port# and Pin# = 37h