Shop OBEX P1 Docs P2 Docs Learn Events
How can I make an output give a (-) or (+) pulse? — Parallax Forums

How can I make an output give a (-) or (+) pulse?

TECH GEEKTECH GEEK Posts: 6
edited 2010-11-29 14:38 in BASIC Stamp
How can I make an output channel, (P0-P15) give a (-) or (+) pulse?

I have two boards I need to do this with:
  • "BS2" (Rev F) on a "Board of Education" (Rev C)
  • & an "OEM Basic Stamp 2" (Rev A1)

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-11-29 11:39
    What voltages (and current) do you need? A Stamp output normally goes from slightly above 0V to slightly below 5V. If you need a negative voltage, you will need an external switching transistor or op-amp and a source of a negative supply voltage. If you need a positive voltage other than around 4.7V, you'll need a voltage divider or external switching transistor (or op-amp).
  • TECH GEEKTECH GEEK Posts: 6
    edited 2010-11-29 13:18
    From what you are saying the BS2 boards I have only give a positive output signal? I guess that's ok... Maybe I should explain what Iam trying to do...

    1st of all you need to have seen these videos on youtube: http://www.youtube.com/watch?v=yst4eL0-Eco

    I am trying to make a "RGB 4x4x4 LED cube." The main problem that I've run into is the amount of ports I need.

    I know that a RGB 4x4x4 LED cube has:
    • 3 sub-LEDs per RGB-LED
    • 4 main-LEDs per row
    • 4 rows per layer
    • 4 layers
    • 64 RGB-LEDs (A total of 192 pins to control...)
    I know that i do not need 192 ports to to control the cube.
    I also know how to idealy control the cube with only 23 ports.
    (16 collum ports + 4 layer ports + 3 ports for RGB selection)
    see this video http://www.youtube.com/watch?v=lFDcdN47V5s&NR=1&feature=fvwp
    !!!SKIP to point 2:45 to see the important info!!!

    What I need help with is getting either all 23 ports to work off 1 board that has 16 ports -OR- 23 ports to work off 2 board with both boards turning on/off the ports in sync with each other...
  • ercoerco Posts: 20,256
    edited 2010-11-29 14:38
    LED cubes are cool. RGB LED cubes are very cool, and correspondingly harder; a 3x3 cube might be a less daunting first project. Wiki Charlieplexing to make the most out of your BS2's 16 precious IO pins: http://en.wikipedia.org/wiki/Charlieplexing

    Per Mike, a Stamp can't make a -5V pulse; external hardware would be required. If by +/- pulses you meant HIGH/LOW, remember that a PULSOUT command inverts a pin for the specified time. So if the pin was originally HIGH, a PULSOUT will drive the pin LOW temporarily, and vice versa.
Sign In or Register to comment.