Shop OBEX P1 Docs P2 Docs Learn Events
FemtoBasic and IR Buddy — Parallax Forums

FemtoBasic and IR Buddy

Mike GreenMike Green Posts: 23,101
edited 2007-04-02 17:51 in Propeller 1
You may have noticed the announcement that Bob Townsend (technical@irbuddystore.com) will be making the IR Buddy available again. I have several lying around and used them in some Stamp projects in the past. I've tried using them with the Propeller with no previous success using various values of series protective resistors (since it's a 5V part). Now I find that they use an open-drain output with a 2.2K pullup to +5V which can be connected directly to a Propeller pin and it works fine that way. You have to use the FullDuplexSerial driver which has a true open-drain mode. If you use the Simple_Serial driver, you run the risk of damaging a Propeller I/O pin since the Simple_Serial driver actively drives the transmit pin both high and low and only sets it to input mode after the stop bit is sent. The IR Buddy can hold its control line low for some time after a command is sent and, if another command is sent too soon, you may get a short between +3.3V and ground for up to several milliseconds. This can be avoided by checking for a high level on the control line before transmitting (if you use Simple_Serial) or by using a small value protective resistor (maybe 100 ohms ... not tested). You have to use a small enough series resistor so the voltage divider formed by the 2.2K pullup and the protective series resistor will pull the control line below the low threshold of the IR Buddy's processor when the Propeller sets a low output.

Attached is the modified FemtoBasic archive with a description of the additional statements near the end of the "FemtoBasic Notes" file and two sample programs translated from the Stamp IRB Loopback Test and the IRB RC-5 RX Monitor programs. This uses the FullDuplexSerial driver and doesn't require a protective series resistor.

Like other FemtoBasic variations, this is provided as an example of what can be done and how to do it as well as a tool for experimenting with the IR Buddy or even developing remote control applications.

Update: Corrected IRB Loopback Test

Post Edited (Mike Green) : 4/2/2007 8:58:12 PM GMT
Sign In or Register to comment.