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.
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.
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.
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.
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.
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.
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.
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