Pages: [1] 2   Go Down
Author Topic: Attiny85 20 MHz  (Read 8227 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 1
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Dallas, Texas
Offline Offline
God Member
*****
Karma: 31
Posts: 887
Old, decrepit curmugeon
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

New true random number library available at: http://code.google.com/p/avr-hardware-random-number-generation/

Current version 1.0.1

Offline Offline
Newbie
*
Karma: 1
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 208
Posts: 12936
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


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

Offline Offline
Newbie
*
Karma: 1
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 208
Posts: 12936
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

How did you disable auto-reset?

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

Yes, you can.

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

Will work.

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

Not necessary.
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

South England
Offline Offline
Full Member
***
Karma: 3
Posts: 205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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. smiley-wink


Thanks to all,
Robert
Logged

Greenville, IL
Offline Offline
Edison Member
*
Karma: 15
Posts: 1330
Warning Novice on board! 0 to 1 chance of errors!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


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


Dubuque, Iowa, USA
Offline Offline
Faraday Member
**
Karma: 47
Posts: 2520
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley-wink

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

Logged

Sacramento, CA
Offline Offline
Newbie
*
Karma: 0
Posts: 1
Love the Arduino platform - so versatile
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Full Member
***
Karma: 1
Posts: 209
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 208
Posts: 12936
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


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

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

Offline Offline
Full Member
***
Karma: 1
Posts: 209
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


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

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

This is the error I keep getting, Thanks

Code:
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.
Logged

Pages: [1] 2   Go Up
Jump to: