Shop OBEX P1 Docs P2 Docs Learn Events
Pulsout problems on basic Stamp 2 — Parallax Forums

Pulsout problems on basic Stamp 2

phredphred Posts: 6
edited 2005-06-26 18:10 in BASIC Stamp
Hello:

I can get pins 0-7 to run pulsout to a Stamp2 or Stamp2p24 famously. Can't get any response from pins 8-15. What's up?

TIA

Comments

  • KenMKenM Posts: 657
    edited 2005-06-26 16:13
    Can you post the code you are using that works on p0~7 and the code that does not work on p8~15?
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-06-26 16:18
    Make sure you don't have an AUXIO or IOTERM 1 statement mixed into your program -- even though the BS2p24 does not have the AUXIO pins, it does accept these commands and your pulses would be routed to physical pins that you don't have access to.

    Another thing to remember about PULSOUT is that it toggles the output state of the specified pin.· If you want a high-going pulse, then initialize that pin as an output low.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • phredphred Posts: 6
    edited 2005-06-26 17:08
    Here's the code:

    ' {$STAMP BS2p}
    ' {$PBASIC 2.5}
    I VAR Word
    X VAR Word
    rotor CON 15
    OUTPUT rotor
    RESETI:
    FOR X=1 TO 100
    I=680 '680 for BS2P
    LOW rotor
    PULSOUT rotor,I
    PAUSE 15
    NEXT
    PAUSE 30


    TEST:
    LOW rotor
    PULSOUT rotor,I
    PAUSE 25
    I=I+7
    DEBUG DEC I
    IF I>2850 THEN '2850 for BS2P
    DEBUG CLS
    STOP
    ENDIF
    GOTO TEST


    Also tried looking at with my Parallax scope. I can see the stream of pulses fine on 0-7. when I switch to "rotor con 15" (AND even remember to switch the scope traces!!) I see nuthin....
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-06-26 17:27
    Then do a simple test to make sure your output drivers haven't been popped:

    Main:
    · HIGH 15
    · PAUSE 100
    · LOW 15
    · PAUSE 100
    · GOTO Main

    You can connect your scope, or even something as simple as an LED.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • phredphred Posts: 6
    edited 2005-06-26 17:47
    Hmmmm, that's bizarre. The pin 15 test program doesn't work when the chip is in a "BS2P24/40 Demo Board" but does when in a custom board. Nothing appears shorted and a continuity check shows signal is going from the 20 pin socket to the chip and to the 16 pin socket next to the bread board....now I'm out of ideas
  • phredphred Posts: 6
    edited 2005-06-26 18:10
    RTFM Phred

    "When using a 24-pin BASIC Stamp or Javelin Stamp module in the demo board be sure to align pin 1 of
    the module in the socket as indicated on the PCB. And note that when using a 24-pin module, pins P8
    through P15 are accessed via sockets A8 through A15."

    This bonehead had the wrong header on the board. SORRY!
Sign In or Register to comment.