NAR-5050/5070 Series User
’
s Manual
45
mov bl,37h ; EBX_Bit[7..0] = 37h
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,40h ; Other bits = 0 except Bit6
rol bl,01h ; Bit6 rotate to Bit7 for EBX_Bit[23..16]
mov bh,bl ; Temperoary save in BH
; Keep bit7 start ---------------------
mov bl,ch ; Bit7 of Ch needs to be saved since Programmed
and bl,80h ; Other bits = 0 except Bit7
ror bl,07h ; Bit7 rotate to Bit0 for EBX_Bit[23..16]
; Keep bit7 end ---------------------
add bl,bh ; Bit7 and Bit6 of Ch programmed
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
; ; Bit6 of Ch end ---------------------------------
; Bit5 of Ch start ------------------------------
; GPIO31
; EBX_Bit[31..24] : GPDO Offset value = 08h,
; EBX_Bit[23..16] : GPO Data = Bit5 of Ch ---> Bit1 , 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# = 31h
mov bl,31h ; EBX_Bit[7..0] = 31h
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