Shop OBEX P1 Docs P2 Docs Learn Events
Stamp capabilities — Parallax Forums

Stamp capabilities

Jonathan AllisonJonathan Allison Posts: 96
edited 2005-01-19 00:12 in BASIC Stamp
Hi guys/gals

Is it possible, to control 5 buttons (switches), an LCD, and a stepper motor controllor with a bs2 ic?



▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Johnny

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2005-01-18 18:26
    Yes. The BS2 has 16 general purpose I/O pins. It takes 1 per button, I think 6 for the LCD (less if it's serial) and 4 for the stepper.

    Note the BS2 is 'single tasking', so you'll need to write your 'main' loop with that in mind. The BS2 cycles at about 100 uSec per PBasic instruction.

    It's not fast, but it's very capable. And it's MUCH faster than I am.
  • achilles03achilles03 Posts: 247
    edited 2005-01-18 18:30
    You mean sense buttons? It can do those things, only not at the exact same time.

    Judging by your component list, I believe the BS2 can do what you have in mind. I'm assuming you probably want it to check button status, and once a button is triggered, display a message to the LCD, then start stepping the motor. From a programing standpoint, you probably want it to check back with the buttons after a step and determine if it needs to keep going, stop, reverse, etc. It shouldn't be too hard. If you explain exactly what you want it to do, then we can tell you for sure whether or not the BS2 will work.

    Dave
  • Jonathan AllisonJonathan Allison Posts: 96
    edited 2005-01-18 18:53
    This is all for a wire winder, which will be used for making coils for electronic musical instruments.

    The machine needs to be independant, hence the 5 buttons (up, down, left,right and set) and LCD screen. This shall serve as the user control panel. The user shall first specify the parameters, number of rotations, speed (RPMS), max right and left distance for wire guide. Once the user sets all this up, which obivously is stored in variables they would hit the go button (set).

    The bs2 then only has to do the following

    WHILE Rotations < MaxRotation
    ···· Rotate spool motor 1 rotation
    ···· Shift Wire Guide (left or right depending on current wire flow direction)
    ···· CheckForUserInputOnCancelButton
    ···· UpdateLCDWithCurrentRotationNumber
    ·····Rotations++
    END WHILE



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Johnny

    Post Edited (Jonathan Allison) : 1/19/2005 2:27:19 AM GMT
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-01-18 18:55
    You defined the problem well -- the code should be a snap.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • BeanBean Posts: 8,129
    edited 2005-01-18 19:19
    A wise man once said...

    "A problem well defined, is a problem half solved"

    Bean.
  • steve_bsteve_b Posts: 1,563
    edited 2005-01-18 19:44
    GI Joe says, "Knowing is half the battle!"



    Sorry, had nother better to offer!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve
    http://members.rogers.com/steve.brady
    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-01-18 22:49
    In my book, definition is far more than half the problem solved. I'm always encouraging newbies to spend MORE time planning (and defining), because -- in my humble opinion -- that leads to less time fumbling and chasing bugs.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-01-19 00:12
    And as is always brought up, it's sometimes good to break complex tasks down into individual smallers & simpler tasks than to try and make everything work at once.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    Designs Page:··· http://www.lightlink.com/dream/designs
    ·
Sign In or Register to comment.