Bought ATTiny85

Did the tutorial, checked and rechecked and checked 10 more times to be sure, the wiring is good, if it's not i don't deserve to touch an ATTiny85.

I've picked Arduino as ISP, tried version 1.0 / 1.0.1 - all i get is

avrdude: stk500_getsync(): not in sync: resp=0x00

Same message i get when I try and upload to a different board (eg, FTDI to something else).

So i'm 99.999999% convinced that the problem is, the ATTiny85 chips i've bought were all programmed and tested with an external crystal.

other than connecting a crystal (what am i looking for ?) is there no way to burn the bootloader/set it back to it's original values to work with it's
internal crystal?..

or am i going to have to start pulling apart someone's TV to find a crystal? lol :frowning:

Hi,

I think we'll be able to help you get going, but you'll need to be far more specific about the steps you've taken, and the equipment you're using.

cjdelphi:
So i'm 99.999999% convinced that the problem is, the ATTiny85 chips i've bought were all programmed and tested with an external crystal.

Why do you presume this - were they second hand? Before doing the 'burning the bootloader' step all the ATTiny85s I've bought have been at the default 1MHz setting.

cjdelphi:
Same message i get when I try and upload to a different board (eg, FTDI to something else).

What did you mean by this? For programming the ATTiny85 you won't be using FTDI so which instructions/tutorial are you following and what step is this that you're meaning? What other type of chip/board did you try?

cjdelphi:
I've picked Arduino as ISP, tried version 1.0 / 1.0.1 - all i get is

Be aware that the Arduino as ISP sketch that was standard for IDE 1.0 was bugged, so did not work with Uno without modification. Can you give us more information on the Arduino you're using as well?

Cheers ! Geoff

ide 1.0.1
standard Arduino atmega 328 - PU
FTDI bus chip
attiny folder placed inside the hardware folder....

tools > board > attiny85 (1mhz clock) //although i've tried all the internal clocks.
Programmer > arduino as ISP

void setup() {                
  pinMode(3, OUTPUT);     
}

void loop() {
  digitalWrite(3,true);
  delay(1000);     
  digitalWrite(3,false);
  delay(1000);     
}

as the tutorial shows (cable checked recked, postive, negative, all the pins on 10 onwards, rechecked.. and yes checked again, yes really, completely checked and all in
order)

http://hlt.media.mit.edu/?p=1695

as instructed here..

Which leads me to conclude, i need an external crystal because it's simply not working.

I don't understand what you are using FTDI bus chip for.

Are you following these steps:

Upload the ArduinoISP to the Arduino dont't connect the capacitor yet.
After you have uploaded ArduinoIsp, connect a 10 µF capacitor from reset to ground on the arduino (negative side to ground)
select the board Attiny85@1MHZ
upload the blink sketch, and change pin13 to pin0
Connect a LED with resitor to pin 0

"ArduinoISP"

is this what i'm missing?... is that a sketch and where is it located? - thanks

ahh, i thought the atmega acted like a bridge... usb > arduino > attiny85..

ok so i uploaded that sketch i found

ArduinoISP.cpp: In function 'void setup()':
ArduinoISP:68: error: 'Serial' was not declared in this scope
ArduinoISP.cpp: In function 'void loop()':
ArduinoISP:125: error: 'Serial' was not declared in this scope
ArduinoISP.cpp: In function 'uint8_t getch()':
ArduinoISP:131: error: 'Serial' was not declared in this scope
ArduinoISP:132: error: 'Serial' was not declared in this scope
ArduinoISP.cpp: In function 'void spi_init()':
ArduinoISP:158: error: 'SPCR' was not declared in this scope
ArduinoISP:159: error: 'SPSR' was not declared in this scope
ArduinoISP:160: error: 'SPDR' was not declared in this scope
ArduinoISP.cpp: In function 'void spi_wait()':
ArduinoISP:166: error: 'SPSR' was not declared in this scope
ArduinoISP:166: error: 'SPIF' was not declared in this scope
ArduinoISP.cpp: In function 'uint8_t spi_send(uint8_t)':
ArduinoISP:171: error: 'SPDR' was not declared in this scope
ArduinoISP.cpp: In function 'void empty_reply()':
ArduinoISP:188: error: 'Serial' was not declared in this scope
ArduinoISP:193: error: 'Serial' was not declared in this scope
ArduinoISP.cpp: In function 'void breply(uint8_t)':
ArduinoISP:199: error: 'Serial' was not declared in this scope
ArduinoISP:205: error: 'Serial' was not declared in this scope
ArduinoISP.cpp: In function 'void start_pmode()':
ArduinoISP:256: error: 'SS' was not declared in this scope
ArduinoISP:258: error: 'SCK' was not declared in this scope
ArduinoISP:263: error: 'MISO' was not declared in this scope
ArduinoISP:264: error: 'MOSI' was not declared in this scope
ArduinoISP.cpp: In function 'void end_pmode()':
ArduinoISP:270: error: 'MISO' was not declared in this scope
ArduinoISP:271: error: 'MOSI' was not declared in this scope
ArduinoISP:272: error: 'SCK' was not declared in this scope
ArduinoISP:273: error: 'SS' was not declared in this scope
ArduinoISP.cpp: In function 'void write_flash(int)':
ArduinoISP:314: error: 'Serial' was not declared in this scope
ArduinoISP:319: error: 'Serial' was not declared in this scope
ArduinoISP.cpp: In function 'void program_page()':
ArduinoISP:386: error: 'Serial' was not declared in this scope
ArduinoISP:391: error: 'Serial' was not declared in this scope
ArduinoISP:395: error: 'Serial' was not declared in this scope
ArduinoISP.cpp: In function 'char flash_read_page(int)':
ArduinoISP:409: error: 'Serial' was not declared in this scope
ArduinoISP.cpp: In function 'char eeprom_read_page(int)':
ArduinoISP:423: error: 'Serial' was not declared in this scope
ArduinoISP.cpp: In function 'void read_page()':
ArduinoISP:435: error: 'Serial' was not declared in this scope
ArduinoISP:438: error: 'Serial' was not declared in this scope
ArduinoISP.cpp: In function 'void read_signature()':
ArduinoISP:448: error: 'Serial' was not declared in this scope
ArduinoISP:451: error: 'Serial' was not declared in this scope
ArduinoISP.cpp: In function 'int avrisp()':
ArduinoISP:476: error: 'Serial' was not declared in this scope
ArduinoISP:539: error: 'Serial' was not declared in this scope

here we go... lol

the header just so we know which file

// ArduinoISP version 04m3
// Copyright (c) 2008-2011 Randall Bohn
// If you require a license, see 
//     http://www.opensource.org/licenses/bsd-license.php
//
// This sketch turns the Arduino into a AVRISP
// using the following arduino pins:
//
// pin name:    not-mega:         mega(1280 and 2560)
// slave reset: 10:               53 
// MOSI:        11:               51 
// MISO:        12:               50 
// SCK:         13:               52 
//
// Put an LED (with resistor) on the following pins:
// 9: Heartbeat   - shows the programmer is running
// 8: Error       - Lights up if something goes wrong (use red if that makes sense)
// 7: Programming - In communication with the slave
//
// 23 July 2011 Randall Bohn
// -Address Arduino issue 509 :: Portability of ArduinoISP
// http://code.google.com/p/arduino/issues/detail?id=509
//
// October 2010 by Randall Bohn
// - Write to EEPROM > 256 bytes
// - Better use of LEDs:
// -- Flash LED_PMODE on each flash commit
// -- Flash LED_PMODE while writing EEPROM (both give visual feedback of writing progress)
// - Light LED_ERR whenever we hit a STK_NOSYNC. Turn it off when back in sync.
// - Use pins_arduino.h (should also work on Arduino Mega)
//
// October 2009 by David A. Mellis
// - Added support for the read signature command
// 
// February 2009 by Randall Bohn
// - Added support for writing to EEPROM (what took so long?)
// Windows users should consider WinAVR's avrdude instead of the
// avrdude included with Arduino software.
//
// January 2008 by Randall Bohn
// - Thanks to Amplificar for helping me with the STK500 protocol
// - The AVRISP/STK500 (mk I) protocol is used in the arduino bootloader
// - The SPI functions herein were developed for the AVR910_ARD programmer 
// - More information at http://code.google.com/p/mega-isp

#include "pins_arduino.h"
#define RESET     SS

#define LED_HB    9
#define LED_ERR   8
#define LED_PMODE 7
#define PROG_FLICKER true

#define HWVER 2
#define SWMAJ 1
#define SWMIN 18

// STK Definitions
#define STK_OK      0x10
#define STK_FAILED  0x11
#define STK_UNKNOWN 0x12
#define STK_INSYNC  0x14
#define STK_NOSYNC  0x15
#define CRC_EOP     0x20 //ok it is a space...

void pulse(int pin, int times);

void setup() {
  Serial.begin(19200);
  pinMode(LED_PMODE, OUTPUT);
  pulse(LED_PMODE, 2);
  pinMode(LED_ERR, OUTPUT);
  pulse(LED_ERR, 2);
  pinMode(LED_HB, OUTPUT);
  pulse(LED_HB, 2);
}

Serial throwing a fit...

It's one of the examples sketches that is included in the standard IDE. You'll find it at File / Examples / ArduinoISP.

When you load it, make sure the other gear is disconnected and use your normal target board and programmer (presuming Arduino Uno if you've set it up with a capacitor as per those instructions). Then after the sketch is loaded, connect everything back up, choose the target as ATTiny85 and the programmer "Arduino as ISP" and you're on your way.

Cheers ! Geoff

Thanks for all the help, now i'm getting somewhere :slight_smile:

cheers. - i may or may not be back lol :slight_smile:

Whooooooooooooooooooooooooooooooo all sorted mucho's gracias senor :slight_smile:

I do love it when a story has a happy ending. All the best ! Geoff

cjdelphi:
Which leads me to conclude, i need an external crystal because it's simply not working.

Try selecting "Board->ATtiny85 (internal 8mHz clock)" then do a "Burn Bootloader". This will reset the fuse bits if they've been configured for an external crystal.

This thread seems to indicate that a Sketch can be written for ATtiny devices?
As a brand new newbe, I thought the Auduino app only worked for just a few
AVR chips?

eightbits2012:
This thread seems to indicate that a Sketch can be written for ATtiny devices?
As a brand new newbe, I thought the Auduino app only worked for just a few
AVR chips?

Other chips can be added to the Arduino IDE with some modifications to files. In the case of the ATTiny, you need to read through the page on this link to see where to start. http://hlt.media.mit.edu/?p=1695

eightbits2012:
This thread seems to indicate that a Sketch can be written for ATtiny devices?

Yes. Once you set things up the IDE works exactly the same for an ATtiny85
as for an Arduino Uno (or whatever).

eightbits2012:
As a brand new newbe, I thought the Auduino app only worked for just a few
AVR chips?

You can install definitions for other AVR chips. They're quite easy to find with Google.