[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: i/o on Par0



Hi,

>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.

Best Regards
/Mikael

-----Original Message-----
From: owner-dev-etrax@xxxxxxx.com">mailto:owner-dev-etrax@xxxxxxx.com] On Behalf Of Robert Hibberdine
Sent: Wednesday, August 06, 2003 5:40 PM
To: dev-etrax
Subject: i/o on Par0 


Hello,

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 
missed something.

Thanks.

Bob Hibberdine