Shop OBEX P1 Docs P2 Docs Learn Events
Commands — Parallax Forums

Commands

Ben1234Ben1234 Posts: 2
edited 2006-06-22 16:40 in BASIC Stamp
I need to generate a 25ms pulse every 100ms for 2 sec.· Whixh command should I use??

BILL

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2006-06-20 02:31
    The easiest is to do something like (where pin is the pin you want to use
    and i is a byte variable not otherwise used at this point in your program):
    FOR I = 1 TO 20
    HIGH pin : PAUSE 25 : LOW pin : PAUSE 75
    NEXT
  • Ben1234Ben1234 Posts: 2
    edited 2006-06-20 04:26
    Mike,

    Thank you. I have look all through the command list and could not find one command to this like "PULSOUT"

    Bill
  • Mike GreenMike Green Posts: 23,101
    edited 2006-06-20 04:35
    You could use PULSOUT, but it would only replace the HIGH and first PAUSE. Often when I am making up a program to do something very specific in terms of high/low and timing, I will start with the simple statements, test the program, then begin substituting more complex statements like PULSOUT.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-06-22 16:40
    This thread is being moved from the·Completed Projects·Forum to the·BASIC Stamp·Forum.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
Sign In or Register to comment.