I am making my own IR receiver and I'm trying to program software for it to handle the signals sent by the remote control. I've spent a few dyas on the internet collecting information about the parallel port and infrared signals in general and I also studied some examples of how to make such an IR receiver. I am using a Windows XP pc, and because I don't have a serial port in my pc I have to use the parallel port for this matter.
I have run into a problem now though. I know how to get the data from the parallel port (I'm using inpout32.dll, because the normal method doesn't work anymore since Win NT), but I don't know how exactly I should get the signals at the right time. For example, I could run an eternal while loop and check the state (high/low) of the acknowledge bit. But then we have the problem that I don't know when I exactly get a new signal, there is no measurement of time. Then I thought I could use a timer to execute the command every 1/40000 sec (remote controls work on 40Khz), however, there are no timers in multitask environments which are that accurate. After that, well, I kinda ran out of ideas at that moment. It just seemed to be impossible to read the signals at the right time.
So my question to you is: how did you get reliable parallel port support for IR-receivers and do you know if it is possible to construct such a program in Windows? If you could provide me with detailed information about this and some recommendations, I would greatly appreciate it. In the FAQ I read that the parallel port uses interrupt signals on the rising edge of the signal, so I think one part of the solution lies there, but how could I implement that in a program?
Thanks in advance,
Floris van Nee