Shop OBEX P1 Docs P2 Docs Learn Events
Infrared, Need sugestions — Parallax Forums

Infrared, Need sugestions

Joshua PetersJoshua Peters Posts: 5
edited 2008-03-04 21:03 in BASIC Stamp
Ive been intereasted with Infread ever since ive gotten my Boe-bot, anyway, ive been researching Infrared remotes and how they work. I now that the IR LED blinks very fast at 38.5 KHz, I was also thinking·if the Stamp could record the IR pulses with the IR receiver. Im not sure how this would work just give me some sugestions.

Joshua Peters
Age: 14

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-04 02:30
    First of all, if you haven't looked at it yet, download the "IR Remote for the BoeBot" tutorial.

    The Stamp is not fast enough to record the actual 38.5KHz IR pulses. The IR detector that the BoeBot uses has its own 38.5KHz detector. It signals the presence of groups of IR pulses at a 38.5KHz rate, not the individual IR pulses themselves. Have a look at the diagrams in the tutorial.
  • Joshua PetersJoshua Peters Posts: 5
    edited 2008-03-04 20:49
    Yeah but what about microcontrollers in the TV those are the same arent they?
  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-04 21:03
    Well, all microcontrollers are not alike. In this case, the Stamps are made with either a PIC microcontroller made by Microchip (BS1 and BS2) or an SX microcontroller made by Ubicom (all other BS2 models). All of the Stamps have a program built into them from the factory which is an interpreter of compiled Stamp Basic programs. The interpretation process gives you a lot of advantages ... fancy statements compiled into compact byte codes, debug support, multiple precision arithmetic (16 bit vs. 8 bit) and operators not in the actual hardware (like multiplication and division) ... but cost you in execution speed. For an example of the tradeoffs, look at the SX/B compiler which is downloadable from Parallax. It will compile Basic (similar to Stamp Basic) into SX assembly language and assemble that ready to download into an SX microcontroller.

    You could certainly take an SX microcontroller and write a program that could record the IR pulses received say with an IR phototransistor which could detect the individual IR pulses. It couldn't record much of them because these microcontrollers don't have much memory for data and would need external memory added.
Sign In or Register to comment.