BS2 really screwed up
ShadowDragon
Posts: 51
Hi, i have a bs2 and when ever i load a program onto the stamp, what ever i want to control is (such as turning on an LED) only works for a verrry short time. I change the lengths of pauses, and such within the program, but doesn't make a difference. When i press reset, it is like htere was never any program ever loaded. Thanks.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I watch how the moon sits in the sky on a dark night,
shining with the light from the sun,
The sun doesn't give light to the moon,
Assuming the moons gonna owe it one,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I watch how the moon sits in the sky on a dark night,
shining with the light from the sun,
The sun doesn't give light to the moon,
Assuming the moons gonna owe it one,
Comments
not to insult your intelligence but if you would like to send in the code you are writing to the stamp to controll the LED I dont think anyone would mind giving it a quick glance.
~Jeremy
' {$STAMP BS2}
OUTPUT 0
main:
OUT0 = 0
PAUSE 10000
GOTO main
btw, none taken.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I watch how the moon sits in the sky on a dark night,
shining with the light from the sun,
The sun doesn't give light to the moon,
Assuming the moons gonna owe it one,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I watch how the moon sits in the sky on a dark night,
shining with the light from the sun,
The sun doesn't give light to the moon,
Assuming the moons gonna owe it one,
Maybe you missed a line when posting the code ?
You could try TOGGLE OUT0
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95
http://www.parallax.com/detail.asp?product_id=30012
Product web site: www.sxvm.com
Available now... SX-Video OSD module $59.95 www.sxvm.com
"Save your money. Pay with cash."
·
' {$STAMP BS2}
' {$PBASIC 2.5}
DEBUG "The LED should be Blinking"
DO
HIGH 0
PAUSE 500
LOW 0
PAUSE 500
LOOP
have you ever had complete success with your stamp cooperating or has it been having this problem all along?
~Jeremy
Stamp
470 ohm
|>|
Vss
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I watch how the moon sits in the sky on a dark night,
shining with the light from the sun,
The sun doesn't give light to the moon,
Assuming the moons gonna owe it one,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I watch how the moon sits in the sky on a dark night,
shining with the light from the sun,
The sun doesn't give light to the moon,
Assuming the moons gonna owe it one,
This program will blink the LED on and off once per second
'{$STAMP BS2}
'{$PBASIC 2.5]
DO
HIGH 0
PAUSE 500
LOW 0
PAUSE 500
LOOP
I took this program from the What's a Micontroller book, which you can download at www.parallax.com/detail.asp?product_id=28123
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I watch how the moon sits in the sky on a dark night,
shining with the light from the sun,
The sun doesn't give light to the moon,
Assuming the moons gonna owe it one,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I watch how the moon sits in the sky on a dark night,
shining with the light from the sun,
The sun doesn't give light to the moon,
Assuming the moons gonna owe it one,
This is just a general troubleshooting hint, and NOT necessarily the answer to your present quandry. Often, when all goes well up until the time a load is placed on a Stamp pin port or ports, and then things start to go South, check to make sure that the load or loads being placed on the voltage regulator and/or the Stamp pin port(s) isn't excessive. If it is, it may cause an undue current demand, and a brown-out condition can result. Once that happens, the Stamp is automatically RESET, and the program will start over.
The simplist way to detect this is to put the following short line of code at the very beginning of your program, where it can only be executed once:
DEBUG "Starting"
If "Starting" appears more then once in any program cycle, you KNOW that a RESET is occurring, and the Stamp is starting the program all over again.
Regards,
Bruce Bates
http://www.parallax.com/detail.asp?product_id=28123
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
If 0 is supposed to activate the LED, then you should have it connected like this:
Stamp ---- 470 ----|<|---- Vdd
Earlier you indicated that you have an active-high setup, and what you really want is active-low.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I watch how the moon sits in the sky on a dark night,
shining with the light from the sun,
The sun doesn't give light to the moon,
Assuming the moons gonna owe it one,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I watch how the moon sits in the sky on a dark night,
shining with the light from the sun,
The sun doesn't give light to the moon,
Assuming the moons gonna owe it one,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I watch how the moon sits in the sky on a dark night,
shining with the light from the sun,
The sun doesn't give light to the moon,
Assuming the moons gonna owe it one,