Discussion forum for the BasicX family of microcontroller chips.
C programming for BX-24 - tieutaydoc - Dec 23 14:21:00 2005
Does anyone know if we can get write code for the BX-24 in C. I think
that GCC support the Atmel chip and it'll compile code for the bx-24
but I don't have any idea how we can d/l it on the chip. If anyone know
anything about this, please let me know. Thanks.
Jimmy

(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )
Re: C programming for BX-24 - arhodes19044 - Dec 26 16:59:00 2005
--- In basicx@basi..., "tieutaydoc" <tieutaydoc@y...> wrote:
>
> Does anyone know if we can get write code for the BX-24 in C. I
think
Well, I do not think it is possible. Certainly not thru GCC.
BUT, I have seen BX-24/Stamp-style devices out there which do not have
the imbedded interpreter. Check www.avrfreaks.com for much info. I
bet you already knew of this site. If you look in the "tools"
section, you will find stuff. I just found this:
http://www.lawicel.com/staver/staver24m32.htm
I am sure there is more. And if you do not absolutely require the 24
pin dip package, then there are even more possibilities
-Tony

(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )
Re: C programming for BX-24 - Don Kinzer - Dec 26 23:17:00 2005
--- In basicx@basi..., "arhodes19044" <spamiam@c...> wrote:
> Well, I do not think it is possible. Certainly not thru GCC.
Actually, it is possible but perhaps not in the way that the OP was
thinking. Since the BX-24P is just an ATmega8535 with some interface
circuitry, there is no reason that you can't write code for the base
processor in C using WinAVR. Likewise, you can write code in any
language that can compile for the mega8535 target. Once you program
it, though, the factory-installed interpreter will be gone and it'll
no longer be functional for BasicX.
The AVR chip can be programmed using the In-System Programming
interface pins available along the pin-1 end of the BX-24 (SCK, MOSI,
MISO, /Reset and ground). Mike has a schematic on his site
(http://home.austin.rr.com/perks/micros) for an inexpensive AVR
programmer and you can use AVR Dude to drive it from a PC.
Don
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.
(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )
Re: C programming for BX-24 - arhodes19044 - Dec 28 13:26:00 2005
I had not thought of that... wiping out the AVR's BASIC interpreter
and programming it directly.
I THINK that there are less expensive (than the BX-24) BX-style DIP
packaged plain AVR boards . But the BX does have some nice support
hardware all built-in. Oscillator, EEPROM, etc.
So, it might not be a terrible thing to wipe it out and use it raw.
If you can program in C, then you sure will get some performance
boost. I think it might be possible to READ the bootloader off the
chip, then re-load the image back when you want and restore the
hardware to BX-24-ness.
I have never used bootloaders on the AVR's, so I am not sure that
one can read the necessary data, but I think you can do it.
BTW, I have designed, (but not yet assembled) a 60+ pin (0.8")DIP
ATMega128 board. It does not have any external memory on the DIP
the way the BX has, but I have designed stacking daughter boards
which will provide many accessory functions (such as battery backed
precision RTC + FRAM, also one with ISP+Serial interfaces, and
another with SPI FRAM + SPI SD card interface and some other ideas.
I can share the info if anyone is interested.
-Tony

(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )
Re: Re: C programming for BX-24 - Mike Perks - Dec 28 14:51:00 2005
arhodes19044 wrote:
> I had not thought of that... wiping out the AVR's BASIC interpreter
> and programming it directly.
>
> I THINK that there are less expensive (than the BX-24) BX-style DIP
> packaged plain AVR boards . But the BX does have some nice support
> hardware all built-in. Oscillator, EEPROM, etc.
Yes there are and much cheaper than a BX-24.
> So, it might not be a terrible thing to wipe it out and use it raw.
>
> If you can program in C, then you sure will get some performance
> boost. I think it might be possible to READ the bootloader off the
> chip, then re-load the image back when you want and restore the
> hardware to BX-24-ness.
Erasing the BasicX interpreter is a one way street.You cannot go back.
To my knowledge NetMedia are the only folks who have the BasicX binary
code for the Atmel chip and would be able to recreate a BasicX chip
after you "erased" it.
> I have never used bootloaders on the AVR's, so I am not sure that
> one can read the necessary data, but I think you can do it.
Based on my investigations into the internals of BasicX (by examining
the external interface), it does not use a bootloader and you will not
be able to read the necessary data. The code to download BasicX programs
into EEPROM is not a boot loader but a program loader and is built into
the BasicX runtime.
Mike
http://home.austin.rr.com/perks/micros/
http://home.austin.rr.com/perks/micros/Articles/ - internals of BasicX
runtime

(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )
Re: C programming for BX-24 - arhodes19044 - Dec 29 9:33:00 2005
--- In basicx@basi..., Mike Perks <basicx@a...> wrote:
>Based on my investigations into the internals of BasicX (by examining
>the external interface), it does not use a bootloader and you will not
>be able to read the necessary data. The code to download BasicX
>programs
>into EEPROM is not a boot loader but a program loader and is built
>into
>the BasicX runtime.
Oh well, there it is.
I had gotten all excited and thought I could rig up a JTAG connector
to the BX and then read out the binary, save it, overwrite it, and
then later restore it.
Well, as you said, there are other DIP packaged plain AVR devices out
there at a reasonable cost. Can you give any examples of stuff that
is available here in the US? The couple of things I found after a
cursory look would have to ship from Europe.
It is not a silly thing to use a BASIC interpreter device when you
have the hardware and software to program the AVR devices in C/ASM/or
whatever. The BASIC device requires little overhead on the user's
part and is a quick method to test ideas.
In my case, when the ideas work, then I go to the effort of doing it
is C, but only if I really need the speed of a raw AVR system at the
expense of the inconvenience of having to put together all the C
library modules and hope whey all work well together.
-Tony

(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )
Re: C programming for BX-24 - Eric - Dec 29 12:02:00 2005
Pololu is in the US and their Baby Orangutan is a 24 pin dip package
with Atmega48. Unfortunately, only 4K of flash. Not sure it if it
pin-compatible with BX.
http://www.pololu.com/products/pololu/0215/
These guys also have a 24 pin dip package for the Atmega128. Again,
not sure if pin compatible with BX. Click on TiniAVR in the menu on
the left.
http://www.newmicros.com/
--- In basicx@basi..., "arhodes19044" <spamiam@c...> wrote:
>
> --- In basicx@basi..., Mike Perks <basicx@a...> wrote:
> >Based on my investigations into the internals of BasicX (by examining
> >the external interface), it does not use a bootloader and you will not
> >be able to read the necessary data. The code to download BasicX
> >programs
> >into EEPROM is not a boot loader but a program loader and is built
> >into
> >the BasicX runtime.
>
> Oh well, there it is.
>
> I had gotten all excited and thought I could rig up a JTAG connector
> to the BX and then read out the binary, save it, overwrite it, and
> then later restore it.
>
> Well, as you said, there are other DIP packaged plain AVR devices out
> there at a reasonable cost. Can you give any examples of stuff that
> is available here in the US? The couple of things I found after a
> cursory look would have to ship from Europe.
>
> It is not a silly thing to use a BASIC interpreter device when you
> have the hardware and software to program the AVR devices in C/ASM/or
> whatever. The BASIC device requires little overhead on the user's
> part and is a quick method to test ideas.
>
> In my case, when the ideas work, then I go to the effort of doing it
> is C, but only if I really need the speed of a raw AVR system at the
> expense of the inconvenience of having to put together all the C
> library modules and hope whey all work well together.
>
> -Tony

(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )
Re: C programming for BX-24 - Don Kinzer - Dec 29 12:32:00 2005
--- In basicx@basi..., "arhodes19044" <spamiam@c...> wrote:
> I had gotten all excited and thought I could rig up a JTAG
> connector to the BX and then read out the binary, save it,
> overwrite it, and then later restore it.
The AVR and other microcontrollers generally have a protection
mechanism to allow the firmware to be protected from copying. In the
AVR series, there are "lock bits" that provide different levels of
protection. I suspect that the BX is locked to prevent reading the
Flash memory.
Don
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.
(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )
Re: C programming for BX-24 - arhodes19044 - Dec 29 22:56:00 2005
Both of those are nice. From what I can tell, neither is pin
compatible with the BX, but that is not necessarily a problem.
The Pololu device can be supplied with an ATMega168. This probably
will give all the functionality (including program space)of the BX,
and greater speed.
Unfortunately, more I/O pins quickly become necessary in larger
projects. Then the full connectivity of the 64 pin AVR devices
becomes necessary. A 24 pin DIP package rapidly becomes insufficient.
-Tony
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.
(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )
OT I/O pins (was C programming for BX-24) - Mike Perks - Dec 30 0:37:00 2005
arhodes19044 wrote:
> Unfortunately, more I/O pins quickly become necessary in larger
> projects. Then the full connectivity of the 64 pin AVR devices
> becomes necessary. A 24 pin DIP package rapidly becomes insufficient.
I agree that a 24-pin DIP is insufficient especially with the dual usage
of many pins on the BX-24. This is why I personally favor the BX-35. In
my view the 64pin and 100 pin AVR devices became popular for several
reasons:
* Larger flash
* Ability to use extra pins to address SRAM memory
* Ability to use extra pins to direct drive LCDs (at least that's
what Atmel thinks)
The need for larger flash memory in 44 pins chips is partly addressed by
the ATmega32 and soon by the ATMega644.
I believe that you should look at off-chip processing for additional
I/O. A simple example is a 3 to 8 decoder. BasicX supports two kinds of
buses (SPI and I2C) that you can hook up a huge variety of devices. For
complex projects offloading stepper motor control, quadrature input or
distance measurement makes a lot of sense. This is the same kind of
architecture used for larger computers.
Mike
http://home.austin.rr.com/perks/micros/
[Non-text portions of this message have been removed]

(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )