Shop OBEX P1 Docs P2 Docs Learn Events
Servo Pulsout — Parallax Forums

Servo Pulsout

NewzedNewzed Posts: 2,503
edited 2004-11-02 18:44 in BASIC Stamp
With a BS2 I would pulsout 750 to center·a servo.· This is acutally 1500us.· If I want to use a BS2P24 do I pulsout 1500/.8 = 1875us to
achieve the same result?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
New Combo LCD Backpack

http://hometown.aol.com/newzed/index.html
·

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2004-11-02 15:53
    Umm, the Basic Stamp 2 Programming Manual, under the PULSOUT entry, says the PULSOUT 'tick' size for the BS2p is 1.18 uSec. The BS2sx uses 0.8 usec. Thus your math is good for the BS2sx, *not* the BS2p.

    For the BS2p, you would need 1.5 mSec/1.18 uSec == 1271 'ticks'.

    (To check, 1271 * 1.18 uSec == 1.49978 mSec. *Should* be close enough.)
  • NewzedNewzed Posts: 2,503
    edited 2004-11-02 16:03

    Allan, the current Help file for the Editor says .8 for the BS2P and the BS2SX.· I wonder which is right?

    One other question:

    I just want to make sure of something before I wrap up this big PC board.
    If I read, say GP0, and get %10000001, the first 1(msb) is GP0.7 and the last 1 (lsb) is GP0.0.· Correct?




    Sid


  • allanlane5allanlane5 Posts: 3,815
    edited 2004-11-02 16:13
    Yes, the MSBit (Most Significant Bit) is considered Bit 7. The LSB is Bit 0. This is done by convention, and that *is* the convention for the BS2 (and the PIC it is based on). Good question.

    For the pulse width -- the fastest way to know for sure is to try it. Just checked the on-line help, and darn if you arn't correct. So now we have two standards which each say something different. Help me, Mr. Wizard (Jon)!
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-11-02 18:14
    The current help file has a conditional compilation example for PULSOUT that should help you with different BASIC Stamp modules.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • dandreaedandreae Posts: 1,375
    edited 2004-11-02 18:44
    Hello,

    Actually the 0.8uS is correct for the BS2sx and BS2p.

    Dave
Sign In or Register to comment.