Diecimila 328 and Arduino 0017

I am running Arduino 0017 under Windows XP/SP3. I recently tried to load a sketch into some old Diecimila/328s (I think these started out as 168s and then had their processor chips replaced; they certainly worked a few IDEs ago), but there seems to be no Tools/Board selection that will allow the sketch to load. The LED flashes as if a bootloader were in place. Is there a simple fix, or is the Diecimila just no longer supported?

Err, I'm not sure you've quite understood the difference

The difference between a 168 and 328 is the chip which powers the board. The board is nothing more than a chassis providing some pints and a RS232 > TTL signal conversion.

There's a bunch of Atmel Atmega chips supported by the Arduino IDE and they go all the way back to the AtMega8..

If you're using the Diecimila, this originally had a 168. As you mentioned they've been upgraded to the AtMega 328 which "makes" it a Duemilanove (aka the "2009). Thus you need to select Duemilanove or nano with 328.

Hope that clears that up for you

I knew all of that. I have some Diecimila boards, originally designed for the 168, that now have 328s. Under Arduino 0017, they cannot be uploaded using any choice from the available board menu. That was all in my original message.

Each selection from the board menu seems to be quasi-specific to some combination of processor and glue chips. I was hoping that some reader of this message board would have prior relevant experience and could suggest an addition to boards.txt.

Apologies, I didn't mean offense.

I've used many different MCUs and bootloaders and I've never had a problem using the 'quasi-specific' options. That being said, if your lock-bits on the MCU is incorrectly set that could cause you problems.

Do you have any tech specs of the bootloader on your MCU?

Oh and in addition, serial write speeds can screw up a transfer.

Some bootloaders and boards actually require you hit reset before you upload something to the board (they didn't implement autoreset). Have you tried hitting upload and then reset (quickly)?

Some bootloaders and boards actually require you hit reset before you upload something to the board (they didn't implement autoreset). Have you tried hitting upload and then reset (quickly)?

Yes, I've tried various timing of reset, but without success. Perhaps there is a magic delay (say, a prime number of milliseconds), but I can't find it.

Do you have any tech specs of the bootloader on your MCU?

No. They are the original bootloaders, for what that's worth. I don't know how to find out which ones are on my boards. I suppose that there must be a program that, if loaded, could tell me what bootloader was present, but that's something of a Catch-22 at this point.

The upload time is somewhat arbitrary. If the board you're using has autoreset then chances are they were designed to be reset and uploaded to immediately and subsequent don't have a long wait time before loading the main program code.

I presume you don't have a programmer. If you do you could check the lock bits. Failing that I'm a little unsure. I'd probably try and get hold of the last known good IDE and go from there.

It is rather odd this isn't working. If I recall correctly the crystal still oscillated at 16mhz on the Diecimila, if they were changed that could be a problem.

I presume you don't have a programmer. If you do you could check the lock bits. Failing that I'm a little unsure. I'd probably try and get hold of the last known good IDE and go from there.

Actually I do have a programmer, but it's been years since I used it, and I don't remember what software can drive it.

Going back to an older IDE sounds easy enough; I have 0016 (no better, for my purposes, than 0017), but I don't know where to find the older ones.

Going back to an older IDE sounds easy enough . . . but I don't know where to find the older ones.

That was foolish; they're easily found on the Arduino site.

Now I have a new and much more serious problem. I downloaded and experimented with 0012, 0014, and 0015; I couldn't compile my sketch in any of them, because the sketch uses NewSoftSerial, and just moving that library generated new problems with (I think) a redefinition of Print. OK, I really didn'y want to use any of the old IDEs, I just wanted to mine one of them for a Diecimila definition.

I found a Diecimila definition in one of the old boards.txt and I created a new definition

##############################################################

diecimila328.name=Arduino Diecimila 328   

diecimila328.upload.protocol=stk500
diecimila328.upload.maximum_size=14336
diecimila328.upload.speed=19200

diecimila328.bootloader.low_fuses=0xff
diecimila328.bootloader.high_fuses=0xdd
diecimila328.bootloader.extended_fuses=0x00
diecimila328.bootloader.path=atmega168
diecimila328.bootloader.file=ATmegaBOOT_168_diecimila.hex
diecimila328.bootloader.unlock_bits=0x3F
diecimila328.bootloader.lock_bits=0x0F

diecimila328.build.mcu=atmega328
diecimila328.build.f_cpu=16000000L
diecimila328.build.core=arduino

(only the name & build.mcu properties are changed) that I copied into 0017's boards.txt.

Something in this process destroyed all functionality. I can't even compile blink any more. When I try, I get a java exception

java.io.IOException: Target platform: "null" not found
Make sure that the "build.target" in the preferences file points to a subdirectory . . .

This dysfunction is present even after reinstalling 0017. I have looked in the preferences.txt file, and there is no build.target entry at all; I had never put one in for any Arduino version, and never before was told I needed one.

I am at a loss here; what started out as a problem with some obsolescent boards has turned into an utter freeze on my Arduino activity. Can you suggest what is going on?

:slight_smile: The problems are solved.

First, the diecimila328.build.mcu=atmega328 line in my Diecimila328 description should have been diecimila328.build.mcu=atmega328p With that change, it works with 0017.

Installation of an Arduino IDE doesn't replace an existing preferences.txt. That makes sense (trying not to lose the user's previous preferences), but somewhere along the course of installing 0012, 0014, and 0015, the build.target preference that I had (without knowing it) made for 0017 was lost, and it wasn't re-created when I re-installed 0017. I finally deleted preferences.txt and let 0017 re-create it from scratch; now all is well.

Thanks for your support along the way.