Programming ATtiny85

I have been playing around with a board called the Digispark. I have utilized the blink program and modified it to flash 3 times on and off. I am using 100ms on and 25 ms off and it loops continuously.

The Digispark runs at 16MhZ. I wanted to try my hand at programming a Tiny 85 on a breadboard. I connected it up as shown in several Youtube video's and other places on the web. I did not burn a bootloader. After setting up the Arduino Uno as an ISP programmer I simply loaded my triple blink sketch and burned it to the chip. I used the 8MhZ chip as the board in the Arduino IDE.

Here lies the problem. After programming the chip, I connected a 5mm LED and resistor to the pin requested within the sketch. The LED does blink, but nowhere close to the speed that it does on the Digispark.

Is this due to the clock speed of the chip or did I do something wrong ?

(deleted)

By default, AVR chips are set up to run off the 8MHz internal oscillator with the clock divided by 8, giving an effective clock of 1 MHz.

The "Burn bootloader" command int he IDE also changes to fuse bits, which should disable the CLKDIV8 setting and make it run at the full 8MHz.

Thank you for the replies. I'm finding out that once you burn the chip with a program you can't go back and put the bootloader on it. At least it didn't work for me.

I would like to ask one more question. When selecting the board from the Arduino IDE, one of the selections for the Tiny85 is 16Mhz, internal PLL, 4.3V, BOD. I'm assuming that is what the Digispark board is using. So, I would assume that if I use that selection on a new chip and burn the bootloader first, my sketch should perform as it does on the Digispark ?

Hi Powertek,

Surley someone will correct me if I am Wrong but I think that you can burn the bootloader at any time on the attiny85, I found that most of the problems in burning the bootloader, that I think we have all had, come from the fact that you dont use the 1uf capaciter or that your version of the Arduino IDE is not the latest, with the latest version the problems seem to be resolved.

hoping that you find this can help you

all the best

Carlos

IDE 1.6.12
Uno as programmer
Load ArduinoISP onto Uno
Connect Reset to 85 physical pin 1; SCK to 7; MISO to 6; MOSI to5
Don't forget power.
Reset does not need series capacitor to 85, just pullup of 10k
If raw chip, burn bootloader (doesn't burn bootloader but sets fuses) - select 8MHz internal if trying for first time. Just keep the AtTiny default settings as are
Keep the wiring in place, choose "Blink", Programmer = Arduinino as ISP, upload.
Disconnect all the wiring except power and connect LED to physical pin 5 on the 85 (max 10-mA on any pin). Internal 8MHz is accurate for most jobs
This assumes you have the AtTiny hardware in place, recommend SpenceKonde universal core.
Just been doing some of these, so know it works, eventually.
If you get "yikes" etc., check wiring, sometimes helps to reload ArduinoISP
If you get a load of other warnings, generally down to wiring, but it will work. Quite satisfying when it does