Having trouble downloading programs

Started by gvartani June 12, 2005
I was tweaking a program for stack size and time delay until I
realized pressing the reset button wasn't enough to get the program
to
download. I had to disconnect and reconnect the power. Then
eventually
the program stopped executing. I figured maybe I had been running
the
microcontroller for too long (all day). I gave it a break, and
started work today. It ran the program for less than 20 seconds,
then for each loop as it was printing data to my laptop's
monitor,
the microcontroller started chirping, and then it stopped. Now I
can't download any program, no matter what I do. I get an "Error
Code 200, Unable to halt Basicx" message. I press the reset button

nothing happens. I have tried this with both BX24 and BX24P
microcontrollers that I have - same symptoms. The program is
intended to read GPS text output at a 1200 Baud rate and does
calculations in a do loop to run a robot every two seconds. I don't
have the robot servo control in the program yet. The code is 5844
bytes and RAM usage is 230 bytes. Any insight?

Thanks in advance,
Gerald



> ... microcontroller started chirping, and then ... it stopped...

Sounds painful.

If you were playing with timers and didn't put a fixed delay at program
start, you might have inadvertently made it more difficult for DTR/ATN
to get the OS's attention. You say that a BX-24p does it, too, though;
it uses a different ATN mechanism, so that might not be the cause. Odd.

If there were a FAQ here, Q/A #1 would be "Never a problem before but,
since my mother-in-law visited, my BX-24 won't download! Help!". The
official answer would be: See page 29 of the "Basic Express Compiler
User's Guide" (V2.1).

You might try this too, Neil's method:
http://groups.yahoo.com/group/basicx/message/18892 Tom
Tom Becker
--... ...--
GTBecker@GTBe... www.RighTime.com
The RighTime Clock Company, Inc., Cape Coral, Florida USA
+1239 540 5700


Thanks Tom. I tried the rescue function; I also checked ATN Diagnostics -
seems fine. Still, I can't download. I used Neil's method too. I was
actually using that method last night, and it was working, until it didn't.
Nothing is happening. By the way, what's that chirping sound from the chip
when it prints data on the monitor?
_____

From: basicx@basi... [mailto:basicx@basi...] On Behalf Of
Tom Becker
Sent: Sunday, June 12, 2005 5:06 PM
To: basicx@basi...
Subject: RE: [BasicX] Having trouble downloading programs
> ... microcontroller started chirping, and then ... it stopped...

Sounds painful.

If you were playing with timers and didn't put a fixed delay at program
start, you might have inadvertently made it more difficult for DTR/ATN
to get the OS's attention. You say that a BX-24p does it, too, though;
it uses a different ATN mechanism, so that might not be the cause. Odd.

If there were a FAQ here, Q/A #1 would be "Never a problem before but,
since my mother-in-law visited, my BX-24 won't download! Help!". The
official answer would be: See page 29 of the "Basic Express Compiler
User's Guide" (V2.1).

You might try this too, Neil's method:
http://groups.yahoo.com/group/basicx/message/18892 Tom
Tom Becker
--... ...--
GTBecker@GTBe... www.RighTime.com
The RighTime Clock Company, Inc., Cape Coral, Florida USA
+1239 540 5700

_____

> Terms of Service.


Thanks Tom. I tried the rescue function; I also checked ATN
Diagnostics seems fine. Still, I can't download. I used
Neil's
method too. I was actually using that method last night, and it was
working, until it didn't. Nothing is happening. By the way,
what's
that chirping sound from the chip when it prints data on the
monitor? (sorry, if this is a duplicate; I'm still learning how to
use the group)

--- In basicx@basi..., "Tom Becker" <gtbecker@r...> wrote:
> > ... microcontroller started chirping, and then ... it stopped...
>
> Sounds painful.
>
> If you were playing with timers and didn't put a fixed delay at
program
> start, you might have inadvertently made it more difficult for
DTR/ATN
> to get the OS's attention. You say that a BX-24p does it, too,
though;
> it uses a different ATN mechanism, so that might not be the
cause. Odd.
>
> If there were a FAQ here, Q/A #1 would be "Never a problem before
but,
> since my mother-in-law visited, my BX-24 won't download! Help!".
The
> official answer would be: See page 29 of the "Basic Express
Compiler
> User's Guide" (V2.1).
>
> You might try this too, Neil's method:
> http://groups.yahoo.com/group/basicx/message/18892 > Tom >
> Tom Becker
> --... ...--
> GTBecker@R... www.RighTime.com
> The RighTime Clock Company, Inc., Cape Coral, Florida USA
> +1239 540 5700


> ... what's that chirping sound from the chip...

From what hardware? You say only that you are working on robot code.
Neither the BX-24 nor BX-24p emit any sound; is there a sounder on your
project? Tom
Tom Becker
--... ...--
GTBecker@GTBe... www.RighTime.com
The RighTime Clock Company, Inc., Cape Coral, Florida USA
+1239 540 5700


Gerald, are you using Com1? What is this "chirp" sound? The module
can not do this by itself. Are you using the Development Station or
other test environment? If so what is connected to your module?

- Tom

-- In basicx@basi..., "Gerald Vartanian" <gvartani@c...>
wrote:
> Thanks Tom. I tried the rescue function; I also checked ATN
Diagnostics -
> seems fine. Still, I can't download. I used Neil's method too. I was
> actually using that method last night, and it was working, until it
didn't.
> Nothing is happening. By the way, what's that chirping sound from
the chip
> when it prints data on the monitor? >
> _____
>
> From: basicx@basi... [mailto:basicx@basi...] On
Behalf Of
> Tom Becker
> Sent: Sunday, June 12, 2005 5:06 PM
> To: basicx@basi...
> Subject: RE: [BasicX] Having trouble downloading programs >
> > ... microcontroller started chirping, and then ... it stopped...
>
> Sounds painful.
>
> If you were playing with timers and didn't put a fixed delay at
program
> start, you might have inadvertently made it more difficult for
DTR/ATN
> to get the OS's attention. You say that a BX-24p does it, too,
though;
> it uses a different ATN mechanism, so that might not be the cause.
Odd.
>
> If there were a FAQ here, Q/A #1 would be "Never a problem before
but,
> since my mother-in-law visited, my BX-24 won't download! Help!".
The
> official answer would be: See page 29 of the "Basic Express Compiler
> User's Guide" (V2.1).
>
> You might try this too, Neil's method:
> http://groups.yahoo.com/group/basicx/message/18892 > Tom >
> Tom Becker
> --... ...--
> GTBecker@R... www.RighTime.com
> The RighTime Clock Company, Inc., Cape Coral, Florida USA
> +1239 540 5700 >
>
> _____
>
> > Terms of Service. >
>


I use the module in two different setups. I use it on an xbotx and
on a bx24 development board. It really shouldn't be making any
sounds, but the BX24 does (BX24P doesn't). I am not sending any
commands to a device that can make a sound. When I collect data, I
have a CMPS03 Devantech compass and a Garmin GPS connected to the
chip, but the sound comes from the chip. Also, my problem with
downloads persists. I have found out that letting the chip sit over
night allows me a few downloads until it gets stuck again??? I am
using Com1 for downloads and I have my GPS use the COM3 and run as a
task. The CMPS03 uses Gerald Coe's code from CMPS03 website (I2C). I
don't assume there is a conflict as I have collected data
successfully in the past. That's before I had my control loops in
the program printing what I would feed the servos. I do print out
ten parameters with strings in each loop and I have a call sleep
(2.0) delay just before the end of the loop. I have coded any form
of delay before that in the program. Should I?
Thanks, - Gerald

--- In basicx@basi..., "tombhandley" <gr13tbs@c...> wrote:
> Gerald, are you using Com1? What is this "chirp" sound? The module
> can not do this by itself. Are you using the Development Station
or
> other test environment? If so what is connected to your module?
>
> - Tom
>
> -- In basicx@basi..., "Gerald Vartanian" <gvartani@c...>
> wrote:
> > Thanks Tom. I tried the rescue function; I also checked ATN
> Diagnostics -
> > seems fine. Still, I can't download. I used Neil's method too. I
was
> > actually using that method last night, and it was working, until
it
> didn't.
> > Nothing is happening. By the way, what's that chirping sound
from
> the chip
> > when it prints data on the monitor?
> >
> >
> >
> > _____
> >
> > From: basicx@basi... [mailto:basicx@basi...] On
> Behalf Of
> > Tom Becker
> > Sent: Sunday, June 12, 2005 5:06 PM
> > To: basicx@basi...
> > Subject: RE: [BasicX] Having trouble downloading programs
> >
> >
> >
> > > ... microcontroller started chirping, and then ... it
stopped...
> >
> > Sounds painful.
> >
> > If you were playing with timers and didn't put a fixed delay at
> program
> > start, you might have inadvertently made it more difficult for
> DTR/ATN
> > to get the OS's attention. You say that a BX-24p does it, too,
> though;
> > it uses a different ATN mechanism, so that might not be the
cause.
> Odd.
> >
> > If there were a FAQ here, Q/A #1 would be "Never a problem
before
> but,
> > since my mother-in-law visited, my BX-24 won't download!
Help!".
> The
> > official answer would be: See page 29 of the "Basic Express
Compiler
> > User's Guide" (V2.1).
> >
> > You might try this too, Neil's method:
> > http://groups.yahoo.com/group/basicx/message/18892
> >
> >
> > Tom
> >
> >
> >
> > Tom Becker
> > --... ...--
> > GTBecker@R... www.RighTime.com
> > The RighTime Clock Company, Inc., Cape Coral, Florida USA
> > +1239 540 5700
> >
> >
> >
> >
> > _____
> >
> > > Terms of Service.
> >
> >
> >
> >



Gerald, I'm 'baffled' at the noise...

I have posted an I2C Module (also inspired by Gerald Coe's example)
and a CMPS03 example [CMPS03.zip] on my web site at:

http://home.comcast.net/~tomhandley/bx-24/bx-24.html

With the original BX-24, I've had problems downloading when I used
Com1 in an application. It took awhile before I could get it to work.
I have not tested that with the newer BX-24/P.

You might want to try a delay when the program starts up and before
you take control of Com1.

- Tom --- In basicx@basi..., "gvartani" <gvartani@c...> wrote:
> I use the module in two different setups. I use it on an xbotx and
> on a bx24 development board. It really shouldn't be making any
> sounds, but the BX24 does (BX24P doesn't). I am not sending any
> commands to a device that can make a sound. When I collect data, I
> have a CMPS03 Devantech compass and a Garmin GPS connected to the
> chip, but the sound comes from the chip. Also, my problem with
> downloads persists. I have found out that letting the chip sit over
> night allows me a few downloads until it gets stuck again??? I am
> using Com1 for downloads and I have my GPS use the COM3 and run as
a
> task. The CMPS03 uses Gerald Coe's code from CMPS03 website (I2C).
I
> don't assume there is a conflict as I have collected data
> successfully in the past. That's before I had my control loops in
> the program printing what I would feed the servos. I do print out
> ten parameters with strings in each loop and I have a call sleep
> (2.0) delay just before the end of the loop. I have coded any form
> of delay before that in the program. Should I?
> Thanks, - Gerald
>
> --- In basicx@basi..., "tombhandley" <gr13tbs@c...> wrote:
> > Gerald, are you using Com1? What is this "chirp" sound? The
module
> > can not do this by itself. Are you using the Development Station
> or
> > other test environment? If so what is connected to your module?



Tom, Thanks for the reply. I will keep you posted on the chirping
sound. When on xbotx i am suspecting the sound source might be the
LCD even though I am not driving it with my code.
I think I figured out my original problem with downloading - a silly
mistake. In what I am now using as my main program module, a long
time ago, I had commented out "Public Sub Main ()" and had replaced
it with "Sub Main ()". As things progressed, this time around I used
this module as the main program without proper coding. I think the
program didn't know where to start. The couple of times it ran or
downloaded must have been just a matter of luck with timing. Thanks
again for the help.
I will experiment with those delays as you suggested. BTW, nice work
with your sample codes.

-Gerald
--- In basicx@basi..., "tombhandley" <gr13tbs@c...> wrote:
> Gerald, I'm 'baffled' at the noise...
>
> I have posted an I2C Module (also inspired by Gerald Coe's
example)
> and a CMPS03 example [CMPS03.zip] on my web site at:
>
> http://home.comcast.net/~tomhandley/bx-24/bx-24.html
>
> With the original BX-24, I've had problems downloading when I used
> Com1 in an application. It took awhile before I could get it to
work.
> I have not tested that with the newer BX-24/P.
>
> You might want to try a delay when the program starts up and
before
> you take control of Com1.
>
> - Tom > --- In basicx@basi..., "gvartani" <gvartani@c...> wrote:
> > I use the module in two different setups. I use it on an xbotx
and
> > on a bx24 development board. It really shouldn't be making any
> > sounds, but the BX24 does (BX24P doesn't). I am not sending any
> > commands to a device that can make a sound. When I collect data,
I
> > have a CMPS03 Devantech compass and a Garmin GPS connected to
the
> > chip, but the sound comes from the chip. Also, my problem with
> > downloads persists. I have found out that letting the chip sit
over
> > night allows me a few downloads until it gets stuck again??? I
am
> > using Com1 for downloads and I have my GPS use the COM3 and run
as
> a
> > task. The CMPS03 uses Gerald Coe's code from CMPS03 website
(I2C).
> I
> > don't assume there is a conflict as I have collected data
> > successfully in the past. That's before I had my control loops
in
> > the program printing what I would feed the servos. I do print
out
> > ten parameters with strings in each loop and I have a call sleep
> > (2.0) delay just before the end of the loop. I have coded any
form
> > of delay before that in the program. Should I?
> > Thanks, - Gerald
> >
> > --- In basicx@basi..., "tombhandley" <gr13tbs@c...>
wrote:
> > > Gerald, are you using Com1? What is this "chirp" sound? The
> module
> > > can not do this by itself. Are you using the Development
Station
> > or
> > > other test environment? If so what is connected to your module?



> ... suspecting the sound source might be the LCD [on the XBotX]...

Might you suspect the piezo sounder right next to the BX-24 and LCD? Tom
Tom Becker
--... ...--
GTBecker@GTBe... www.RighTime.com
The RighTime Clock Company, Inc., Cape Coral, Florida USA
+1239 540 5700