Attiny85 20 MHz

Hi,

I am trying to progarm an Attiny85 running at 20 MHz, and I have the message:

"avrdude: stk500_recv(): programmer is not responding"

This when trying to upload a sketch using the attiniy85 (External 20Mhz) tool option (Arduino 1.01)

Same issue with the attiny85 (Internal 8 Mhz)

Do I need to provide an external clock for this type of chip?

Thanks in advance Robert

At 20MHz, then yes. The internal clocks run at 128kHz, 1MHz, 8MHz, and 16MHz.

If you have already burned a bootloader/fuses for the crystal option, which it sounds like you might have, you will need to hook a crystal/resonator to the chip to change the programming or fuses.

Do you mean it is NOT possible to program a attiny 85 20 MHz without an external clock. or should it be possible to program it a 8 MHz using the internal clock? So if it is possible what am I doing wrong?

Robert

By the phrase "a attiny 85 20 MHz" do you mean the part? As in ATtiny85-20PU (versus ATtiny85V-10PU)?

The part number is Attiny85-20PU

It was the only model I could bought.

Neither the burn boot loader or the sketch loading are working, so I wander if I can use these chips with the Arduino ISP . (note that I also did try without invoking the burn bootloader and upload a sketch directly selecting ATtiny internal 1MHz and 8 MHz)

I did the test with several ones without any success and I am sure about the pins connections with the Arduino.

So please confirm that a 20 MHz version will or will not work with the Arduino ISP (or that an external 20 MHz clock is necessary).

Thanks in advance

Robert.

darvade: Neither the burn boot loader or the sketch loading are working,

How did you disable auto-reset?

so I wander if I can use these chips with the Arduino ISP

Yes, you can.

So please confirm that a 20 MHz version will or will not work with the Arduino ISP

[u]Will[/u] work.

(or that an external 20 MHz clock is necessary).

[u]Not[/u] necessary.

Thanks to confirm that it should work . Regarding the arduino reset pin, a capacitor to the ground or a resistor to +5v doesn't help. I will try with an older version of arduino running on window in stead of Mac . But I don't see the kind of mistake I am doing. Robert

I actually did something similar just now, exact same part number. I'd only just received the chips and wanted to make sure my setup would work. I used the Uno R3 as the ISP, and managed to hook everything up, run the "burn bootloader" operation (I set it to 8mhz, BOD disabled, as there's no way I need a clock freq. of 20MHz), and got a simple program up and running which blinked a bicolour LED and peeped a piezo buzzer.

I followed the instructions here: http://hlt.media.mit.edu/?p=1229 including using the 10uF cap between reset and ground on the Uno. I'm not sure exactly what you might be doing wrong but the setup ought to work!

I finally manage to let it work.

My mistake(Sss)

I was confused with the explanation of http://hlt.media.mit.edu/?p=1695 using the bootloader stuff (still unclear for me and I will try this later), and I have missed some details not obvious for me like: Loading de Arduino ISP selecting as board Arduino UNO, this WITHOUT the RESET capacitor/resistor, then ADD the capacitor/resistor and then load the wanted sketch after selecting the Attiny85 1MHZ as board.

Practically the sequence is the following: 1. Connect the Arduino UNO with the serial interface via the USB cable (ATtiny already connected as describe by the URL above) but without 10uF capacitor between GND and RESET 2. Ensure that the board selected is the one for the Arduino (my case Arduino UNO) menu Tool>Board>Arduino UNO 3. Upload the Arduino ISP sketch from the menu File>Examples>ArduinoISP 4. Add the capacitor between GND and RESET 5. Select the ATtiny model with the default clock 1MHz (my case Tool>Board>Attiny85 (internal 1MHz clock)) 6. Select one sketch to upload (e.g. File>Examples>01.Basic>Blink) 7. Change the settings according to the pins of the ATtiny (e.g Pin 13 becomes Pin 0> 8. Upload the sketch (rmk: File>Upload or File>Upload using programmer, makes no difference) 9. An in this case a LED connected to pin 0 of the Attiny should blink. ;)

Thanks to all, Robert

Nice write-up darvade. I am going to save it for sure!

Pins 9, 8, and 7 on the Arduino provide status for ArduinoISP when it's running. Notably, pin 9 provides a heartbeat to show that ArduinoISP is loaded on your Arduino; that would have eliminated your primary mistake. I highly recommend it to help maintain your sanity in the future ;)

http://www.forkrobotics.com/2012/04/run-arduino-code-on-an-attiny/

Nice write-up. Just had the same issue and the above steps resolved it. THANK YOU!

First of all thank you darvade. I have been going round and round all day with this issue. I then came across you post and bingo it works.

I do how ever have a question for all you pros.

In the updatded post from Hi Low tech is states this.

“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. (Note this doesn’t actually burn a bootloader onto the board; you’ll still need to upload new programs using an external programmer.)”

I could never get it to work. can anyone tell me what its all about.

Thanks

I assume you need help changing the fuses so your target runs at 8 MHz from the internal oscillator. In which case, this...

I could never get it to work. can anyone tell me what its all about.

...is not going to cut it. At a minimum you are going to have to post the error message.

[quote author=Coding Badly link=topic=111481.msg1047277#msg1047277 date=1356671186]

I assume you need help changing the fuses so your target runs at 8 MHz from the internal oscillator. In which case, this...

I could never get it to work. can anyone tell me what its all about.

...is not going to cut it. At a minimum you are going to have to post the error message. [/quote]

This is the error I keep getting, Thanks

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

There are three possibilities...

• If you are using an Uno (or other Arduino compatible board) as a programmer, auto-reset has not been disabled

• The wiring between the programmer (Uno) and the target (ATtiny processor) is not correct

• The target has been configured to use an external clock but a clock signal is not present on XTAL1

It is fairly easy to determine which is the culprit from a verbose output. Enable verbose output for uploads and post the results.

[quote author=Coding Badly link=topic=111481.msg1051237#msg1051237 date=1356936920]

It is fairly easy to determine which is the culprit from a verbose output. Enable verbose output for uploads and post the results.

[/quote]

I am unfamiliar with verbose output, can you please explain. Thank you.

• Start the Arduino IDE

• Click File then Preferences

• Ensure Show verbose output during: upload is checked

• Click OK

• Try to Burn Bootloader (try to do whatever you were trying to do)

• Click in the Status Window (bottom part of the IDE)

• Hold Ctrl and press A to Select All

• Hold Ctrl and press C to Copy

• Paste into a reply; please use
</mark> <mark>[code]</mark> <mark>

</mark> <mark>[/code]</mark> <mark>
tags

This is what I get when I try the burn boot loader with the ATTiny85 (internal 8Mhz clock)

C:\arduino-1.0.1\hardware/tools/avr/bin/avrdude -CC:\arduino-1.0.1\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -pattiny85 -cstk500v1 -P\\.\COM4 -b19200 -e -Uefuse:w:0xff:m -Uhfuse:w:0xdf:m -Ulfuse:w:0xe2:m 

avrdude: Version 5.11, compiled on Sep  2 2011 at 19:38:36
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

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

         Using Port                    : \\.\COM4
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [10] 
         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  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65     6     4    0 no        512    4      0  4000  4500 0xff 0xff
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           flash         65     6    32    0 yes      8192   64    128  4500  4500 0xff 0xff
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   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  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           calibration    0     0     0    0 no          2    0      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
avrdude: Send: A [41] . [80]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [02] 
avrdude: Recv: . [10] 
avrdude: Send: A [41] . [81]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [01] 
avrdude: Recv: . [10] 
avrdude: Send: A [41] . [82]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [12] 
avrdude: Recv: . [10] 
avrdude: Send: A [41] . [98]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [00] 
avrdude: Recv: . [10] 
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
avrdude: Send: A [41] . [84]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [00] 
avrdude: Recv: . [10] 
avrdude: Send: A [41] . [85]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [00] 
avrdude: Recv: . [10] 
avrdude: Send: A [41] . [86]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [00] 
avrdude: Recv: . [10] 
avrdude: Send: A [41] . [87]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [00] 
avrdude: Recv: . [10] 
avrdude: Send: A [41] . [89]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [00] 
avrdude: Recv: . [10] 
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: Send: A [41] . [81]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [01] 
avrdude: Recv: . [10] 
avrdude: Send: A [41] . [82]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [12] 
avrdude: Recv: . [10] 
avrdude: Send: B [42] . [14] . [00] . [00] . [01] . [01] . [01] . [01] . [03] . [ff] . [ff] . [ff] . [ff] . [00] @ [40] . [02] . [00] . [00] . [00]   [20] . [00]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [10] 
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85
avrdude: Send: P [50]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [10] 
avrdude: AVR device initialized and ready to accept instructions

Reading | avrdude: Send: V [56] 0 [30] . [00] . [00] . [00]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [00] 
avrdude: Recv: . [10] 
avrdude: Send: V [56] 0 [30] . [00] . [01] . [00]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [00] 
avrdude: Recv: . [10] 
################avrdude: Send: V [56] 0 [30] . [00] . [02] . [00]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [00] 
avrdude: Recv: . [10] 
################################## | 100% 0.08s

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

avrdude: Send: Q [51]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [10] 

avrdude done.  Thank you.

Which eliminates the first possibility leaving...

• The wiring between the programmer (Uno) and the target (ATtiny processor) is not correct

• The target has been configured to use an external clock but a clock signal is not present on XTAL1

Very carefully check the wiring.