Shop OBEX P1 Docs P2 Docs Learn Events
How to detect and create this infrared signal. (Results from BSLA) — Parallax Forums

How to detect and create this infrared signal. (Results from BSLA)

knightofoldcodeknightofoldcode Posts: 233
edited 2005-10-16 01:03 in BASIC Stamp
Board,

I purchased a BSLA, and have used it to get the information from a remote control. From what I can gather from Andy Lindsay's IR book for the Boe Bot, it appears that the start bit for my particular remote is 8.5 ms long, then there's a pause of 4.7 ms, then we start to get into the bits for the code, and it appears to be a 1 is equal to 1.5 ms. And a 0 is equal to 0.5 ms. With gaps of 0.5 milliseconds.

Does this mean that there are no Basic Stamps that can be capable of reproducing, or even detecting this remote's code since it's below 0.7 ms for the zeros and the gaps?

I have included the captured data from the BSLA below just incase I'm missing something. The data was captured on P3.

This is really starting to sound like I need another processor dedicated to just the IR codes, and sending out the codes.

Sorry I had to zip the file. The file before zipping was 16 meg, and after zipping it was 16k.... 99% zip ratio.

MUCH TIA,
Knight.

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-10-16 00:06
    The *problem* is not detecting bits that short, it's the instruction load time between that usually gets us. You might consider SX/B and an SX chip to create a custom IR "helper" chip. With SX/B you can code in BASIC but get the full speed of assembly language.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Larry~Larry~ Posts: 242
    edited 2005-10-16 00:07
    Ive been working with a Bs2 and the following code it seams to work for reading most of my transmitters the reason for two sets of pulsin reading with the same varables is that i have one transmitter that outputs 25 bits and only the last 12 change so I padded the first 12 with dummy reads and then get data for the last 13, I only need the last 12

    ' {$STAMP BS2}
    ' {$PBASIC 2.5}

    a VAR Word
    b VAR Word
    c VAR Word
    d VAR Word
    e VAR Word
    f VAR Word
    g VAR Word
    h VAR Word
    i VAR Word
    j VAR Word
    k VAR Word
    l VAR Word
    m VAR Word

    start:
    DO
    PULSIN 0,1,a
    LOOP UNTIL a > 1200····· 'this looks for the leader or start bit

    PULSIN 0,1,a
    PULSIN 0,1,b
    PULSIN 0,1,c
    PULSIN 0,1,d
    PULSIN 0,1,e
    PULSIN 0,1,f
    PULSIN 0,1,g
    PULSIN 0,1,h
    PULSIN 0,1,i
    PULSIN 0,1,j
    PULSIN 0,1,k
    PULSIN 0,1,l
    PULSIN 0,1,a

    PULSIN 0,1,b
    PULSIN 0,1,c
    PULSIN 0,1,d
    PULSIN 0,1,e
    PULSIN 0,1,f
    PULSIN 0,1,g
    PULSIN 0,1,h
    PULSIN 0,1,i
    PULSIN 0,1,j
    PULSIN 0,1,k
    PULSIN 0,1,l
    PULSIN 0,1,m

    DEBUG " dec a· 1· ", DEC a,13
    DEBUG " dec b· 2· ", DEC b,13
    DEBUG " dec c· 3· ", DEC c,13
    DEBUG " dec d· 4· ", DEC d,13
    DEBUG " dec e· 5· ", DEC e,13
    DEBUG " dec f· 6· ", DEC f,13
    DEBUG " dec g· 7· ", DEC g,13
    DEBUG " dec h· 8· ", DEC h,13
    DEBUG " dec i· 9· ", DEC i,13
    DEBUG " dec j 10· ", DEC j,13
    DEBUG " dec k 11· ", DEC k,13
    DEBUG " dec l 12· ", DEC l,13
    DEBUG " dec m 13· ", DEC m,13,10,10

    PAUSE 100
    GOTO start
  • knightofoldcodeknightofoldcode Posts: 233
    edited 2005-10-16 01:00
    I spoke with my brother, whom is a EE. He says he could very certainly create a pic to act as a helper chip, just deal with detecting and transmitting the IR. I was hoping to be able to do this directly with the BS2, but it looks like the data is just too fast for the BS2. [noparse]:([/noparse]

    I will however look into the SX/B. [noparse]:)[/noparse]

    Knight.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-10-16 01:03
    The SX is a screamin' demon, even when programmed with SX/B (which compiles to native assembly language). I have used SX/B to create several helper chips, and am working on more. At the top of my list is a Playstation Controller interface. It will give the Stamp 1-wire (serial) control over the PSX controller (actually, up to four) and have eight extra I/O bits. The SX and SX/B is a lot of fun, and with the reduction in the SX-Key and development board prices it's not expensive to get involved with.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
Sign In or Register to comment.