Writing to the parallel port

bridged with qdn.public.ddk.printer
Post Reply
Neil

Writing to the parallel port

Post by Neil » Sat Mar 29, 2003 9:06 pm

My program crashes on the out8 call to the parallel port address. I have
to send data and strobe. Is there port initializing need. Does someone
have sample code. I am only using single thread.

Mario Charest

Re: Writing to the parallel port

Post by Mario Charest » Sun Mar 30, 2003 10:46 am

"Neil" <nlpatzwa@sfu.ca> wrote in message
news:b651tb$9ff$1@tiger.openqnx.com...
My program crashes on the out8 call to the parallel port address. I have
to send data and strobe. Is there port initializing need. Does someone
have sample code. I am only using single thread.
As the doc says
(http://www.qnx.com/developer/docs/momen ... ref/o/out8
..html) You are probably missing the call to ThreadCtl.

>

David Gibbs

Re: Writing to the parallel port

Post by David Gibbs » Mon Mar 31, 2003 4:11 pm

Mario Charest <postmaster@127.0.0.1> wrote:
"Neil" <nlpatzwa@sfu.ca> wrote in message
news:b651tb$9ff$1@tiger.openqnx.com...
My program crashes on the out8 call to the parallel port address. I have
to send data and strobe. Is there port initializing need. Does someone
have sample code. I am only using single thread.

As the doc says
(http://www.qnx.com/developer/docs/momen ... ref/o/out8
.html) You are probably missing the call to ThreadCtl.
And, do you need to directly access the parallel port hardware yourself?
Would running devc-par and using open/write/devctl work for you?

-David
--
QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

Mario Charest

Re: Writing to the parallel port

Post by Mario Charest » Mon Mar 31, 2003 7:12 pm

"David Gibbs" <dagibbs@qnx.com> wrote in message
news:b69pbn$pna$3@nntp.qnx.com...
Mario Charest <postmaster@127.0.0.1> wrote:

"Neil" <nlpatzwa@sfu.ca> wrote in message
news:b651tb$9ff$1@tiger.openqnx.com...
My program crashes on the out8 call to the parallel port address. I
have
to send data and strobe. Is there port initializing need. Does someone
have sample code. I am only using single thread.

As the doc says

(http://www.qnx.com/developer/docs/momen ... ref/o/out8
.html) You are probably missing the call to ThreadCtl.

And, do you need to directly access the parallel port hardware yourself?
Would running devc-par and using open/write/devctl work for you?
And, if you are not using devc-par make sure it's not running, otherwise
both programs could try to control the port at the same time.
-David
--
QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

Neil

Re: Writing to the parallel port

Post by Neil » Mon Mar 31, 2003 8:21 pm

The hardware I am trying to write to (by the documentation), requires that
we write a number (0-255) and strobe. I am afraid if I just write to the
port, that will not be sufficient. The original implementation is in Linux
and I am trying to the same in QNX.




Mario Charest wrote:

"David Gibbs" <dagibbs@qnx.com> wrote in message
news:b69pbn$pna$3@nntp.qnx.com...
Mario Charest <postmaster@127.0.0.1> wrote:

"Neil" <nlpatzwa@sfu.ca> wrote in message
news:b651tb$9ff$1@tiger.openqnx.com...
My program crashes on the out8 call to the parallel port address. I
have
to send data and strobe. Is there port initializing need. Does someone
have sample code. I am only using single thread.

As the doc says

(http://www.qnx.com/developer/docs/momen ... ref/o/out8
.html) You are probably missing the call to ThreadCtl.

And, do you need to directly access the parallel port hardware yourself?
Would running devc-par and using open/write/devctl work for you?

And, if you are not using devc-par make sure it's not running, otherwise
both programs could try to control the port at the same time.


-David
--
QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

Jens H Jorgensen

Re: Writing to the parallel port

Post by Jens H Jorgensen » Mon Mar 31, 2003 10:16 pm

It is pretty easy to access the parallel port under QNX. But you should slay
devc-par before you read write the parallel port. We have an application
which uses the parallel port in ECP mode to communicate with another PC and
it works great.

--
Jens



"Neil" <nlpatzwa@sfu.ca> wrote in message
news:b6a80g$teg$1@tiger.openqnx.com...
The hardware I am trying to write to (by the documentation), requires that
we write a number (0-255) and strobe. I am afraid if I just write to the
port, that will not be sufficient. The original implementation is in Linux
and I am trying to the same in QNX.




Mario Charest wrote:


"David Gibbs" <dagibbs@qnx.com> wrote in message
news:b69pbn$pna$3@nntp.qnx.com...
Mario Charest <postmaster@127.0.0.1> wrote:

"Neil" <nlpatzwa@sfu.ca> wrote in message
news:b651tb$9ff$1@tiger.openqnx.com...
My program crashes on the out8 call to the parallel port address. I
have
to send data and strobe. Is there port initializing need. Does
someone
have sample code. I am only using single thread.

As the doc says


(http://www.qnx.com/developer/docs/momen ... ref/o/out8
.html) You are probably missing the call to ThreadCtl.

And, do you need to directly access the parallel port hardware
yourself?
Would running devc-par and using open/write/devctl work for you?

And, if you are not using devc-par make sure it's not running, otherwise
both programs could try to control the port at the same time.


-David
--
QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.




Post Reply

Return to “qdn.public.ddk.printer”