Shop OBEX P1 Docs P2 Docs Learn Events
PWMPal - Count and Reset — Parallax Forums

PWMPal - Count and Reset

Martin HebelMartin Hebel Posts: 1,239
edited 2004-09-13 13:54 in BASIC Stamp
Is there a way to read and reset·a counter of the PWM without losing any counts?

Thanks,
Martin
·

Comments

  • Martin HebelMartin Hebel Posts: 1,239
    edited 2004-09-09 02:26
    Well, I'll take no answer as "No Martin, there is not."

    Talking to myself... it happens sometimes...

    -MH
  • KenMKenM Posts: 657
    edited 2004-09-09 03:24
    What is generating the pwm, and what frequency is the pwm?

    What resolution are you looking for?

    If the frequency of the pwm is 1000 hz, is 1 ms resolution ok?
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-09-09 03:50
    The suggestion for "retrieve count and reset counter" has been sent to our PWMPAL engineer. We're listening....

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2004-09-13 13:01
    KenM,

    I'm not trying to generate PWM, simply read a count from an external signal·(the PWMPal does more than PWM).

    Jon,

    Thanks for listening, but not much more to say on the subject if it doesn't already do it.· The need of course is apparent if I'm trying to track total pulses, which could be as high as 1000 pulses per minute.· Reading then clearing with a seperate instruction·100 or so mSec later would result in the lost of several (or more)·counts.· I could allow it to accumulate, but at that rate the·count would overflow fairly quickly.· Even if it was a slow count, missing one during that time may have a negative impact on system control or monitoring.· Of course·there's never assurance that one won't be missed, even when reset at the·machine code level after immediately buffering the count for transmission, but chances are much less during that couple microseconds than the 100 mSec it takes·for the BASIC Stamp to send and receive the serial·data, plus intrepreter time.

    The PWMPal is a cool device, just needs a few tweaks [noparse]:)[/noparse]

    Thanks,

    Martin
  • AlWilliamsAWCAlWilliamsAWC Posts: 135
    edited 2004-09-13 13:54
    Have a look at http://www.awce.com/pak7.htm

    Regards,

    Al Williams
    AWC
    http://www.awce.com
Sign In or Register to comment.