Shop OBEX P1 Docs P2 Docs Learn Events
need some help with sx inputs — Parallax Forums

need some help with sx inputs

prozachprozach Posts: 11
edited 2008-02-13 18:05 in General Discussion
I am not a programmer and know very little about it so I need to ask for some help here.

I need to program·an input so that it will not count a pulse unless it is at least 20ms long.· Is there a quick few lines of code that can do this?· I am getting some emi from a motor in the system that is causing false counts and I think this will resolve the problem.

Thanks for any help.

Zach

Comments

  • BeanBean Posts: 8,129
    edited 2008-02-13 18:05
    Zach,
    Normally you would just wait 20mSec and check it again, if it is still high then count it.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.iElectronicDesigns.com

    ·
Sign In or Register to comment.