Writing to the parallel port

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.

“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/momentics621_docs/neutrino/lib_ref/o/out8
..html) You are probably missing the call to ThreadCtl.

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/momentics621_docs/neutrino/lib_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.

“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/momentics621_docs/neutrino/lib_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.

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/momentics621_docs/neutrino/lib_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.

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/momentics621_docs/neutrino/lib_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.

\