Bootloading and programming with Arduino on an ATTiny24

I am in possession of an Arduino UNO and some seven pin micro controllers labeleled "ATMEL 1216 ATTiny24A P0"

I would like to use the UNO to burn the Arduino bootloader to the ATTiny (on a breadboard) and then program it through the UNO board with arduino sketches.

I tried to follow this tutorial: Programming ATTiny24 (and 44/84 of course) - Microcontrollers - Arduino Forum but it didn't seem to work and was also confusing me because it contradicted the tutorials on the arduino website. So I also tried doing it as detailed in : http://arduino.cc/en/Tutorial/ArduinoToBreadboard and http://arduino.cc/en/Tutorial/ArduinoISP
These tutorials also contradict eachother as one says it won't work with the uno but the other uses it. Also they didn't work.

So I have some questions which someone will hopefully answer:

  • Can I even use the UNO to do this
  • What arduino core/build/bootloader files do I need for these chips?
  • Is the chip just ATTiny24 or are the A and P important too?
  • If so, does that matter in terms of the bootloader/build/core files?
  • When you hook the UNO up to the ATTiny with the MISO and SCK pins ect. that's only for bootloading right? The first tutorial i mentioned involved setting up those pins and then using that to immediately upload sketches, which doesn't seem right
  • In order to upload sketches via the UNO board i do so by removing the ATMega328P from the UNO and connect rx and tx pins to that of the ATTIny, is that correct? (rx to rx or rx to tx from UNO to ATTiny?)
  • At what stages of the process do I set my arduino IDE to different programmers?-

Also I might have to ask more questions if I have any problems following your answers. Thanks.

Relevant article:
http://forum.arduino.cc/index.php/topic,154633.0.html

From my personal experience, you will find it easier to use Arduino 1.0.5 and the associated tiny-core rather than the 1.5.x Beta Arduino.

You can use the UNO for Arduino-ISP, there is a sketch and plenty of examples on the Internet and in this forum. You may find that Nick Gammon's code is easier, I do: Gammon Forum : Electronics : Microprocessors : Atmega bootloader programmer If nothing else, refer to Nick's pages for pictures!

You program any Atmel processor that supports an Arduino core in one of two ways: 1) with serial through the bootloader or 2) via ICSP which bypasses and overwrites the bootloader.

In order to upload sketches via the UNO board i do so by removing the ATMega328P from the UNO and connect rx and tx pins to that of the ATTIny, is that correct? (rx to rx or rx to tx from UNO to ATTiny?)

I think between the links provided, all of your questions are answered. If not, come back with specifics.

Ray

Tiny24 har 2K flash.
Better go without the bootloader for memory savings.

There are a number of tutorials online for programming ATTiny84/44 with Arduino Uno and the pinout of the ATTiny24 is the same, so you can follow them.

Bear in mind that you are not really loading a bootloader on the tiny, just using that function in the Arduino IDE to set the fuses of the tiny to the correct settings (for example, to run at 8Mhz, if you want that). With the ATTiny chips, you will use the SPI interface to program it and no bootloader is needed for that.

Before you can start using the Arduino IDE to program the ATTiny, you need an add-on, so it supports those ICs. There are a few options here, I believe for the ATTiny24, your best bet is to start here:
https://code.google.com/p/arduino-tiny/source/browse/README
https://code.google.com/p/arduino-tiny/

I have not used the ATTiny24, but the above library should support it. I know from experience that it does support ATTiny44/84 and ATTiny85.

LyokoJames:
...some seven pin micro controllers...

Seven pin?

There is always the one...

Doc

Count yourself...

7pin.jpg

(deleted)

they are all removed by force.. (the end)

knut_ny:
they are all removed by force.. (the end)

joking, right? thers anothr thread I started that goes into a lot more detail and gives the exact seetings you need to change in the boards.txt file especially for a 24

definitley forget the bootloader...it wouldnt work anyway, for more reasons than I have space or time for apart form chewing up half the ram...

ps anyone know where I can get a single lead resistor, I hear they are twice as quick to solder....

I meant 14 pins. My mistake. It would be odd to see a 7 pin micro.
EDIT: Reminds me of this thread I cam across while searching for help on this before posting where someone was asking if they could cut their micro in half because they only needed the pins on one end.

I've got the core files by follwing the instructions this thread: ATtint24 Core Library for Arduino - #7 by johnwasser - Programming Questions - Arduino Forum

But the fuse settings are different to those posted on BareMetals thread so I might be using the wrong core?
I've uploaded the ArduinoISP sketch to the uno and have connected it to the ATTiny24 as per BareMetals Instructions.

Now in the Arduino IDE I click Tools > Board > ATTiny 24 @ 8 MHz
(btw there is a blank yet selectable option between "ATTiny 24 @ 8 MHz" and "Arduino UNO" is the Tools > Board Menu, is this of any concern?)

Now I am slecting Tools ? Board > Programmer > Arduino as ISP
Now I am loading the standard blink sketch and setting led to A2 (what is the Arduino to AVR mapping for ATTiny24) (guessing its A0 to A7 counter clockwise from pin 13 to 6 but am unsure)

I am putting a 10uF capacitor from ground to reset on the arduino for good measure (if it fails i'll try again without it)

Clicking File > Upload using programmer

Got an error in the console:
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny24
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.

going to test if it worked anyway

didn't work.

tried again without capacitor same error message:
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny24
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.

Have I done anything wrong? Or is something broken?

EDIT: I just tried using Bare Metals core files and also tried both cores using 2 instead of a2 but nothing works.
Same error messages. I assume I have to use -F to override but I don't no what that means exactly.

(btw there is a blank yet selectable option between "ATTiny 24 @ 8 MHz" and "Arduino UNO" is the Tools > Board Menu, is this of any concern?)

Yes. You have a mistake in your boards.txt file.

I am putting a 10uF capacitor from ground to reset on the arduino for good measure...

The capacitor is not for "good measure". It is necessary to disable auto-reset. That @BareMetal did not need it is dumb luck; he did you and his other readers a disservice implying it was not necessary. Use the capacitor.

I assume I have to use -F to override but I don't no what that means exactly.

Do NOT use -F. I suspect it has no useful purpose and it most certainly does not have a useful purpose in your case.

Post the verbose output from an upload attempt (or a Burn Bootloader attempt).

my view is that if dumb luck works, then im happy to be lucky and dumb. readers chocie if they want theoritcal purity and extra complication or simply working... however, I'm always ready to listen and learn, so if wiser folk than me say you need one, then use one. ..but if it aint broke...IMHO its absence in this case isnt related to your error

your error sounds lkke the ide is passing the wrong mcu type to avrdude..also be aware that a 24 and a 24a etc have different device signature. agree that the blank line is an indicator that your boards.txt is wrong. the verbose output will show what mcu the toolchain is being told