Shop OBEX P1 Docs P2 Docs Learn Events
starting program — Parallax Forums

starting program

tigershark35tigershark35 Posts: 60
edited 2007-05-27 13:19 in BASIC Stamp
I would like to start the program that is on my stamp homework board by turning on a power switch.

How can I do that. The reset button on the board is not accessable and I will not be connected to a computer. I can wire a button that is accessable.

Thanks.
JG

·

Comments

  • FranklinFranklin Posts: 4,747
    edited 2007-05-27 01:21
    When the power is applied to the homework board any program in the chip will start running.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • tigershark35tigershark35 Posts: 60
    edited 2007-05-27 01:30
    Thanks

    I thought that was the way it was supposed to do, but it doesn't. It has a series of light that are supposed to go on and off but they don't until I push the button on the unit.

    Ideas?· Could it be a software deal?

    JG
  • FranklinFranklin Posts: 4,747
    edited 2007-05-27 01:32
    If you would attach your program people here can have a look at your code.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • tigershark35tigershark35 Posts: 60
    edited 2007-05-27 01:40
    Stephen. good idea.

    Here it is. Very simple test program. It won't do the counting until I push the button.

    JG

    ' HIGH_LOW.BS2
    ' Simple test program to test light sequence.

    ' {$STAMP BS2}



    n VAR···· Word


    · PAUSE 250

    · main:

    · FOR n = 1 TO 8
    · HIGH n
    · PAUSE 500
    · LOW n
    · PAUSE 500
    · HIGH n
    · PAUSE 500
    · LOW n
    · PAUSE 500
    · NEXT


    · GOTO main
    · END
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2007-05-27 08:00
    Try putting the PBasic 2.5 directive at the top of your code. When the directives are missing, strange things tend to happen.
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2007-05-27 08:10
    TigerShark -

    Is the green "Running" LED lit when you power up the Stamp board, or only after you press the RESET button? I presume the button you're speaking about is the RESET button on the Homework Board?

    Just a passing comment - there is no reason for your variable "n" to be a WORD sized variable. Since it can only contain the values 1-8, making it a BYTE or NIB would be adequate. Additionally, I trust you realize the pin ports are numbered 0-15 and not 1-16.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • tigershark35tigershark35 Posts: 60
    edited 2007-05-27 13:18
    Bruce
    Thanks

    I do understand the pin numbering and the variable size. Thanks.

    Ill have to run it again to see if the status on the light.
    JG
  • tigershark35tigershark35 Posts: 60
    edited 2007-05-27 13:19
    Kevin thanks.
    Ill try that.
    JG
Sign In or Register to comment.