Shop OBEX P1 Docs P2 Docs Learn Events
Help with human interfacing on the BS2p24 — Parallax Forums

Help with human interfacing on the BS2p24

Cruzer_1Cruzer_1 Posts: 2
edited 2009-12-24 14:50 in BASIC Stamp
Hello all,
I have a problem. In a project I am doing I need to communicate to the BS2p24 micro. I need the micro to change a variable in the program when I turn a pot or any other mechanism that allows the variable to change. More importantly I need it to change from 0-250.
My original plan was to use a pulse width modulator and have the pulses change from 5ms-250ms. With this pulse variability I would be able to have the micro-controller change the variable I need it to by using the pulsin function that all stamps have. The thing is the max pulse the micro can read is 52ms. I need another way to interface with the micro, I just don’t know what. Please tell me you know another way.
Thank you

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2009-12-23 16:29
    Use SEROUT on one side, SERIN on the other.
  • allanlane5allanlane5 Posts: 3,815
    edited 2009-12-23 16:31
    Oh, and if all you want to do is read a pot, you can use a capacitor and the PULSIN command to measure the pulse-width directly.
  • stamptrolstamptrol Posts: 1,731
    edited 2009-12-24 14:50
    Or, use a capacitor, pot and the RCTIME function. Example in the editor helpfile.

    10 minutes of experimenting and you'll be on your way.

    Cheers,

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
Sign In or Register to comment.