Could somebody help me with following code. Problem is that I don't know where to put or how to include code which enables pins 4-7 (MAX187 takes power from pins)
So, pins 4-7 have to be enabled before trying to read data from LPT port connected MAX187. That's problem. I can't do it.
------------------------------------------------------------------------
------------------------------------------------------------------------
asm
PUSH EBX
PUSH ECX
PUSH EDX
xor ebx,ebx
mov ecx,12
xor eax,eax
mov edx,370h
out dx,al
//*****************
add dx,9
@Tsek: // Here it stucks if pins 4-7 are not enabled
in al,dx
and al,20h
jz @Tsek
//*****************
@LuePorttia_12x:
shl bx,1
dec dx
mov al,2
out dx,al
xor al,al
out dx,al
inc dx
in al,dx
and al,20h
jz @zero
inc bx
@zero:
loop @LuePorttia_12x
//*****************
mov al,1
dec dx
out dx,al
mov[jannite],bx
MOV DX,0378H // enables pins 4-7
MOV AL,60 //
OUT DX,AL //
POP EDX
POP ECX
POP EBX
end;
------------------------------------------------------------------------
So, pins 4-7 have to be enabled before trying to read data from LPT port connected MAX187. That's problem. I can't do it.
------------------------------------------------------------------------
------------------------------------------------------------------------
asm
PUSH EBX
PUSH ECX
PUSH EDX
xor ebx,ebx
mov ecx,12
xor eax,eax
mov edx,370h
out dx,al
//*****************
add dx,9
@Tsek: // Here it stucks if pins 4-7 are not enabled
in al,dx
and al,20h
jz @Tsek
//*****************
@LuePorttia_12x:
shl bx,1
dec dx
mov al,2
out dx,al
xor al,al
out dx,al
inc dx
in al,dx
and al,20h
jz @zero
inc bx
@zero:
loop @LuePorttia_12x
//*****************
mov al,1
dec dx
out dx,al
mov[jannite],bx
MOV DX,0378H // enables pins 4-7
MOV AL,60 //
OUT DX,AL //
POP EDX
POP ECX
POP EBX
end;
------------------------------------------------------------------------