ATTiny85 arduinoisp problem

I've had bad luck with ArduinoISP. For me, it was the fact that I accidentally slowed the clock way down on my ATTiny and ArduinoISP does not support a lower ISP clock rate than the default. I just got the USBTinyISP from Adafruit and never looked back, lol. I'm not sure if that's related to your problem, though.

92,
FWIW, I have been using the ArduinoISP to constantly load and reload ATtiny85 chips. However, a difference is that I am using the core files from "high-low tech" - http://hlt.media.mit.edu/wiki/pmwiki.php?n=Main.ArduinoATtiny4585

Not sure if this could be a factor of your problem.

Using AVRDUDE from the command-line, run it with just "-v -v -v" (no commands). For example, this is what I would run...

avrdude -v -v -v -pattiny85 -cavrispv2 -P\.\COM8

Please post the results (using code tags).

Hey Coding_Badly,

Have you tried writing any boards.txt files that let you write directly to a virgin ATMega328 or 168 like you did with the ATtiny84/5? It would be huge to not need to load a bootloader to them- like the ATtiny85. But maybe I am unaware of obstacles in doing your magic with more AVRs.

The ATtiny85 port has been working like a charm. I have shown quite a few others how to do it, here at work. Thanks again!

Hey Frozen_One,

Frozen_One:
Have you tried writing any boards.txt files that let you write directly to a virgin ATMega328 or 168 like you did with the ATtiny84/5?

Yes. It works very well. Tiny Tuner (an unpublished version) works well to tune the internal oscillator. I'll try to get a Tiny Tuner update out this weekend that includes 328 / 168 support.

It would be huge to not need to load a bootloader to them- like the ATtiny85

It is nice! I should be able to deliver another Tiny Core update this weekend. I'll include 328 and 168 entries in boards.txt.

Do you use virgin 328 / 168 processors with or without an external 16 MHz crystal? How do you typically power the processor? Direct from batteries? +5V regulated?

But maybe I am unaware of obstacles in doing your magic with more AVRs.

No obstacles. It works well. And, for the record, while I'd like to be that clever, it isn't my magic. But, as I've always said, the best idea is a stolen one. :open_mouth:

In case you need an entry or an alternative to the one that will be in the Tiny Core... I believe there is a "breadboard 328" entry available in the playground that should serve the same purpose. I vaguely recall publishing an entry in the old forum.

The ATtiny85 port has been working like a charm

Excellent! There are a few simple things that can be done to dramatically improve it. I think that's next on the list.

I have shown quite a few others how to do it, here at work

Hmmm. Sounds to me like you have some "teacher" in you. Care to apply that skill to some documentation?

Thanks again!

You are welcome!

I've been playing with a tiny85 and arduinoisp as well, so far it has worked perfectly for me, I'm very happy with it!
THANK YOU to coding badly for the attiny85 support, and to whoever it was that wrote arduinoisp, too!

So far the only issue I've had was forgetting to set the board type to/from attiny85 (well that and sticking my BBB into the breadboard one pin too far to the right, that didn't work well either :P), other then that it's been problem-free.

Excellent! Any suggestions?

Sorry for the super long delay between posts, school work has kept me busy until I passed out everynight lol. Here is my avrdude report:

C:\Users\>C:\Users\Documents\PCB_Projects\arduino-0022\arduino-0022\h
ardware/tools/avr/bin/avrdude -CC:\Users\Documents\PCB_Projects\arduino-00
22\arduino-0022\hardware/tools/avr/etc/avrdude.conf -v -v -v  -pattiny85 -cstk50
0v1 -P\\.\COM14

avrdude: Version 5.4-arduino, compiled on Oct 11 2007 at 19:12:32
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         System wide configuration file is "C:\Users\Documents\arduino-0022\arduino-0022\hardware/tools/avr/etc/avrdude.conf"

         Using Port            : \\.\COM14
         Using Programmer      : stk500v1
avrdude: ser_open(): setting dtr
         AVR Part              : ATtiny85
         Chip Erase delay      : 4500 us
         PAGEL                 : P00
         BS2                   : P00
         RESET disposition     : possible i/o
         RETRY pulse           : SCK
         serial program mode   : yes
         parallel program mode : yes
         Timeout               : 200
         StabDelay             : 100
         CmdexeDelay           : 25
         SyncLoops             : 32
         ByteDelay             : 0
         PollIndex             : 3
         PollValue             : 0x53
         Memory Detail         :

                                  Block Poll               Page
      Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           eeprom        65     6     4    0 no        512    4      0  4000  45
00 0xff 0xff
                                  Block Poll               Page
      Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           flash         65     6    32    0 yes      8192   64    128  4500  45
00 0xff 0xff
                                  Block Poll               Page
      Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           signature      0     0     0    0 no          3    0      0     0
 0 0x00 0x00
                                  Block Poll               Page
      Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           lock           0     0     0    0 no          1    0      0  9000  90
00 0x00 0x00
                                  Block Poll               Page
      Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           lfuse          0     0     0    0 no          1    0      0  9000  90
00 0x00 0x00
                                  Block Poll               Page
      Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           hfuse          0     0     0    0 no          1    0      0  9000  90
00 0x00 0x00
                                  Block Poll               Page
      Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           efuse          0     0     0    0 no          1    0      0  9000  90
00 0x00 0x00
                                  Block Poll               Page
      Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           calibration    0     0     0    0 no          2    0      0     0
 0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
         Hardware Version: 3
         Firmware Version: 3.3
         Vtarget         : 0.3 V
         Varef           : 0.3 V
         Oscillator      : 28.800 kHz
         SCK period      : 3.3 us

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

avrdude: Device signature = 0x1e950f
avrdude: Expected signature for ATtiny85 is 1E 93 0B
         Double check chip, or use -F to override this check.

avrdude done.  Thank you.

did you do -F?

did you do -F?

The dash-F option should never be necessary. Having to use it is an indication of another problem (like faulty wiring).

But, at this point, it may be is not worth trying until 92_foxgt has confirmed that AVRDUDE can communicate with his ATtiny85 processor.

92_foxgt:
Sorry for the super long delay between posts, school work has kept me busy until I passed out everynight lol. Here is my avrdude report:

No need to apologize. If you get it working and don't follow-up then you need to apologize! :wink:

avrdude: Device signature = 0x1e950f
avrdude: Expected signature for ATtiny85 is 1E 93 0B

From the ATmega328 datasheet...

  Part         Signature Bytes
  ATmega328P   0x1E 0x95 0x0F

Your processor is responding that it's a 328. Are you certain that you've correctly loaded the Arduino ISP Sketch and disabled auto-reset?

No kidding... doesn't mean that it never works. It can be very helpful in debugging.

It can be very helpful in debugging

In 92_foxgt's case? Even though the 328 processor on his Arduino is very likely what responded to AVRDUDE?

Perhaps not, but it would certainly provide useful information.

Also, did you really -karma me? :expressionless:

Perhaps not

I agree.

but it would certainly provide useful information

Once all other problems have been resolved, maybe.

Also, did you really -karma me?

No. Would you like me to?

Lol, sorry, not sure who else would have... :~

Also, how would the arduinoISP try to program itself? Because it sounds like that's what you mean...

Also, how would the arduinoISP try to program itself?

The bootloader responds to AVRDUDE instead of the Arduino ISP Sketch. If autoreset is not disabled, the bootloader runs instead of te Arduino ISP Sketch. From AVRDUDE's perspective there is no difference. For our perspective there's a huge difference!

But the bootloader does not send the device ID, does it? Does the bootloader mimic the built-in serial interface?

But the bootloader does not send the device ID, does it?

I have no idea if it does or not. AVRDUDE gets rather annoyed if the ID is not available or is not the expected value so I assume the bootloader has to send the processor's ID to satiate AVRDUDE.

Does the bootloader mimic the built-in serial interface?

By "built-in serial interface" I assume you mean the interface provided by the processor. In which case, I have no idea. I don't know anything about the on-processor interface.

I was not aware that the arduino IDE used AVRDUDE to upload programs. I thought the whole point of the bootloader was that you didn't need to use ICSP, considering that the arduino IDE uses serial to upload stuff... It just seems astronomically unlikely to me that the two protocols would line up so conveniently.