Compatibility

Hello all, my name is Glenn and am new to Arduino and programming micros. I have a question that some may think is foolish but I have googled for the answers but as of yet have not found any answers. I have an assortment of the older Atmel chips such as the AT90S2313, AT90S3535, etc and was wondering if I can use the Arduino programming language to program the chips? I have a Atmel STK500 to download the sketch but didn't know if everything would be compatible or not.

Thank you in advance for any comment, suggestions, and guidance.

Scottjge

AT90S2313 ... From that datasheet, it looks very similar to an ATtiny2313. That one is probably usable with Arduino.

AT90S3535 ... I can't find a datasheet for that one.

Oh boy, I am sorry about the errors on the part numbers. I have the following Micro’s, AT90S2313, AT90S2323, AT90S4414, AT90S8515, and the AT90S8535. They are all old stock and I don’t think Atmel even makes them anymore. I bought them a while back, thinking that I would learn to program them and then I had a stroke. It has been three years since and I got the interest back up to see if I could learn to use them. While on the web, I see the Arduino and that really sparked my interest again. I am going to order a Arduino next month when I get some money saved up but in the mean while I was wondering about these Micro’s that I have. I don’t know whether the Arduino language which is a derivative of C. ( I think), would work with the older chips or not.

Again, I am very sorry for the errors on the part numbers.

Scottjge

might want to look here

http://www.avr-developers.com/

but I did not see any of the old chips listed at first glance

Thanks, I will check it out. I figured that they wouldn't work. In the world of electronics, everything is obsolete within a year. I will just have to wait until I get the cash for a authentic Arduino.

Thanks for your help, Scotty

It depends on how much work you want to do. You will need a bootloader and a UART in the chip. As long as the chip has a UART and enough resources to hold the bootloader you might be able modify the bootloader to work with it. Then you'd need to configure the IDE and AVRdude to recognize and work with the 'new' device. Hacking the IDE is easy, it's the bootloader that would be the bulk of the work.

Even if the chip did not have a UART it could be done, but that would be a ton more work and more bootloader code to handle the bit-banging.

AT90S2313 ... Appears to be similar to an ATtiny2313.

AT90S2323 ... Appears to be similar to ATtiny13 and ATtiny85.

AT90S4414, AT90S8515 ... Same processor with different amounts of memory. Is not similar to anything I've used.

AT90S8535 ... Looks like the same pin layout as the two above.

I don't know whether the Arduino language which is a derivative of C

The Arduino language is highly conforming C++.

would work with the older chips or not

That is a potential problem. The instruction set for the older chips looks identical to the newer ones. I suspect, in the worst case, you may have to build programs for a similar processor (e.g. build for an ATtiny13 processor when you are using an AT90S2323).

You will need a bootloader and a UART in the chip.

Naw. All those processors support serial ISP.

True, but I meant if you wanted it to work directly from the IDE.

I should have been more clear.

BillO: True, but I meant if you wanted it to work directly from the IDE.

The IDE doesn't care if there is a bootloader in the mix. I've used a Pololu USB AVR Programmer and an Uno running ArduinoISP (serial ISP) to program all sorts of AVR processors directly from the IDE.

I don’t think we are talking about the same thing.

Anyway, this seems more important to you than to me, so … Okay, i agree.

BillO: I don't think we are talking about the same thing.

Anyway, this seems more important to you than to me, so ... Okay, i agree.

It is the same thing. The IDE does not care if avrdude uses a serial port or ISP to program the part. If avrdude uses a programmer that uses the ISP interface rather than a serial port, a bootloader is not required.

Depending on the ISP programmer, you may have to configure the IDE to "know" about it so it can tell avrdude how to use it by modifying the IDE configuration files (boards.txt & programmers.txt), but that is a one time thing.

--- bill

bperrybap: Depending on the ISP programmer, you may have to configure the IDE to "know" about it so it can tell avrdude how to use it by modifying the IDE configuration files (boards.txt & programmers.txt), but that is a one time thing.

Well, that's the difference. And you'll have to remember to make these changes each time you upgrade your IDE.

In any case, whether it's configuring the boot loader (would be my approach), or configuring the IDE, it's going to take a little unsupported work. Which was my original gist.

BillO:

bperrybap:
Depending on the ISP programmer, you may have to configure the IDE to “know” about it
so it can tell avrdude how to use it by modifying the IDE configuration files
(boards.txt & programmers.txt), but that is a one time thing.

Well, that’s the difference. And you’ll have to remember to make these changes each time you upgrade your IDE.

In any case, whether it’s configuring the boot loader (would be my approach), or configuring the IDE, it’s going to take a little unsupported work. Which was my original gist.

Anytime you add unsupported AVRs to Arduino there is going to be “unsupported” work involved.
From what I took away from your original comment:

It depends on how much work you want to do. You will need a bootloader and a UART in the chip. As long as the chip has a UART and enough resources to hold the bootloader you might be able modify the bootloader to work with it. Then you’d need to configure the IDE and AVRdude to recognize and work with the ‘new’ device. Hacking the IDE is easy, it’s the bootloader that would be the bulk of the work.

Even if the chip did not have a UART it could be done, but that would be a ton more work and more bootloader code to handle the bit-banging.

was that you were saying that a serial port and that a bootloader would be required.

What Coding Badly meant was that was incorrect and that a bootloader is not necessary to use the Arduino IDE
as the IDE can simply use a programmer that uses ISP instead of a serial bootloader.
And by using the ISP with an ISP programmer any work of getting a bootloader to work
on the new hardware would be eliminated.
Configuring the IDE for new boards or programmers is trivial in comparison
to getting a bootloader up and working.

As far as having to remember to make the changes to each Arduino release
to get the added hardware support, that isn’t necessarily the case.

For example, if using the ATtiny hardware,
the Arduino hardware support files including the ISP board types can be placed
in the users home sketches/hardware directory
rather than the {installdir}/hardware directory.
Assuming that route is chosen, then again it is a one time thing.

Since the original discussion was around using AVRs that the Arduino team has not added to the distribution,
this same method of adding hardware support could be used.

Keep in mind that if support of AVRs not included with the Arduino distribution is needed,
then something has to be done to get the “unsupported” boards supported on each new Arduino release.
And what is done to make that happen will be the same whether you use a serial bootloader or use ISP to program the AVR.
(but that becomes a one time thing if the users sketches/hardware directory is used to add the hardware support)

Also, some ISP programmers like:
AVRISP mkII, USBtinyISP, USBasp, and Arduino as ISP
are all already supported “out of the box” in Arduino 1.0

So if the users sketches/hardware directory is used to add the new hardware support
and it used one of the supported ISP programmers above,
adding support for a new AVR without whether using a serial bootloader or
ISP is a one time thing.

But even if you did have to add programmer support for your ISP programmer
to every Arduino release, cutting and pasting a few
lines into a text file can be a whole lot easier and quicker than trying to get a
bootloader on new hardware up and working.

— bill

I never said coding badly was wrong.

In any case, I agree with what you and he said. It honestly did not occur to me at first. I just looked at it from my own experience. But…not everyone might be as handy at modifying a bootloader though.

So, all I said was we were talking about different things. It appears we were.