[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: i/o on Par0
>1. Use manual mode par0. If I switched things like dma off am I right in
>assuming I can monitor my relays just by reading the relevant register
>bits for par0 input?
Yes, in R_PAR0_STATUS_DATA. You also have to make sure that the oe bit
in R_PAR0_CTRL_DATA is disabled.
>2. Uses an amended gpio driver to read the levels of the data pins of
>par0 on every timer interrupt.
Sure, the data is also readable by the GPIO driver if you disable
the parallel port.
Keep in mind that all 8 databits in the parallel port always have
the same direction.
You may get some hints from http://developer.axis.com/doc/software/linux/device_drivers-howto.html.
From: firstname.lastname@example.org">mailto:email@example.com] On Behalf Of Robert Hibberdine
Sent: Wednesday, August 06, 2003 5:40 PM
Subject: i/o on Par0
I want to use the par0 port to monitor the levels (0 - 5v) of 8 relay
outputs (actually, I'm counting pulses). To do this I intend to
1. Use manual mode par0. If I switched things like dma off am I right in
assuming I can monitor my relays just by reading the relevant register
bits for par0 input?
2. Uses an amended gpio driver to read the levels of the data pins of
par0 on every timer interrupt.
Is this ok?
I'm a complete beginner in parallel port programming so I may have