Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

parallel port control in perl

Status
Not open for further replies.

001

Junior Member level 3
Junior Member level 3
Joined
Aug 31, 2004
Messages
30
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
288
Hello,
I am newbie in perl. I am currently working on a project to access the parallel port of a pc in perl on a linux operating system.

I really do not know where to start. Could anyone help me with useful links, books, resources..etc that could be of help in accessing the parallel port using perl. I need this urgently if i am to finish my project on time.

Thanks

001
 

Why you don't use google first?
see what google returns for "parallel port access in perl" :


h**p://search.cpan.org/~scott/Device-ParallelPort-1.00/lib/Device/ParallelPort.pm
h**p://linux.dd.com.au/quest/os-perl/parallelport/
h**p://www.lvr.com/jansfaq.htm

Q: How can I access ports using Perl?

A: (from Ron Glick)

You must have the Win32::API module (available at h**p://www.cpan.org) installed.

use Win32::API; #load API module to interface DLL's
$GetPortVal= new Win32::API("inpout32", "Inp32", , I); #import Inp32 from DLL
$SetPortVal= new Win32::API("inpout32", "Out32", [I,I], I); #import Out32 from DLL
$input= $GetPortVal->Call(0x378) & 255; #get and display current value of address 378 hex print "$input\n";
$return=$SetPortVal->Call(0x378,35); #set pins 2,3,7
$input= $GetPortVal->Call(0x378) & 255; #get and display updated value of address 378 hex
print "$input\n";
 

thanks, it is not comprehensive enough.i dont just want to use a module i want to write one that can access the port.

001
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top