Stumped
Archiver
Posts: 46,084
I just got started in microcontrollers. I have a Rev B BASIC stamp
HomeWork Board, and i'm using the Stamp Editor ver 2.0 Beta 2. I
have a AAS in electronics, so I am comfortable with the projects in
my Stamp In Class booklet. The odd thing, when I run a DEBUG
statement, the stamp performes fine. But when I try the below
program on the stamp, the power light flashes once, at the same time
the led on P15 coupled through a 470 ohm resister to Vss, flashes
only once. Nothing else happens. But when I add a DEBUG "1"
statement before the LOOP command, the stamp flashes the LED and the
screen shows a one repeatedly. Why would I need to add a DEBUG
statement to make a loop function work? I'm comfused. Please help.
DO
HIGH 15
PAUSE 500
LOW 15
PAUSE 500
LOOP
HomeWork Board, and i'm using the Stamp Editor ver 2.0 Beta 2. I
have a AAS in electronics, so I am comfortable with the projects in
my Stamp In Class booklet. The odd thing, when I run a DEBUG
statement, the stamp performes fine. But when I try the below
program on the stamp, the power light flashes once, at the same time
the led on P15 coupled through a 470 ohm resister to Vss, flashes
only once. Nothing else happens. But when I add a DEBUG "1"
statement before the LOOP command, the stamp flashes the LED and the
screen shows a one repeatedly. Why would I need to add a DEBUG
statement to make a loop function work? I'm comfused. Please help.
DO
HIGH 15
PAUSE 500
LOW 15
PAUSE 500
LOOP
Comments
port shutting down ... we've seen this a thousand times (cheap serial
ports are the bane of our existence). Two things you can do to mitigate
the problem.
1) Set your port FIFO settings to their minimum values
2) Add a DEBUG statement to your program (this holds the port open so
the computer doesn't want to shut it down).
Main:
DEBUG "LED Flasher"
DO
HIGH 15
PAUSE 500
LOW 15
PAUSE 500
LOOP
-- Jon Williams
-- Applications Engineer, Parallax
-- Dallas Office
Original Message
From: carns256 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=nIRXrYDnshZJAX0W3SGxW__z-lhnyQWZcbqFTmTMXKxXt9EVpnvlRmtC11kQmzgRaRphF6-3ae2wufdj]carns256@y...[/url
Sent: Monday, March 29, 2004 8:04 AM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Stumped
I just got started in microcontrollers. I have a Rev B BASIC stamp
HomeWork Board, and i'm using the Stamp Editor ver 2.0 Beta 2. I
have a AAS in electronics, so I am comfortable with the projects in
my Stamp In Class booklet. The odd thing, when I run a DEBUG
statement, the stamp performes fine. But when I try the below
program on the stamp, the power light flashes once, at the same time
the led on P15 coupled through a 470 ohm resister to Vss, flashes
only once. Nothing else happens. But when I add a DEBUG "1"
statement before the LOOP command, the stamp flashes the LED and the
screen shows a one repeatedly. Why would I need to add a DEBUG
statement to make a loop function work? I'm comfused. Please help.
DO
HIGH 15
PAUSE 500
LOW 15
PAUSE 500
LOOP
--- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...>
wrote:
> You're running a laptop, aren't you? This has to do with your
serial
> port shutting down ... we've seen this a thousand times (cheap
serial
> ports are the bane of our existence). Two things you can do to
mitigate
> the problem.
>
> 1) Set your port FIFO settings to their minimum values
> 2) Add a DEBUG statement to your program (this holds the port open
so
> the computer doesn't want to shut it down).
>
> Main:
> DEBUG "LED Flasher"
> DO
> HIGH 15
> PAUSE 500
> LOW 15
> PAUSE 500
> LOOP
>
> -- Jon Williams
> -- Applications Engineer, Parallax
> -- Dallas Office
>
>
>
Original Message
> From: carns256 [noparse][[/noparse]mailto:carns256@y...]
> Sent: Monday, March 29, 2004 8:04 AM
> To: basicstamps@yahoogroups.com
> Subject: [noparse][[/noparse]basicstamps] Stumped
>
>
> I just got started in microcontrollers. I have a Rev B BASIC stamp
> HomeWork Board, and i'm using the Stamp Editor ver 2.0 Beta 2. I
> have a AAS in electronics, so I am comfortable with the projects in
> my Stamp In Class booklet. The odd thing, when I run a DEBUG
> statement, the stamp performes fine. But when I try the below
> program on the stamp, the power light flashes once, at the same
time
> the led on P15 coupled through a 470 ohm resister to Vss, flashes
> only once. Nothing else happens. But when I add a DEBUG "1"
> statement before the LOOP command, the stamp flashes the LED and
the
> screen shows a one repeatedly. Why would I need to add a DEBUG
> statement to make a loop function work? I'm comfused. Please help.
>
> DO
>
> HIGH 15
> PAUSE 500
> LOW 15
> PAUSE 500
>
> LOOP
of the Parallax editor (2.1 Beta 1) this will work
as expected;
'{$STAMP BS2}
'{$PBASIC 2.5}
DO
HIGH 15
PAUSE 500
LOW 15
PAUSE 500
LOOP
This will not;
'{$STAMP BS2}
DO
HIGH 15
PAUSE 500
LOW 15
PAUSE 500
LOOP
You need to insert the '{$PBASIC 2.5} for this type
of DO loop structure to work as expected.
--- In basicstamps@yahoogroups.com, "carns256" <carns256@y...> wrote:
> Yes I am running a laptop. Thanks for the information.
>
> --- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...>
> wrote:
> > You're running a laptop, aren't you? This has to do with your
> serial
> > port shutting down ... we've seen this a thousand times (cheap
> serial
> > ports are the bane of our existence). Two things you can do to
> mitigate
> > the problem.
> >
> > 1) Set your port FIFO settings to their minimum values
> > 2) Add a DEBUG statement to your program (this holds the port
open
> so
> > the computer doesn't want to shut it down).
> >
> > Main:
> > DEBUG "LED Flasher"
> > DO
> > HIGH 15
> > PAUSE 500
> > LOW 15
> > PAUSE 500
> > LOOP
> >
> > -- Jon Williams
> > -- Applications Engineer, Parallax
> > -- Dallas Office
> >
> >
> >
Original Message
> > From: carns256 [noparse][[/noparse]mailto:carns256@y...]
> > Sent: Monday, March 29, 2004 8:04 AM
> > To: basicstamps@yahoogroups.com
> > Subject: [noparse][[/noparse]basicstamps] Stumped
> >
> >
> > I just got started in microcontrollers. I have a Rev B BASIC
stamp
> > HomeWork Board, and i'm using the Stamp Editor ver 2.0 Beta 2. I
> > have a AAS in electronics, so I am comfortable with the projects
in
> > my Stamp In Class booklet. The odd thing, when I run a DEBUG
> > statement, the stamp performes fine. But when I try the below
> > program on the stamp, the power light flashes once, at the same
> time
> > the led on P15 coupled through a 470 ohm resister to Vss, flashes
> > only once. Nothing else happens. But when I add a DEBUG "1"
> > statement before the LOOP command, the stamp flashes the LED and
> the
> > screen shows a one repeatedly. Why would I need to add a DEBUG
> > statement to make a loop function work? I'm comfused. Please
help.
> >
> > DO
> >
> > HIGH 15
> > PAUSE 500
> > LOW 15
> > PAUSE 500
> >
> > LOOP