Shop OBEX P1 Docs P2 Docs Learn Events
Measuring long pulses — Parallax Forums

Measuring long pulses

ArchiverArchiver Posts: 46,084
edited 2003-09-10 19:21 in General Discussion
If this were a pic project, then I would say use something along the lines
of read on pin change state.

Brian



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/2003


[noparse][[/noparse]Non-text portions of this message have been removed]

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-09-07 19:33
    Hi all,

    I'm trying to build a stamp based system to display on an LCD some error code
    that a unit gives out.
    The output the unit gives are a series of short pulses (around 3Hz) for about
    two seconds, thi is the start sequence.
    It then goes low for one second.
    Then it goes high for one second and low for one second (ie 1/2 Hz), it does
    this several times as a count.
    It then goes low for 3 seconds.
    Then it does its 1/2 Hz pulses as a second count output.
    Finally it does a series of 3Hz pules again to end.

    The unit output is designed to be connected to an LED to read the error codes by
    eye and then look them up in a manual.
    What I'm trying to do is make a LCD display give text descriptions that relate
    to the codes.

    I thought it would be easy using the PULSIN command but on a BS2 it can only
    read pulses up to 655 ms!!

    Even RCTIME does not go long enough. I've also got some of Al's PAK7 and this
    too doesn't go that long...

    I'm now a bit stuck as to how to do it...

    Any ideas greatfully recieved...


    Cheers all

    Kev/.


    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2003-09-07 20:04
    Some other projects I've been trying are tending to point me towards PICs
    but I've not made the switch yet...

    Kev/.

    Original Message
    From: "Brian Gracia" <bgracia1@b...>
    To: <basicstamps@yahoogroups.com>
    Sent: Sunday, September 08, 2002 7:54 PM
    Subject: Re: [noparse][[/noparse]basicstamps] Measuring long pulses


    > If this were a pic project, then I would say use something along the lines
    > of read on pin change state.
    >
    > Brian
    >
    >
    >
    >
    > ---
    > Outgoing mail is certified Virus Free.
    > Checked by AVG anti-virus system (http://www.grisoft.com).
    > Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/2003
    >
    >
    > [noparse][[/noparse]Non-text portions of this message have been removed]
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-09-07 20:17
    I'd recommend using the 'SMt' chip from
    David Lawrence. This chip will generate
    a 100 mSec square wave, which you can use
    to synchronize a counter in your Stamp.
    It's an 8-pin DIP, which comes with a
    6 MHz resonator.

    The beauty of this approach is you get
    a relatively accurate 50 mSec 'tick'.
    You then use these to time the pulses
    coming in on the LED 'blink' line.



    --- In basicstamps@yahoogroups.com, "Kev Pearce \(kevp.com\)"
    <email.me@k...> wrote:
    > Hi all,
    >
    > I'm trying to build a stamp based system to display on an LCD some
    error code that a unit gives out.
    > The output the unit gives are a series of short pulses (around 3Hz)
    for about two seconds, thi is the start sequence.
    > It then goes low for one second.
    > Then it goes high for one second and low for one second (ie 1/2
    Hz), it does this several times as a count.
    > It then goes low for 3 seconds.
    > Then it does its 1/2 Hz pulses as a second count output.
    > Finally it does a series of 3Hz pules again to end.
    >
    > The unit output is designed to be connected to an LED to read the
    error codes by eye and then look them up in a manual.
    > What I'm trying to do is make a LCD display give text descriptions
    that relate to the codes.
    >
    > I thought it would be easy using the PULSIN command but on a BS2 it
    can only read pulses up to 655 ms!!
    >
    > Even RCTIME does not go long enough. I've also got some of Al's
    PAK7 and this too doesn't go that long...
    >
    > I'm now a bit stuck as to how to do it...
    >
    > Any ideas greatfully recieved...
    >
    >
    > Cheers all
    >
    > Kev/.
    >
    >
    > [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2003-09-08 16:07
    Folks, please check your system clocks if your system
    is used for email. In many email systems it is a pain
    to track down an unread message its date is incorrect.

    Thanks,

    Bob Pence
    Controls Engineer

    --- Brian Gracia <bgracia1@b...> wrote:
    > If this were a pic project, then I would say use
    > something along the lines
    > of read on pin change state.
    >
    > Brian
    >
    >
    >
    >
    > ---
    > Outgoing mail is certified Virus Free.
    > Checked by AVG anti-virus system
    > (http://www.grisoft.com).
    > Version: 6.0.512 / Virus Database: 309 - Release
    > Date: 8/19/2003
    >
    >
    > [noparse][[/noparse]Non-text portions of this message have been
    > removed]
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed.
    > Text in the Subject and Body of the message will be
    > ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to
    > http://docs.yahoo.com/info/terms/
    >
    >


    __________________________________
    Do you Yahoo!?
    Yahoo! SiteBuilder - Free, easy-to-use web site design software
    http://sitebuilder.yahoo.com
  • ArchiverArchiver Posts: 46,084
    edited 2003-09-08 17:05
    --- In basicstamps@yahoogroups.com, Pence Bob <bobpence_2000@y...>
    wrote:
    > Folks, please check your system clocks if your system
    > is used for email. In many email systems it is a pain
    > to track down an unread message its date is incorrect.
    >
    > Thanks,
    >
    > Bob Pence
    > Controls Engineer

    Maybe, but if we keep our clocks a few minutes slow, (Take note Al)
    then we can post a reply BEFORE the question is asked !

    Now, Al can take his time and still be the first to respond. kinda
    takes the fun outta races though.

    Dave
  • ArchiverArchiver Posts: 46,084
    edited 2003-09-08 17:26
    Hmmmmm.....

    I seem to remember a sci-fi short story some years back where a chemical
    reaction would take place a fraction of a second before two solutions were
    combined. If you tried to fake it out by starting the mixing sequence but
    not actually pipetting the active agent into the test tube, the reaction
    never occurred. But if you did actually go through with the mixing action,
    sure enough, the solution would start reacting a second before the liquids
    actually touched.

    Now if I could only figure out how to do this for lottery tickets....
    Perhaps with a day or so "pre-reaction" time. ;o)

    Mike Sokol
    www.modernrecording.com

    Original Message
    From: "Dave Mucha" <davemucha@j...>
    To: <basicstamps@yahoogroups.com>
    Sent: Monday, September 08, 2003 12:05 PM
    Subject: [noparse][[/noparse]basicstamps] Re: Measuring long pulses


    > --- In basicstamps@yahoogroups.com, Pence Bob <bobpence_2000@y...>
    > wrote:
    > > Folks, please check your system clocks if your system
    > > is used for email. In many email systems it is a pain
    > > to track down an unread message its date is incorrect.
    > >
    > > Thanks,
    > >
    > > Bob Pence
    > > Controls Engineer
    >
    > Maybe, but if we keep our clocks a few minutes slow, (Take note Al)
    > then we can post a reply BEFORE the question is asked !
    >
    > Now, Al can take his time and still be the first to respond. kinda
    > takes the fun outta races though.
    >
    > Dave
    >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-09-10 19:17
    Hi,

    Our Co-Processor has 8 timers that can be read back out. You could
    start one for max time (5.1 seconds = 255 * 20 ms) and watch for the
    input signal to change. When it does, read the timer value and reset
    it for the next pulse time to be read. You can get the details at
    www.bluebelldesign.com or email me. The benefit of using the Co-
    Processor is that you could do other things with the Stamp while
    still timing the inputs.

    If you aren't trying to do anything else while timing the pulses you
    could do a program counting loop with a PAUSE in it to delay for
    some number of ms. Counting a byte variable with a delay of 20 ms
    gives 20 ms resolution (probably more than enough) up to 5.1 seconds.

    Harry
    Stamp Robotics to the next level
    www.bluebelldesign.com


    --- In basicstamps@yahoogroups.com, "Kev Pearce \(kevp.com\)"
    <email.me@k...> wrote:
    > Hi all,
    >
    > I'm trying to build a stamp based system to display on an LCD some
    error code that a unit gives out.
    > The output the unit gives are a series of short pulses (around
    3Hz) for about two seconds, thi is the start sequence.
    > It then goes low for one second.
    > Then it goes high for one second and low for one second (ie 1/2
    Hz), it does this several times as a count.
    > It then goes low for 3 seconds.
    > Then it does its 1/2 Hz pulses as a second count output.
    > Finally it does a series of 3Hz pules again to end.
    >
    > The unit output is designed to be connected to an LED to read the
    error codes by eye and then look them up in a manual.
    > What I'm trying to do is make a LCD display give text descriptions
    that relate to the codes.
    >
    > I thought it would be easy using the PULSIN command but on a BS2
    it can only read pulses up to 655 ms!!
    >
    > Even RCTIME does not go long enough. I've also got some of Al's
    PAK7 and this too doesn't go that long...
    >
    > I'm now a bit stuck as to how to do it...
    >
    > Any ideas greatfully recieved...
    >
    >
    > Cheers all
    >
    > Kev/.
    >
    >
    > [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2003-09-10 19:21
    Hi,

    Our Co-Processor has 8 timers that can be read back out. You could
    start one for max time (5.1 seconds = 255 * 20 ms) and watch for the
    input signal to change. When it does, read the timer value and reset
    it for the next pulse time to be read. You can get the details at
    www.bluebelldesign.com or email me. The benefit of using the Co-
    Processor is that you could do other things with the Stamp while
    still timing the inputs.

    If you aren't trying to do anything else while timing the pulses you
    could do a program counting loop with a PAUSE in it to delay for
    some number of ms. Counting a byte variable with a delay of 20 ms
    gives 20 ms resolution (probably more than enough) up to 5.1 seconds.

    Harry
    Stamp Robotics to the next level
    www.bluebelldesign.com


    --- In basicstamps@yahoogroups.com, "Kev Pearce \(kevp.com\)"
    <email.me@k...> wrote:
    > Hi all,
    >
    > I'm trying to build a stamp based system to display on an LCD some
    error code that a unit gives out.
    > The output the unit gives are a series of short pulses (around
    3Hz) for about two seconds, thi is the start sequence.
    > It then goes low for one second.
    > Then it goes high for one second and low for one second (ie 1/2
    Hz), it does this several times as a count.
    > It then goes low for 3 seconds.
    > Then it does its 1/2 Hz pulses as a second count output.
    > Finally it does a series of 3Hz pules again to end.
    >
    > The unit output is designed to be connected to an LED to read the
    error codes by eye and then look them up in a manual.
    > What I'm trying to do is make a LCD display give text descriptions
    that relate to the codes.
    >
    > I thought it would be easy using the PULSIN command but on a BS2
    it can only read pulses up to 655 ms!!
    >
    > Even RCTIME does not go long enough. I've also got some of Al's
    PAK7 and this too doesn't go that long...
    >
    > I'm now a bit stuck as to how to do it...
    >
    > Any ideas greatfully recieved...
    >
    >
    > Cheers all
    >
    > Kev/.
    >
    >
    > [noparse][[/noparse]Non-text portions of this message have been removed]
Sign In or Register to comment.