Author Topic: LPT port base addresses?  (Read 12970 times)

Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: LPT port base addresses?
« Reply #15 on: June 10, 2009, 12:38:37 pm »
Hello

We tested 3BC port. All works perfect. Our external test device changes LED signals according check boxes in LPTDemo.

I have idea.

Please add into LPTDemo new button "Send" with following handler.

Code: [Select]
procedure TForm1.Button2Click(Sender: TObject);
var s:string;
    i:integer;
begin
  s := 'Testing the LPT'#26;
  for i := 1 to Length(s)
    do nrLpt1.SendChar(s[i]);
end;

You can try to play with control lines (pin check boxes)

Roman Novgorodov
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

chedges

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
Re: LPT port base addresses?
« Reply #16 on: June 11, 2009, 07:02:00 am »
I've tried that test on both machines and again, the second laptop still does not print :(

unchecking the pins and clicking refresh resets all of the data pins back to checked.
All 8 data pins are checked like the screenshot on the previous post


chedges

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
Re: LPT port base addresses?
« Reply #17 on: June 11, 2009, 08:04:12 am »
Ok, I've finally made some progress with the laptop that doesn't work.

It's a IBM Thinkpad and the port is non-ECP be default.

I changed the BIOS setting from Bi-Directional to ECP and now the the SendChar method works and I can print.
I'll check to see if the SendString method works but I suspect it will.

Is there some critical difference between ECP and non-ECP ports?

Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: LPT port base addresses?
« Reply #18 on: June 11, 2009, 10:50:21 am »
Hello

It's good.
I told you early to check LPT mode in BIOS :-)

About LPT modes you start read here
http://en.wikipedia.org/wiki/IEEE_1284

Roman Novgorodov
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

chedges

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
Re: LPT port base addresses?
« Reply #19 on: June 12, 2009, 03:01:25 am »
ok, ok, you win! ;) I thought Bi-directional is the correct setting  :P

Is there any way to detect if the port is set to ECP or not? I guess I need to be able to check in my application

Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: LPT port base addresses?
« Reply #20 on: June 15, 2009, 02:53:57 am »
Hello

The terrible wild russians win or die always. ;-) Joke!

I don't have useful thoughts about how it can be done.
I think LPT mode is controller or driver specific feature.
And if you will find a solution for chipset of your ThinkPad, this solution will not work on Toshiba or Sony notebooks.

Roman Novgorodov

DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.