Shop OBEX P1 Docs P2 Docs Learn Events
IrDA for the Basic Stamp — Parallax Forums

IrDA for the Basic Stamp

HumanoidoHumanoido Posts: 5,770
edited 2007-09-28 13:32 in BASIC Stamp
Has anyone developed an IrDA remote control code for the Basic
Stamp, so it can communicate with the PCs built in function?

humanoido

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-09-27 13:25
    You would need an external IrDA controller like the MAX3100 from Maxim/Dallas. This is a UART with IrDA provisions that communicates via an SPI interface which the Stamp can do with SHIFTIN/SHIFTOUT. The timing is very tight with IrDA and the Stamp is not capable of handling the speed without the external interface.
  • HumanoidoHumanoido Posts: 5,770
    edited 2007-09-28 05:27
    Thanks Mike, very good advice.
    I was wondering, since some things have
    changed, like the speed of the Basic Stamp,
    do you think the new powerful 2px can
    now handle the timing?

    If possible, I'd like to use just the 2px
    without any add on chips.

    Thanks,

    humanoido
  • allanlane5allanlane5 Posts: 3,815
    edited 2007-09-28 13:23
    No. The IrDa standard basically converts a 'stock' 2400 baud UART signal into on-off pulses for an IR-LED. The timing for the LED pulses are quite strict for it to work. None of the BS2 flavors would have sufficient speed to 'bit-bang' that from PBasic.

    Also, you keep saying "communicate with the PC's built in function" -- function for what? I've never seen a PC's IrDA port used for anything.
  • Mike GreenMike Green Posts: 23,101
    edited 2007-09-28 13:29
    Here a good explanation and example using the Stamp: www.emesystems.com/BS2IrDA.htm.

    The pulses can be as short as 1.7us and the normal data rate is 115KBaud (although you can use lower rates).
    The BS2px can't handle those without external circuitry. The MAX3100 may need a pulse stretcher in the
    input circuitry as Tracy mentions in the explanation.
  • allanlane5allanlane5 Posts: 3,815
    edited 2007-09-28 13:32
    Thanks, Mike, I stand corrected. That's a very nice summary page you linked to there. And thanks to "emesystems" for your continuing help.
Sign In or Register to comment.