[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: reading from parallel port
Dhiman, Gaurav wrote:
What exactly you want to do with this,...
Optical pulse generator (optical potentiometer) generates pulses on two
pins (A,B) when it is turned; CW pulse on pin A are precedes pulse on B
pin and vice versa for CCW. By detecting both pulses we can determine in
which direction pot is turning.
...
If I understood your problem properly, I think this should solve it.
After giving it some thought I concluded that this can not be done
without the use of interrupts, which my previous design lacked. So by
using two interrupts I can easily detect pulse on one pin and then check
the other to see which direction pot is turning...
I guess I'll for something similar you suggested, but it is not doable
with parallel port, but that no problem since my final design is for
embedded target with plenty of irq capable GPIOs. I used parallel port
was as intermediate step for testing.
Thanx,
h
--
hinko <dot> kocevar <at> iskramedical <dot> si
Hinko Kocevar, developer
Iskra Medical d.o.o., Stegne 23, 1k LJ, SLO-EU
"Aì rén" | [Analects XII:22]
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/