NAR-5050/5070 Series User
’
s Manual
43
; GPCFG1 : Index 0F1h from GPIO LDN ; Set GPIO direction, type, ;
; GPDO3 : Offset from I/O base Addr. for GPIO = 08h ;
; GPDI3 : Offset from I/O base Addr. for GPIO = 09h ;
; ;
; Input : DH : bit 7 : GPO30 : PPAP-LED2 D16 ;
; 6 : GPO37 : PPAP-LED2 D15 ;
; 5 : GPO31 : PPAP-LED2 D14 ;
; 4 : GPO36 : PPAP-LED2 D13 ;
; 3 : GPO32 : PPAP-LED2 D12 ;
; 2 : GPO35 : PPAP-LED2 D11 ;
; 1 : GPO33 : PPAP-LED2 D10 ;
; 0 : GPO34 : PPAP-LED2 D9 ;
; ;
; Return : None ;
;-----------------------------------------------------------------------;
GPO_OUT_BYTE_DH PROC NEAR
push edx
push ebx
push ax
push cx
mov ch,dh ; Save dh, Twd , value in ch
;GPO_OUT Step 1 : Enable GPIO function ( Set GPIO_Index-30h_Bit0 )
mov dx,Index_IO_Port ; Point to GPIO_LDN ( LDN = 7 )
mov al,07
out dx,al
mov dx,Data_IO_Port
mov al,GPIO_LDN
out dx,al ;
mov dx,Index_IO_Port ; Read Index 30h First
mov al,30h
out dx,al
mov dx,Data_IO_Port
in al,dx
or al,01h ; Set Bit0 to 1
mov ah,al ; keep in AH
mov dx,Index_IO_Port
mov al,30h
out dx,al
mov dx,Data_IO_Port
mov al,ah
out dx,al ; Index30h_bit0P1
;GPO_OUT Step 2 : Read GPIO I/O Base Address
; ( Index-60h contains A15---A8, Index-61h contains A7---A0 )
mov dx,Index_IO_Port ; Read Index 60h
mov al,60h