Go Down

Topic: ATTiny85 arduinoisp problem (Read 11027 times) previous topic - next topic

92_foxgt

Jan 26, 2011, 06:35 am Last Edit: Jan 26, 2011, 06:38 am by 92_foxgt Reason: 1
Ok, I had a handful of attiny85s and used a duemilanove with the arduinoisp sketch to program them. After one successful upload, I could no longer upload anything, nor did the original sketch work(same problem for all three I wrote to). I discovered if I connected straight through avrdude and used terminal mode to do a manual erase, I could then write one more sketch before repeating the process. I have since written new sketches to them all and they work. Link to old thread below, I got the core files from the google code site Coding_Badly posted. I don't know what is causing this error, and don't really have enough knowledge to get much deeper into it, but it is annoying to have to do this process if I am prototyping and making a lot of changes.
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1295468226/all

wyager

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.

bHogan

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.
"Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom."
~ Clifford Stoll

Coding Badly

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

Frozen_One

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!

Coding Badly

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

Quote
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?

Quote
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.   :smiley-surprise:

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.

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

Quote
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?

Quote
Thanks again!


You are welcome!

Bobnova

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.

Coding Badly

Excellent!  Any suggestions?

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:
Code: [Select]
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.


Coding Badly

#10
Jan 29, 2011, 07:25 am Last Edit: Jan 29, 2011, 07:50 am by Coding Badly Reason: 1
Quote
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.

Coding Badly

#11
Jan 29, 2011, 07:45 am Last Edit: Jan 29, 2011, 07:48 am by Coding Badly Reason: 1
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!  ;)

Quote

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?

wyager


Quote
did you do -F?


The dash-F option should never be necessary.  


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

Coding Badly

Quote
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?

wyager

#14
Jan 29, 2011, 09:46 pm Last Edit: Jan 29, 2011, 09:48 pm by wyager Reason: 1
Perhaps not, but it would certainly provide useful information.

Also, did you really -karma me?  :|

Go Up