LightMeter.bs2
Archiver
Posts: 46,084
Hi,
I'm new to these forums, this wonderful technology and a recent
purchaser of the HomeWork board. In the text, "What's a
Microcontroller?", chapter 7, pg 207, refers to code that is supposed
to turn on the segments, (A-F) of a display one at a time at the
speed set for the amount of light at the photocell.
When I run the program, the individual segments come on only once;
segA, then just segB, etc., until segF. They then remain off but the
program is still running because if a place a "DEBUG ? index" into
the Update_Display subroutine, the index cycles between 0 and 6,
repeatedly. The strange thing is: the seven segment display does
what its supposed to do, but only if a DEBUG statement is within the
code.
Please HELP as I JUST DON'T UNDERSTAND WHAT THE PROBLEM IS??
Jon
I'm new to these forums, this wonderful technology and a recent
purchaser of the HomeWork board. In the text, "What's a
Microcontroller?", chapter 7, pg 207, refers to code that is supposed
to turn on the segments, (A-F) of a display one at a time at the
speed set for the amount of light at the photocell.
When I run the program, the individual segments come on only once;
segA, then just segB, etc., until segF. They then remain off but the
program is still running because if a place a "DEBUG ? index" into
the Update_Display subroutine, the index cycles between 0 and 6,
repeatedly. The strange thing is: the seven segment display does
what its supposed to do, but only if a DEBUG statement is within the
code.
Please HELP as I JUST DON'T UNDERSTAND WHAT THE PROBLEM IS??
Jon
Comments
believe it or not -- is your serial port. It is shutting off and
resetting the Stamp (we've seen this before). DEBUG keeps the port open
and active so the PC doesn't shut it down. You can usually fix the
problem by setting the port FIFO buffers to there minimum values.
-- Jon Williams
-- Applications Engineer, Parallax
-- Dallas Office
Original Message
From: jdahpuser2004 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=uEo8w6mPQwzYahEhbxktuqWwVls-sT5xYbr3joHgecQw9OwDyMvCIoPMqNGWgZTlp9twqoKituPPE9-TIrI]jda.hpuser@v...[/url
Sent: Sunday, January 18, 2004 3:17 PM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] LightMeter.bs2
Hi,
I'm new to these forums, this wonderful technology and a recent
purchaser of the HomeWork board. In the text, "What's a
Microcontroller?", chapter 7, pg 207, refers to code that is supposed
to turn on the segments, (A-F) of a display one at a time at the
speed set for the amount of light at the photocell.
When I run the program, the individual segments come on only once;
segA, then just segB, etc., until segF. They then remain off but the
program is still running because if a place a "DEBUG ? index" into
the Update_Display subroutine, the index cycles between 0 and 6,
repeatedly. The strange thing is: the seven segment display does
what its supposed to do, but only if a DEBUG statement is within the
code.
Please HELP as I JUST DON'T UNDERSTAND WHAT THE PROBLEM IS??
Jon
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
This message has been scanned by WebShield. Please report SPAM to
abuse@p....
I am thinking that I could use a USB to SerialPort adapter, (as I use
a FaxModem), will I run into the same problems with USB?
Jon
--- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...>
wrote:
> You're using a laptop computer, aren't you? If yes, the problem --
> believe it or not -- is your serial port. It is shutting off and
> resetting the Stamp (we've seen this before). DEBUG keeps the port
open
> and active so the PC doesn't shut it down. You can usually fix the
> problem by setting the port FIFO buffers to there minimum values.
>
> -- Jon Williams
> -- Applications Engineer, Parallax
> -- Dallas Office
>
>
>
Original Message
> From: jdahpuser2004 [noparse][[/noparse]mailto:jda.hpuser@v...]
> Sent: Sunday, January 18, 2004 3:17 PM
> To: basicstamps@yahoogroups.com
> Subject: [noparse][[/noparse]basicstamps] LightMeter.bs2
>
>
> Hi,
>
> I'm new to these forums, this wonderful technology and a recent
> purchaser of the HomeWork board. In the text, "What's a
> Microcontroller?", chapter 7, pg 207, refers to code that is
supposed
> to turn on the segments, (A-F) of a display one at a time at the
> speed set for the amount of light at the photocell.
>
> When I run the program, the individual segments come on only once;
> segA, then just segB, etc., until segF. They then remain off but
the
> program is still running because if a place a "DEBUG ? index" into
> the Update_Display subroutine, the index cycles between 0 and 6,
> repeatedly. The strange thing is: the seven segment display does
> what its supposed to do, but only if a DEBUG statement is within
the
> code.
>
> Please HELP as I JUST DON'T UNDERSTAND WHAT THE PROBLEM IS??
>
> Jon
>
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the
Subject
> and Body of the message will be ignored.
>
>
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/basicstamps/
>
> To unsubscribe from this group, send an email to:
> basicstamps-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to:
> http://docs.yahoo.com/info/terms/
>
>
>
>
> This message has been scanned by WebShield. Please report SPAM to
> abuse@p...
not all are create equal (as we are so painfully coming to learn). The
Bafo unit we sell (or you can pick up locally) works well.
-- Jon Williams
-- Applications Engineer, Parallax
-- Dallas Office
Original Message
From: jdahpuser2004 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=Xq9QhZQzHWWgnQdbbr3flbOYtL-HrfWsfVPZFHKvOc-d-KfUb7F6bOXz7pwPTF6nibkaY0AlymPnuETtuQ]jda.hpuser@v...[/url
Sent: Monday, January 19, 2004 1:16 PM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Re: LightMeter.bs2
YES I am!
I am thinking that I could use a USB to SerialPort adapter, (as I use
a FaxModem), will I run into the same problems with USB?
Jon
--- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...>
wrote:
> You're using a laptop computer, aren't you? If yes, the problem --
> believe it or not -- is your serial port. It is shutting off and
> resetting the Stamp (we've seen this before). DEBUG keeps the port
open
> and active so the PC doesn't shut it down. You can usually fix the
> problem by setting the port FIFO buffers to there minimum values.
>
> -- Jon Williams
> -- Applications Engineer, Parallax
> -- Dallas Office
>
>
>
Original Message
> From: jdahpuser2004 [noparse][[/noparse]mailto:jda.hpuser@v...]
> Sent: Sunday, January 18, 2004 3:17 PM
> To: basicstamps@yahoogroups.com
> Subject: [noparse][[/noparse]basicstamps] LightMeter.bs2
>
>
> Hi,
>
> I'm new to these forums, this wonderful technology and a recent
> purchaser of the HomeWork board. In the text, "What's a
> Microcontroller?", chapter 7, pg 207, refers to code that is
supposed
> to turn on the segments, (A-F) of a display one at a time at the
> speed set for the amount of light at the photocell.
>
> When I run the program, the individual segments come on only once;
> segA, then just segB, etc., until segF. They then remain off but
the
> program is still running because if a place a "DEBUG ? index" into
> the Update_Display subroutine, the index cycles between 0 and 6,
> repeatedly. The strange thing is: the seven segment display does
> what its supposed to do, but only if a DEBUG statement is within
the
> code.
>
> Please HELP as I JUST DON'T UNDERSTAND WHAT THE PROBLEM IS??
>
> Jon
intended only for PDA's, then it should
work. The problem with USB adapters is they
need to support the RS232 'handshake' signals
to properly program the BS2.
The 'BAFO' unit sold by Parallax works well,
as do the KeySpan. I've had problems with
older (2002) Belkin adapters, so be warned.
Give it a try, and see what happens if you
already have one on hand.
--- In basicstamps@yahoogroups.com, "jdahpuser2004" <jda.hpuser@v...>
wrote:
> YES I am!
>
> I am thinking that I could use a USB to SerialPort adapter, (as I
use
> a FaxModem), will I run into the same problems with USB?
>
> Jon
>
> --- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...>
> wrote:
> > You're using a laptop computer, aren't you? If yes, the problem -
-
> > believe it or not -- is your serial port. It is shutting off and
> > resetting the Stamp (we've seen this before). DEBUG keeps the
port
> open
> > and active so the PC doesn't shut it down. You can usually fix
the
> > problem by setting the port FIFO buffers to there minimum values.
> >
> > -- Jon Williams
> > -- Applications Engineer, Parallax
> > -- Dallas Office
> >
> >
> >
Original Message
> > From: jdahpuser2004 [noparse][[/noparse]mailto:jda.hpuser@v...]
> > Sent: Sunday, January 18, 2004 3:17 PM
> > To: basicstamps@yahoogroups.com
> > Subject: [noparse][[/noparse]basicstamps] LightMeter.bs2
> >
> >
> > Hi,
> >
> > I'm new to these forums, this wonderful technology and a recent
> > purchaser of the HomeWork board. In the text, "What's a
> > Microcontroller?", chapter 7, pg 207, refers to code that is
> supposed
> > to turn on the segments, (A-F) of a display one at a time at the
> > speed set for the amount of light at the photocell.
> >
> > When I run the program, the individual segments come on only
once;
> > segA, then just segB, etc., until segF. They then remain off but
> the
> > program is still running because if a place a "DEBUG ? index"
into
> > the Update_Display subroutine, the index cycles between 0 and 6,
> > repeatedly. The strange thing is: the seven segment display does
> > what its supposed to do, but only if a DEBUG statement is within
> the
> > code.
> >
> > Please HELP as I JUST DON'T UNDERSTAND WHAT THE PROBLEM IS??
> >
> > Jon
> >
> >
> >
> > To UNSUBSCRIBE, just send mail to:
> > basicstamps-unsubscribe@yahoogroups.com
> > from the same email address that you subscribed. Text in the
> Subject
> > and Body of the message will be ignored.
> >
> >
> > Yahoo! Groups Links
> >
> > To visit your group on the web, go to:
> > http://groups.yahoo.com/group/basicstamps/
> >
> > To unsubscribe from this group, send an email to:
> > basicstamps-unsubscribe@yahoogroups.com
> >
> > Your use of Yahoo! Groups is subject to:
> > http://docs.yahoo.com/info/terms/
> >
> >
> >
> >
> > This message has been scanned by WebShield. Please report SPAM to
> > abuse@p...