Shop OBEX P1 Docs P2 Docs Learn Events
Pro Dev Board + BS2p40 + IR remote kit for BOE bot = CountStartPulse.bs2 code n — Parallax Forums

Pro Dev Board + BS2p40 + IR remote kit for BOE bot = CountStartPulse.bs2 code n

ObsoleteSuperManObsoleteSuperMan Posts: 12
edited 2007-05-03 13:58 in BASIC Stamp
i followed all the commands in the book and set it up identically, only difference is the chip is a bs2p40 vs. bs2. i ran a short program to see if the ir reciever was working, it is. but for some reason, the code that will read the remotesz ir using pulsin does not work? it doesnt seem to make sense to me.

clark

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-05-01 19:37
    Many of the time-dependent commands of the Stamp have different timing on the various Stamp models including the serial I/O and the pulse input and output commands. There is such a difference between the BS2 and the BS2p40. Look in the PBasic manual under the command involved and you will find a table that shows the differences for different models.

    The BS2 for example has a PULSIN granularity of 2us while the BS2p models (BS2p24 and BS2p40) have a granularity of 0.8us
  • ObsoleteSuperManObsoleteSuperMan Posts: 12
    edited 2007-05-01 19:56
    i looked that up, but was'nt quite sure how or where to make the needed changes to the software.

    Units in Variable 0.8 µs
    Maximum pulse width 52.428 ms

    i get lost when dealing with small numbers.

    how do i find the right way of timing pulses?
  • Mike GreenMike Green Posts: 23,101
    edited 2007-05-02 02:49
    You need to describe what you're trying to do (in some detail), post your code and at least a description of your hardware and how it's connected.

    The BS2p can accurately time pulses up to 52.428ms in width (to a resolution of about 0.8us). What's right depends on what you're trying to do and what you have available to do it.
  • ObsoleteSuperManObsoleteSuperMan Posts: 12
    edited 2007-05-02 19:45
    i decided to change the specs and i'm now using a homework board for the project. it seems to work fine.
  • edited 2007-05-02 20:13
    Here are two links you may find useful.· Both of them feature IrRemoteButtonDisplay.bs2, which has conditional compilation directives that make the code work with the BS2, BS2sx, BS2p,·or BS2pe.· All you'll have to do is update the $STAMP directive on line 7.

    http://www.parallax.com/dl/docs/prod/compshop/IRremoteAppKit.pdf
    http://www.parallax.com/dl/src/prod/IrRemoteButtonDisplay.bs2

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Andy Lindsay

    Education Department
    Parallax, Inc.
  • ObsoleteSuperManObsoleteSuperMan Posts: 12
    edited 2007-05-03 13:58
    thank you, grand master stampers. your help is appreciated.

    Clark
    ·
Sign In or Register to comment.