Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

LPT Port Use?

speedscootspeedscoot Posts: 11Member
The 2nd to the 9th pin on the 25pin LPT port has 5v between each one and one of the ground pins : 16-25 if I turn them on. But how can I activate it in Pascal?

In C I can use: outportb(PORT,val); Is there a similar function in Pascal?

Comments

  • ASHLEY4ASHLEY4 Posts: 254Member
    : The 2nd to the 9th pin on the 25pin LPT port has 5v between each one and one of the ground pins : 16-25 if I turn them on. But how can I activate it in Pascal?
    :
    : In C I can use: outportb(PORT,val); Is there a similar function in Pascal?
    :

    Try

    port[0x378]:=$01;

    \|///
    (@@)
    ASHLEY4.

  • ruangrojruangroj Posts: 1Member
    : : The 2nd to the 9th pin on the 25pin LPT port has 5v between each one and one of the ground pins : 16-25 if I turn them on. But how can I activate it in Pascal?
    : :
    : : In C I can use: outportb(PORT,val); Is there a similar function in Pascal?
    : :
    :
    : Try
    :
    : port[0x378]:=$01;
    :
    : \|///
    : (@@)
    : ASHLEY4.


    ***********************
    ///Pascal
    1.Mem[seg:off]:=$10; //put data 1 byte to address[seg:off]
    2.v1:=MemW[seg:off]; //put data 2 bytes from address[seg:off] to v1
    3.v1:=MemL[seg:off]; //put data 4 bytes from address[seg:off] to v1
    4.port[No.]:=$10 //put data 1 byte to port number...
    5.portw[No.]:=$1234 //put data 2 bytes to port number...
    ///Delphi sample
    procedure setdsp(mode : word); assembler;
    asm
    mov ax, mode
    int 10h
    end;

    Ruangroj






  • speedscootspeedscoot Posts: 11Member
  • speedscootspeedscoot Posts: 11Member
    I've got it working, but forgot to ask how to input data. The lpt port also has pins for paper feed and error... if i want do send data to the computer with them. Do i have to ground them, or put logic 1 (3.5volts) on them? Don't want to blow my motherboard!!!
  • SniffeXSniffeX Posts: 9Member
    : ///Delphi sample
    : procedure setdsp(mode : word); assembler;
    : asm
    : mov ax, mode
    : int 10h
    : end;
    :
    : Ruangroj
    :
    :this will crach the computer under w95 w98 and maybe not work under NT
    this for setting screen mode like
    setdsp($13); is mode 320x200x256 colours and its for real mode not protected mode or kind of .

    you have to be carefuly on sample you send because this one may
    cause several problems on someone computer.

    Just Dont try it.
    :
    :
    :
    :
    :

  • ibyiby Posts: 323Member
    : I've got it working, but forgot to ask how to input data. The lpt port also has pins for paper feed and error... if i want do send data to the computer with them. Do i have to ground them, or put logic 1 (3.5volts) on them? Don't want to blow my motherboard!!!
    :


    Reasonable concern... Buy extra LPT port or
    better USB>LPT convertor.

    Iby
Sign In or Register to comment.