Shop OBEX P1 Docs P2 Docs Learn Events
Can stamp II count this? — Parallax Forums

Can stamp II count this?

ArchiverArchiver Posts: 46,084
edited 2001-01-09 17:23 in General Discussion
Can the BS2 count the number of pulses it sees at a given input for a fixed
period in real time?
I can see how it might, but I am wondering how I can relate the result to a
known time base, as I would like to detect whether a pulse occurred at one,
or another frequency....ie: 50 or 60Hz.
Hmmm....

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-01-09 17:23
    If I understand the question correctly, this is what the count command does.
    I don't have my manual in front of me, but I think you could do something
    like this:

    count pin, changes, time ' count on a pin for a given time
    frequency = changes / time ' find out changes per unit time

    I am willing to bet someone else has already replied to this (because I get
    the digest version of this forum), and they probably have more info. You
    can certainly get more info from the stamp manual. Hope that helps.


    ______________________________________________
    FREE Personalized Email at Mail.com
    Sign up at http://www.mail.com/?sr=signup
Sign In or Register to comment.