Description ----------- This component lets you write and read a byte to/from the parallel port (LPT1/LPT2), controlling if any error has ocurred Note: It only works under Windows 95 and Windows 98. Index: - Events - Register - Properties - Methods - Parallel port (c) Xavier Cirac. All rights reserved mail: Installation ------------ To Install tparport you have to do the next steps: If you have Delphi 4.0 you only have to install the tparport package doing EXACTLY: -Component Install Packages Add ...and Browse for the parprtpk4.bpl file Check the option "Build with runtime packages" (Must be enabled) ...and Browse for the parprtpk4.dcp file Check the option "default" (Must be enabled) OK -Copy the file parprtpk4.bpl to your Windows\System If you have Delphi 3.0 you only have to install the tparport package doing EXACTLY: -Component Install Packages Add ...and Browse for the parprtpk.dpl file Check the option "Build with runtime packages" (Must be enabled) ...and Browse for the parprtpk.dcp file Check the option "default" (Must be enabled) OK -Copy the file parprtpk.dpl to your Windows\System If you have Delphi 2.0 you will have to do: -Component -Install -Add (and Browse for the parport.dcu file) If you have C++Builder 1.0 you will have to do: -Component -Install -Add (and Browse for the parport.obj file) Note: Remember that you have to install tparport to a directory accessible by Delphi (check the Delphi menu option Tools/Environment Options/Library/Library Path). If the directory where you have installed tparport is not listed there try to add it or to copy tparport files to any of the listed directories. ...and that's all. If setup succeeds you will see a new palette called UsefulTools Register -------- Why should I register this component? First of all, this component is shareware, so if after you have tried it, you like it or you are going to use it, you have to register it. Otherwise you will be violating the copyright laws. Besides, you shold think that this component has been developed by a delphi programmer like you, and nobody likes to work without any result (in this case, your little fee), so if you register it you will make me a happier person (and you will be as well, because you will do the correct thing). The fee for this component is only 35 US $. There are two ways to register TParport VCL component: 1.- Via online registration : You can register this component from Qwerks Shareware Registration Services. Transactions are via Credit Card with the option of making the purchase over a secure server, via an U.S. tool free phone or fax. To do it this way please visit tparport web page : http://www.waveflow.com/vcl.htm 2.-Filling the Registration Form and sending me the money (35 $US) to the next postal address: Xavier Cirac Vidal Batlles , 4 Premia de Mar , 08330 Barcelona SPAIN Once I get your registration mail I will e-mail you with the source code and a sample demo (also with source code). Registration Form ----------------- Please Print the next form and fill in the information (if applicable) when you send me the registration letter: Company: _________________________________________ Name: _________________________________________ E-Mail: _________________________________________ Address: _________________________________________ City: _________________________________________ State/Province: _________________________________ Country: _________________________________________ Optional Where did you find TParport? _____________________________________________________ What are you using TParport for? _____________________________________________________ Properties ---------- LPT_Used: LPT1 or LPT2 LPT1_address: address of LPT1 output port (default 378h) LPT2_address: address of LPT2 output port (default 278h) Name: Name of the component ValueGet:byte value returned when the method Get is called. ValueSend:byte value sent when the method send is called. Status: Returns the value if as if the device connected to the tparport were a printer and represents the next bits: 7.-Busy 6.-ACK_ 5.-PE 4.-SLCT 3.-Error_ 2.-X2 1.-X1 0.-X0 Methods ------- Create: Creates the component Get: Returns the 5 bits input from the Parallel Port example1: parport1.get; showmessage(inttostr(parport1.valueget)); example2.- st:=parport1.get; showmessage(inttostr(st)); Send: Sends a byte to the Parallel Port example: parport1.valuesend:=255; partport1.send; Events ------ OnError :Happens if an error occurs OnBeforeSend :Before sending the byte with the method Send. OnAfterSend :After the byte has been sent with the method Send. OnBeforeGet : Before the byte has been received with the method Get. OnAfterGet :After the byte has been received with the method Get. Parallel Port ------------- Here it is described the pin connection youwill have to use to send/get to/from the Parallel Port: Output (8 bits): Bit/Pin 0/2 1/3 2/4 3/5 4/6 5/7 6/8 7/9 Input (5 bits): Bit/Pin 0/- 1/- 2/- 3/15 4/13 5/12 6/10 7/11 Note that the 3 first bits are not used, but you don't have to worry for the binary conversion because Tparport makes it for you. You will only have to work as if there were only 5 bits: 15,13,12,10,11. Ground (GND) 18 19 20 21 22 23 24 25