PDA

View Full Version : Girder & home made IR receiver?



Mark F
October 13th, 2002, 04:55 PM
Bottom line:
Any support for the Tweakhardware IR receiver device, that is written EXCLUSIVELY as a Girder plugin, may use a large amount of CPU. More important for YOUR situation, the IR input will be non-deterministic and software DVD will probably suffer.

Very long and boring explanation:
In the tweakhardware design, the IR information is placed on one of the handshaking lines of the com port instead of in the data buffer. This means the supporting software must either poll the port continuously at a rate where it won't miss edge transitions (using large amounts of CPU) OR it has to set up a thread which sleeps and waits for handshaking events (these events are not time stamped). Either way, the code is dispatched at the whim of the Windows scheduler. The Windows scheduler is not a real time scheduler so the basic rule is "your code may run sometime". (non-deterministic) To increase the chances of being dispatched when it should, most programmers increase the priority of their thread to a high value. If you add a task with a high priority CPU-hog thread to a system which is decoding DVD in software, the DVD picture will probably studder and the sound may break up with any press of a button.

I don't know how much you know, or want to know :smile:, about the Windows family of operating systems but this is the IR equivilent of a WinModem. It includes just enough hardware to talk to the outside world and then relies on a very stable and deterministic host CPU environment to decode the data. To get to such an environment under Windows, a device driver, tuned to the specific task, is required. Inside a device driver, software can do whatever it wants and WILL be dispatched in a "timely" manner to handle the interrupts generated by the device. By writing a device driver (or possibly just a port driver) to replace the default VCOM processing and a Girder plugin to use this new driver, someone could support this device with minimal interference to the rest of the environment. The problem - A device or port driver is not a simple piece of code to write CORRECTLY and will do EXTREME things to a system if written poorly.

My advice (as if you asked for it :smile: ) - if you can build one of the designs which use a uC (like the PIC-based UIRT (http://people.a2000.nl/rwvgesse/FixFrame.htm?Uirt.htm) design), do it.

Mark F
October 13th, 2002, 04:55 PM
Richard - Where's the fun in that? :smile:

_________________
Mark F

<font size=-1>[ This Message was edited by: Mark F on 2001-08-15 19:57 ]</font>

oe1k
October 13th, 2002, 04:55 PM
You can also use the in-circuit programmable UIR or the new UIRT (that sends too, see http://www.girder.nl/phpBB/viewtopic.php?topic=409&forum=3&7 ) at http://people.a2000.nl/rwvgesse/ (so you don't need to use a PIC programmer.)
The advantage of the UIR/irMan devices over the simpler devices (such as the tweakhardware one) that don't need a microcontroller (the PIC chip) is that the simple ones use your CPU constantly and the UIR doesn't.

oe1k
October 13th, 2002, 04:55 PM
Or, just fork out the $22 (http://www.ir4pc.com/ ) or $35 (http://www.evation.com/irman/index.html )
for a commercial design.

oe1k
October 13th, 2002, 04:55 PM
Well, the fun then is in prgramming Girder to do what you want, of course!
(Unless you are a poor student like me, then you have to build one...)

nuthead
October 13th, 2002, 04:55 PM
has anyon tried Girder with a homemade IR receiver? If so, I would like to look at the schematics, please leave URL if possible.

This is the one I tried last night:
http://www.tweakhardware.com/guide/remote/


Also very similar model from LIRC, the same but without the capacitors:
http://lirc.domainbg.com/receivers.html

if anyone has done this, please let me know which plugin you use. Even if you did a different project, I would like to hear about it...

Thanks in advance

nuthead
October 13th, 2002, 04:55 PM
Thanks oe1k

Do you know if the tweakhardware model uses 100% CPU, or any substantial CPU load?

The reason i am still looking at that one is because is easier to build, as I have no experience in constructing hardware since middle and high school. However, it seems very simple.

You make a very important point, because my computer will need to handle the remote and things like software DVD playback.

Thanks again

Angus
October 13th, 2002, 04:55 PM
Hi there,

I made the reciever at http://www.geocities.com/SiliconValley/Sector/3863/uir/

It works really well and is very small, although I did have to build my own PIC programmer as well!

Angus