Assistance needed programming the ATTiny84 with the Arduino Uno ATMega328P-PU.
SKU:COM11232 ATTiny84 14 pin 20 MHz 8K 12A/D purchased from SparkFun
The Burn Bootloader fails with the following message:
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny84
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.
I tried the following steps:
• Download: ATtiny (from this GitHub repository)
• Locate your Arduino sketchbook folder (you can find its location in the preferences dialog in the Arduino software)
• Create a new sub-folder called “hardware” in the sketchbook folder.
• Copy the attiny folder from inside the .zip to the hardware folder. You should end up with folder structure like Documents > Arduino > hardware > attiny that contains the file boards.txt and another folder called variants.
• Restart the Arduino development environment.
• You should see ATtiny entries in the Tools > Board menu.
Turning the Arduino board into a programmer
We’re going to use the Arduino board to program the ATtiny. First, we’ll need to turn the Arduino board into an “in-system programmer” (ISP). To this:
• Run the Arduino development environment.
• Open the ArduinoISP sketch from the examples menu.
• Note for Arduino 1.0: you need to make a small change to the ArduinoISP sketch before uploading it. Find the line in the heartbeat() function that says “delay(40);” and change it to “delay(20);”.
• Select the board and serial port that correspond to your Arduino board.
• Upload the ArduinoISP sketch.
Pin connections for ATtiny84:
• ATtiny84 Pin 4 to Arduino Pin 13 (or SCK of another programmer)
• ATtiny84 Pin 5 to Arduino Pin 12 (or MISO of another programmer)
• ATtiny84 Pin 6 to Arduino Pin 11 (or MOSI of another programmer)
• ATtiny84 Reset Pin to Arduino Pin 10 (or RESET of another programmer)
Configuring the ATtiny to run at 8 MHz (for SoftwareSerial support)
By default, the ATtiny’s run at 1 MHz (the setting used by the unmodified “ATtiny45?, etc. board menu items). You need to do an extra step to configure the microcontroller to run at 8 MHz – necessary for use of the SoftwareSerial library. Once you have the microcontroller connected, select the appropriate item from the Boards menu (e.g. “ATtiny45 (8 MHz)”). Then, run the “Burn Bootloader” command from the Tools menu. This configures the fuse bits of the microcontroller so it runs at 8 MHz. Note that the fuse bits keep their value until you explicitly change them, so you’ll only need to do this step once for each microcontroller.
The Burn Bootloader fails with the following message:
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny84
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.
Problem:
Avrdude dislikes your lovely 328-PU chips and says "avrdude: Yikes! Invalid device signature." or "avrdude: Expected signature for ATMEGA328P is 1E 95 0F"
Soln:- This problem happens becoz ur arduino uses 328p - pu and if u bought 328pu(a couple dollars cheap).
The soln is to modify Arduino > hardware >tools>avr>etc and open avrdude.conf file as word document.keep backup of this file incase u mess up.
find 1E 95 0F text under Atmega328 and change it to 1E 95 14 and save.
restart arduino environment and burn bootloaders on all ur chips.use status leds as mogul said.they help a lot.
After burning change the text in avrdude.conf file back to 1E 95 0F and restart arduino ide.Then u can uplode code normally.
For anyone having problems burning bootloader into fresh AtMega328 pu and not 328p pu(pico power series),Here's what you need to do
Problem:
"pins_arduino.h: No such file or directory"
Solution:
Copy the contents from the downloaded boards.txt in your src/hardware folder to the boards.txt in App folder instead. On OSX: right click the Arduino app and browse Contents/Resources/Java/hardware/arduino/boards.txt.
You may also need to add the line below after the other text you pasted as it's missing in the downloadable example file:
atmega328bb.build.variant=standard
After this, the ArduinoISP example compiled fine and uploaded to the Duemilanove board that I'm using for burning the bootloader. The next problem I bumped into was that when I selected Tools -> Burn Bootloader, avrdude couldn't communicate with my board.
Problem:
1)stk500_getsync(): not in sync: resp=0x00
You can also get other hex numbers like resp=0x15 and resp=0xf0
Add either a 120 Ohm resistor (didn't work for me) or a 10uF Capacitor (worked like a charm) between the Reset and 5V Pin.
For the Uno, connecting a 10?F capacitor between the RESET and GND lines works for me (as described in the linked thread).
http://www.arduino.cc/playground/Main/DisablingAutoResetOnSerialConnection
I had to fiddle a bit to get this right and once it worked I ran straight into the next problem...
Problem:
Avrdude dislikes your lovely 328-PU chips and says "avrdude: Yikes! Invalid device signature." or "avrdude: Expected signature for ATMEGA328P is 1E 95 0F"
Soln:- This problem happens becoz ur arduino uses 328p - pu and if u bought 328pu(a couple dollars cheap).
The soln is to modify Arduino > hardware >tools>avr>etc and open avrdude.conf file as word document.keep backup of this file incase u mess up.
find 1E 95 0F text under Atmega328 and change it to 1E 95 14 and save.
restart arduino environment and burn bootloaders on all ur chips.use status leds as mogul said.they help a lot.
After burning change the text in avrdude.conf file back to 1E 95 0F and restart arduino ide.Then u can uplode code normally.
This did not work. I am still unable to burn the bootloader.