Shop OBEX P1 Docs P2 Docs Learn Events
Short Pulse Detection — Parallax Forums

Short Pulse Detection

TappermanTapperman Posts: 319
edited 2010-01-11 22:57 in BASIC Stamp
The Stamp manual says COUNT on the BS2 can respond to transitions (pulse widths) as small as 4.16 microseconds (µs).

And the PULSIN command (for the BS2) reports back in increments of 2 (µs).· But doesn't specify a lower limit?· My question is ... how could the XOUT command work?· Since the X10 standard specifies a 1 (µs) pulse on the zero detection pin!

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-01-11 22:57
    XOUT doesn't necessarily use the same internal code as PULSIN. The PIC chip used in the BS2 runs with a 20MHz crystal, which give it a 5 MIPS firmware performance. So detecting a 1 µs pulse should not be a problem. Measuring a pulse takes more code than just detecting one. That's probably why the PULSIN resolution is 2 µs and not 1 µs.

    -Phil
Sign In or Register to comment.