|
|
| Next: GtkTextView and repaint |
| Author |
Message |
brasilino External

Since: Aug 04, 2007 Posts: 2
|
Posted: Sat Aug 04, 2007 7:57 am Post subject: How to set (and reset) pins of parallel port of a usb-to-parallel device with Linux? Archived from groups: comp>os>linux>development>apps (more info?) |
|
|
Hi All:
I need to interface my computer to a digital circuit and I'm needing
to control (reading, setting and resetting) the pins
of a usb-to-parallel port device that uses usblp kernel module (kernel
2.6.21). After googling around I did not figure out
how to do it.
How can I do that? Is there any ioctl()'s call ? Or some way to get an
address to use outb() and inb() ??
Thanks a lot in advance.
Lucas Brasilino |
|
| Back to top |
|
 |
brasilino External

Since: Aug 04, 2007 Posts: 2
|
Posted: Sat Aug 04, 2007 5:33 pm Post subject: Re: How to set (and reset) pins of parallel port of a usb-to-parallel device with Linux? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Hi Jan:
> It's just not possible. USB<->Centronics converters aren't just "port pins"
> as built-in ports. Like USB<->RS232 converters, they do all the handshaking
> on the remote device side alone. The host computer cannot control their
> port pins directly.
>
> Short: If you don't connect a printer to a USB<->Centronics converter, it
> won't work at all.
Thanks for your answer.
Well, it is not possible since USB<->Centronics kernel module (usblp)
does not
implement this kind of 'pin control', right? But it is possible to
write a kernel module
which implements, for example, some proc files that it's content is
written directly
to pins, ie, a file like /proc/lp/strobe that when:
echo 1 > /proc/lp/strobe
the strobe pin is set, isn't it?
regards
Lucas Brasilino |
|
| Back to top |
|
 |
John Hasler External

Since: Mar 25, 2004 Posts: 1337
|
Posted: Sat Aug 04, 2007 9:08 pm Post subject: Re: How to set (and reset) pins of parallel port of a usb-to-parallel device with Linux? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Lucas Brasilino writes:
> Well, it is not possible since USB<->Centronics kernel module (usblp)
> does not implement this kind of 'pin control', right?
It is alos possible that the firmware in the converter does not permit it.
--
John Hasler
john RemoveThis @dhh.gt.org
Dancing Horse Hill
Elmwood, WI USA |
|
| Back to top |
|
 |
Jan Kandziora External

Since: Dec 25, 2004 Posts: 172
|
Posted: Sat Aug 04, 2007 11:36 pm Post subject: Re: How to set (and reset) pins of parallel port of a usb-to-parallel device with Linux? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
brasilino.RemoveThis@yahoo.com schrieb:
> Hi All:
>
> I need to interface my computer to a digital circuit and I'm needing
> to control (reading, setting and resetting) the pins
> of a usb-to-parallel port device that uses usblp kernel module (kernel
> 2.6.21). After googling around I did not figure out
> how to do it.
>
It's just not possible. USB<->Centronics converters aren't just "port pins"
as built-in ports. Like USB<->RS232 converters, they do all the handshaking
on the remote device side alone. The host computer cannot control their
port pins directly.
Short: If you don't connect a printer to a USB<->Centronics converter, it
won't work at all.
Kind regards
Jan |
|
| Back to top |
|
 |
Jan Kandziora External

Since: Dec 25, 2004 Posts: 172
|
Posted: Sun Aug 05, 2007 10:37 pm Post subject: Re: How to set (and reset) pins of parallel port of a usb-to-parallel device with Linux? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
brasilino.DeleteThis@yahoo.com schrieb:
> But it is possible to
> write a kernel module
> which implements, for example, some proc files that it's content is
> written directly
> to pins, ie, a file like /proc/lp/strobe that when:
>
> echo 1 > /proc/lp/strobe
>
> the strobe pin is set, isn't it?
>
No, the converters available most certainly do not support such a function.
They expect a data block to be sent through the USB wire, buffer it, and do
*all* the handshaking on the Centronics wire itself. No need to let the
computer control a wire directly, so there most certainly no command to
advice it to do so.
Find out which controller chip your converter uses and get and read its
datasheet.
Kind regards
Jan |
|
| Back to top |
|
 |
|
|
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
| |
|
|