August 04, 2020, 10:22:53 am

News:

SMF - Just Installed!


LPT port base addresses?

Started by chedges, April 27, 2009, 04:37:38 pm

Previous topic - Next topic

Roman Novgorodov

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.


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

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

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

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

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

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.