Sketch upload onto ATtiny85

Hi all, i'm a newbie on arduino, i'm having trouble to upload a sketch onto an attiny85. the thing is i burn the optiboot bootloader to it, and it let me upload right after burning it a sketch, but if i want to upload another sketch or the same one with some mods, it won't upload, it will only be uploaded if i reburn the bootloader again. Can someone explain me what i'm doing wrong? Thanks in advance, and sorry for my ignorance :wink:

I guess it depends … if you write the bootloader , when you then upload a program , it must be that you over write the bootloader with your sketch .
Chances are you are using the same wiring and connections to the tiny to bootload and then program - so this happens .

You need to load the bootloader then upload your sketch using a serial connection .
Like this

To be honest I just do the bootloader then sketch bit every time , it takes little time

Thank's hammy for pointing me the way, as i'm in the middle of a project doing some tests, burning the bl each time i change the sketch is quite annoying, but will try changing wiring as you suggest. Thanks again!!!

Just curious, what programmer are you using? I just bought a Pickit4 from Microchip and wish to upload to a Attiny85. Does anyone know of a web link that supports the Pickit4 with Arduino IDE?
Eventually I will also use Atmel Studio but it has a bit of a steep learning curve compared to Arduino.

hi, for now i'm using just arduino as isp, got stuck in it as i can't use the one hammy pointed due to drivers are just for windows and i'm using mac... lot of research ahead yet....

Why bootload it at all?

"Burning the bootlaoder" may be inaccurate. With a core like ATTiny core you "burn the bootloader" in order to set the fuses for clock source, clock frequency, BOD, etc. and , optionally, load the bootloader code that enables uploading code through the serial port. So if you do not load the code to enable upload one is just setting fuses when you burn bootloader.

is not needed to use it with arduino ide? how is that?

I do it this way --

I think it's like ICSP (no bootloader, starts running right away).

@runaway_pancake, have you tried Dr. Azzy's ATTinyCore core for tiny85 (and more)? I tried a bunch of different cores and found the ATTinyCore core to be the best (in my opinion).

I have not.
Will it coexist with highlowtech's version. Theirs was the first and it's never failed me.
The ATtiny85 are DIP-8, just like the "555", and when I use them it's generally like a Smart-555.

I like the ATTinyCore core because it is more like programming for an Uno or Mega. There are versions of Serial, Wire and SPI instead of special tiny versions. And a lot of choices for clock frequency and source.

I have used tiny85 for a controller to monitor temperature in a solar battery box and turn on a fan, measure temperature on a race bike and display on the dash with a serial 7 seg. LED, and a bunch of LED controllers.

Does avrdude interface to that programmer via the Arduino IDE?

I have a pair of Atmel Dragons that I use on the micros. Saved a number of 328's when I set the wrong fuses... it has high voltage capability for resetting everything....

Only power and the isp connector are needed. It's configured, with the colored jumpers, to allow the tiny85 to be put into the zif socket.

It's connected here to the attiny85

Never mess with a boot loader with it either....

:smiley_cat:

It does.

Mine isn't on a breadboard. I built it on a 'proto-shield' - a few wires, a cap, and a DIP-8 socket - which stays plugged into a UNO (well, a Duemilanove, actually).

1 Like

The real advantage to the hardware I have is that it will allow you to debug on the micro itself...

@ihatesoftware Pickit4 has the same capabilities... It's just MicroChip now instead of Atmel and it covers the newer processors. My dragon is obsolete.

@ihatesoftware - might look at how the dragon or other programmers were implemented into the Arduino IDE and see if you can put it together...

Good luck

:smiley_cat:

Hi there!! thank´s a lot for all the advices. i was waiting till some atmega328 chips to arrive to check, once they arrived i connected it on the breadboard, and everything started to work as it should. Load bootloader to attinny, and after, load what ever sketch many times with no issues anymore. so my conclusion is: maybe the problem was the arduino nano (old bootloader) i was using as isp making the mess, now i´m using the atmega328p naked as arduino uno, and it is working perfect, with no changes on wiring or added components (caps,resistors,etc).
Again, thank you all of you to pointing me the way letting me to try or doublecheck my setup.
Cheers

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.