NAR-5050/5070 Series User
’
s Manual
50
and bl,02h ; Other bits = 0 except Bit1
rol bl,02h ; Bit1 rotate to Bit3 for EBX_Bit[23..16]
mov bh,bl ; Temperoary save in BH
; Keep bit7,6,5,4,3,2 start ---------------------
mov bl,ch
and bl,04h ; Other bits = 0 except Bit2
rol bl,03h ; Bit2 rotate to Bit5 for EBX_Bit[23..16]
add bh,bl ; Add Bit2 of ch in BH
mov bl,ch
and bl,08h ; Other bits = 0 except Bit3
ror bl,01h ; Bit3 rotate to Bit2 for EBX_Bit[23..16]
add bh,bl ; Add Bit3 of ch in BH
mov bl,ch
and bl,10h ; Other bits = 0 except Bit4
rol bl,02h ; Bit4 rotate to Bit6 for EBX_Bit[23..16]
add bh,bl ; Add Bit4 of ch in BH
mov bl,ch
and bl,20h ; Other bits = 0 except Bit5
ror bl,04h ; Bit5 rotate to Bit1 for EBX_Bit[23..16]
add bh,bl ; Add BIt5 of ch in BH
mov bl,ch
and bl,40h ; Other bits = 0 except Bit6
rol bl,01h ; Bit6 rotate to Bit7 for EBX_Bit[23..16]
add bh,bl ; Add BIt6 of ch in BH
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,6,5,4,3,2 end -----------------------
add bl,bh ; Bit7,Bit5,Bit4,Bit3 and Bit1 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
; Bit1 of Ch end ---------------------------------
; Bit0 of Ch start ------------------------------
; GPIO34
; EBX_Bit[31..24] : GPDO Offset value = 08h,
; EBX_Bit[23..16] : GPO Data = Bit0 of Ch ---> Bit4 , 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# = 34h