Shop OBEX P1 Docs P2 Docs Learn Events
BS2px issue — Parallax Forums

BS2px issue

ToborgToborg Posts: 22
edited 2009-12-20 21:46 in BASIC Stamp
Hello,

I just recieved a BS2px from parallax yesterday. Tried a simple do-loop command:

' {$STAMP BS2px}
' {$PBASIC 2.5}

DO
HIGH 0
LOOP

Here is what happens, I get 4.95v for like a milisecond. then it goes back to .875v

I believe it should be constant. Am I right?

So, here is the wierd part. When I put some other line of code in addition to the High 0 command, it works.

ex:

' {$STAMP BS2px}
' {$PBASIC 2.5}

DO
HIGH 0
DEBUG "."
LOOP

When loading this code, I get a constant 4.95v on my scope.
Plus a debug screen full of periods.............
Any thoughts?



This is my first BS2px. I Have prior to this only used BS2.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-12-20 21:18
    Your first example should work as you expect. Check to make sure that your program is entered the way you've shown.
    ' {$STAMP BS2px}
    ' {$PBASIC 2.5}
    DO
    HIGH 0
    LOOP
    


    This should also work:
    ' {$STAMP BS2px}
    ' {$PBASIC 2.5}
    HIGH 0
    DO
    LOOP
    
  • ToborgToborg Posts: 22
    edited 2009-12-20 21:39
    My code was copied and pasted straight in to the forum.

    I tried the adaptation that you suggested. The same result of a momentary high on pin 0.

    any further suggestions?
  • ToborgToborg Posts: 22
    edited 2009-12-20 21:46
    Well, its working now!

    Silly but, the only thing i did different was a FREQOUT command.

    '{$STAMP BS2px}
    ' {$PBASIC 2.5}
    DO
    FREQOUT 0,1000,10

    LOOP

    After that now when I try the other code it works.

    Not sure why, but it works now. smile.gif



    Thanks for the help.
Sign In or Register to comment.