3
\$\begingroup\$

I am trying to program ATTin85 using Arduino I used the hardware support file from "High-Low Tech" here http://hlt.media.mit.edu/?p=1695

With this schematic:

enter image description here

After downloading the ArduinoISP sketch to the board, I tried uploading the blink sketch and tried burning the bootloader.

The IDE keeps responding with :

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

I also tried to using avrdude from CMD

avrdude -P COM5 -b 19200 -c avrisp -p t85 -v -e -U flash:w:sketch.cpp.hex

and it gave:

avrdude: please define PAGEL and BS2 signals in the configuration file for part
ATtiny85
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.07s

avrdude: Device signature = 0xffffff
avrdude: Yikes!  Invalid device signature. 
     Double check connections and try again, or use -F to override
     this check.


avrdude done.  Thank you.

I tried choosing the three settings 1Mhz/8Mhz/20Mhz (without adding any oscillators) and tried the three options with a 16Mhz crystal with two 22pF capacitors (I read somewhere online that this may work) and still nothing changed!

I tried another ATTiny85 Chip, another Arduino Uno, and tested the continuity every single wire. but still I am getting the same error.

\$\endgroup\$
  • \$\begingroup\$ Use the ArduinoISP sketch that came with the IDE (File=>Examples=>ArduinoISP). Then check the source code for the baudrate setting Serial.begin(19200);. Also check the voltage across pins 4 and 8 of the tiny with a DMM. \$\endgroup\$ – jippie Oct 6 '13 at 18:29
  • \$\begingroup\$ @jippie Checked the voltage, it is 5V. also the baudrate is set to 19200 \$\endgroup\$ – Loers Antario Oct 6 '13 at 18:36
  • \$\begingroup\$ Is it a new or a used ATtiny? \$\endgroup\$ – jippie Oct 6 '13 at 18:38
  • \$\begingroup\$ BTW: Don't worry about the please define PAGEL and BS2 signals in the configuration file for part ATtiny85avrdude. part. That is pretty standard (mis)configuration, but it should work just fine. \$\endgroup\$ – jippie Oct 6 '13 at 18:41
  • \$\begingroup\$ A new one, never used it \$\endgroup\$ – Loers Antario Oct 6 '13 at 18:41
1
\$\begingroup\$

I'm assuming your are using Arduino 1.04 or greater.

You can ignore this error: "Please define PAGEL and BS2 signals in the configuration file for part ATtiny85avrdude.exe"

But not this: "Yikes! Invalid device signature." "Device signature = 0xffffff" This usually happens when something isn't hooked up correctly.

1) Double and triple check your connections. Use your multimeter to do continuity tests to make sure none of your wires are bad. Put your probe directly on the chip's pins to make sure it's not a flaky connection to the breadboard. And, make sure you don't have the chip backwards! (ask me how I know)

2) Use a multimeter to make sure you actually have voltage at vcc and gnd on the tiny when hooked up to the Arduino programmer

3) Add the status leds (with resistors) to your programmer circuit so you can get a little more feedback.

pin 9 -> heartbeat

pin 8 -> error

pin 7 -> programming

4) Attinys from the factory are set to 1 Mhz. You have to flash the fuses to change it. To do that, under Tools->Board you choose the device at the speed you want (e.g. Attiny 85 @ 8mHz). Then you choose Tools->Burn Bootloader. It doesn't actually add a bootloader, but it does set the fuses. But, don't worry about doing this until you can get programming to work.

Just assume your Attiny is 1 Mhz.

5) If it still doesn't work, uninstall (delete?) the MIT files, or create a separate Arduino installation, and use this instead: http://code.google.com/p/arduino-tiny/

I played with the MIT tiny stuff first and then I found the arduino-tiny. I can't remember why, but I found it much better than the MIT version and it's been working for me ever since.

6) If it still doesn't work, I might try a different Attiny chip in case you have a bad one.

\$\endgroup\$
  • \$\begingroup\$ I've found arduino-tiny to be more complete than the MIT stuff. For instance, the latter omits the third PWM channel. \$\endgroup\$ – Ignacio Vazquez-Abrams Feb 13 '14 at 16:43
0
\$\begingroup\$

I just ran into the same problem today. I use a pretty typical LM7805 regulator with a +12V in to a regulator that provides +5V for the ATTiny85 and all terminations.

I get the same errors when it tries to read/verify. I triple checked all 4 critical connections (SCK, MOSI, MISO and RESET). All were properly connected and terminated with 3.3K resistors to Vcc.

I then tried 5.7K and finally 10K resistors. All with same result. I did notice late that my +12V supply was very noisy (was oscillating with a 2.25V pk-pk ripple. It seemed to be enough to make the ATtiny85 not very happy during programming.

Made double sure your MCU is getting stable Vcc (less than 50mV ripple) and a 0.1uF to 1uF bypass cap between (and close to) the power and ground pins on the MCU will help prevent noisy supplies from having a big impact. Unless, that is the ripple exceeds a few hundred mV.

Then you're screwed like me until I replace the supply.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.