EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

BasicX 24 Factory Program Wont Halt (used with Parallax BOE)

Started by rustyk_78 November 3, 2005
Hello,

I just received my brand new BasicX microcontroller today.
I've read the entire Hardware Reference manual and followed the steps
closely. I am running the BasicX on Parallax BOE (USB Version - w
FTDI USB -> Serial Driver). I am able to receive the outputs from the
pre-loaded program :

Welcome To:

Basic Basic
Basic Basic
Basic Basic
Basic
Basic Basic
Basic Basic
Basic Basic"

Hello World BX-24

However, when I try downloading a new program I get the "Unable to
Halt BasicX" Error message. I've noticed a few people reporting this
error in this forum. I've tried everything mentioned :
- Turn off Power before Download
- "Rescue" Option
- Removing and Reattaching the BasicX to the BOE
- Replacing the 4 AA batteries - Reading Vin of 5.90 V
- Resetting during download attempts

Using the ATN diagnostic tool I tried measuring the voltage between
the ATN pin and ground and noticed no change in voltage when the pin
was set to high - constant reading of 0.1 mV ..so as far as I can
tell this is the cause of my problem.
What exactly should be my next step?

Any help would be greatly appreciated? I am fairly desperate as I
switched from my BS2 microcontroller and need to program my robot for
a Firefighting competition in 10 days.

Thank you kindly for your time.

Cheers,

R.K.


--- In basicx@basi..., "rustyk_78" <mudslut@h...> wrote:
> Replacing the 4 AA batteries - Reading Vin of 5.90 V

This sounds too low unless it is being applied to pin 21 of the BX-
24 then it's too high. The BX-24P requires at least 6.7 volts
applied to pin 24 (or 5 volts to pin 21) if you want it to run
reliably.

> Using the ATN diagnostic tool I tried measuring the voltage
> between the ATN pin and ground and noticed no change in voltage
> when the pin was set to high - constant reading of 0.1 mV ..so
> as far as I can tell this is the cause of my problem.

I took a quick look at the USB BOE schematic and found something
that is likely to be a problem. The schematic is available at:
http://www.parallax.com/dl/docs/prod/robo/BOEUSBSchem.PDF

The problem is that the DTR line from the USB interface is fed via a
capacitor and transistor to the ATN pin (pin 3). This would explain
why you see the voltage that you reported - on a negative transition
of DTR the PNP transistor will turn on briefly (perhaps a few
microseconds to tens of microseconds). The BX-24 has similar
circuitry on it and it may be that the pulsewidth is too narrow to
trigger a reset on the BX-24.

If you're adventuresome, you might try putting a 10K resistor across
the 0.1uF capacitor shown in the upper right corner of the second
page of the schematic. This will be difficult since the capacitor
is a surface mount defive but you may be able to hold it in place
and have an assistant invoke the download.

Before doing this, you should probably verify the voltage swing on
the DTR output. I suspect that it is 0-5 volts. If it is not,
don't do as I suggested without some further research and analysis.

Don


While the BX-24 is pin compatible with the Parallax boards, Parallax
introduced two capacitors on the DTR goint to the ATN [one is in
series and one is to Vss] line because of troubles they were having
with their later, faster BasicStamps being programed from a direct
connection. So, depending on the generation of documents you may see
this feature or may not. Nonetheless, it is on the newer boards.

Apparently BX-24 resolved the problem in another way [on the BX-24?]
or never had the problem, so there is where your circuitry conflicts
are originating from.

The capacitor and transistor combination seems to be another
generation of fix to properly accommodate the USB interface.

> The problem is that the DTR line from the USB interface is fed via
a
> capacitor and transistor to the ATN pin (pin 3).


Hey Guys,

Thank you kindly for the replies. Don't know if I'm all that
adventurous but I am pretty desperate at the moment. Does anyone see
any other options?

Cheers,

R.K.


> Does anyone see any other options?

By and far the two easiest options are to either by the Netmedia's
board that does not have the more complex ATN interface or to build
yourself a similar simple prototype board with a DB-9 RS-232 port. I
imagine you could shop around for 3rd party boards - there are some.

But they all seem to support RS-232, not USB. I presume that you prefer
using the USB interface. So consider having a USB to RS-232 adapter
would allow you to switch back and forth quite easily.

The USB port on the development board adds to both cost and
complexity. You have run into the issue of complexity in reguards to
mix and match of different manufactures.


--- In basicx@basi..., "rustyk_78" <mudslut@h...> wrote:
>
> I am running the BasicX on Parallax BOE (USB Version - w FTDI USB ->
Serial Driver).

It can be the FTDI USB -> Serial driver problem. Try different one.


--- In basicx@basi..., "rustyk_78" <mudslut@h...> wrote:
>
> I am running the BasicX on Parallax BOE (USB Version - w FTDI USB ->
Serial Driver).

It can be the FTDI USB -> Serial driver problem. Try different one.



Hey Guys,

Thank you kindly for all your help. Unfortunately I am
still unable to halt the BasicX 24 via the Parallax BOE USB. I updated
my FTDI driver to the latest version but with no luck. So I sucked it
up and bought a BOE Serial version ( I would have bought the NetMedia
version but I wanted something with a solderless breadboard since I'm
pretty new to all this and am sure to make mistakes.) Does anyone know
if things will be different with the BasicX 24P. Does NetMedia know
about this problem? Currently they are still stating that the BasicX 24
is a drop in replacement for the BS2 which isn't the case in certain
conditions. Anyhow, thank you for all the help.

Cheers,

R.K.


> ... Does anyone know if things will be different with the BasicX 24p[?]

The BX-24 IDE used a series of DTR/ATN pulses from COM1 to get the
processor's attention via an otherwise-unused processor pin, T1; the
BX-24 OS continually monitors that pin and can miss the ATN signals
under some conditions.

The BX-24p uses the processor reset pin, which cannot be missed,
instead of T1 so, yes, there might well be different behavior from the
BX-24p. Tom


--- In basicx@basi..., "ybernikov" <ybernikov@y...> wrote:
> It can be the FTDI USB -> Serial driver problem.

Perhaps. I have found that some USB to serial converters are not fast
enough for the ATN toggling protocol used to reset and download to the
BX-24. Out of four different ones that I have tried, the only one
that did work was the FTDI-based unit.

I believe that adapters based on the FTDI chip FT232BM should work.

Don



The 2024 Embedded Online Conference