Problem programming an Attiny85

Dear friends,
I am experiencing a strange problem. I am developing amateur projects for my RC aircraft. Most of them are relatively simple projects which do not necessitate too many ports. So I do most of the development on an Arduino Uno and then adapt the code to use on an Attiny85. This way I can have very small modules and they don't cost too much.
I am using an Arduino Uno as ISP and transfer the code to Attiny85 using this setup.
I have programmed tens of Attiny85's using this method without any problems.
A couple of days ago I began having problems. The code I was writing to Attiny85 was not working as expected. I have tried three separate chips without success. I have connected the recommended red LED to the 8th port of the Arduino (which shall show errors) but there are no problems.
These are my (standart) steps:

  • Connect Attiny85 to the breadboard.
  • Check the connections.
  • Open the sketch.
  • Select Attiny/Attiny85/8MHz internal.
  • Burn bootloader.
  • Compile and burn the sketch (which has been tested previously and is working on at least five modules now).

Everything seems to be OK but the code doesn't run as expected.
Another important point is, all three chips behave differently after programming. This lets me think that there is something wrong with the programming setup.
I have reinstalled the Arduino as ISP sketch on the Arduino Uno board but there was no difference.

In the meantime I have ordered a USB Tiny Programmer board but I am trying to find out why a working setup has begun to experience such weird problems.

Any ideas and suggestions are welcome.

Sumer Yamaner

Have you tried a simple blink program? Or one or you're older programs? It's a little bit weird you don't tell what's not working. All you say is it doesn't work. But yeah, my crystal ball is still in repair...

I'm starting to think you made a program that's incompatible with the ATtiny. Maybe you use to much ROM or RAM? Or used timer 2?

Some time ago I did some Tiny85 programming and followed the instructions here:

which worked well for me.

Thank you for the answers and advice. First of all, everything was working fine until a couple of days ago. That means, I have programmed several Attiny85's and they work just as expected. The program is compatible with the Attiny because it is running on several Attiny's now. :slight_smile:

I will try the simple blink code first. Thank you again.

I am totally confused now! The simple blink code works fine. But the other code not! I have three separate backups of my tested codes. For this one I have checked all and they are the same. I am really confused. I have to rewrite the code. I am sorry for wasting your time.

Oh my god!!!

My test platform for the RC projects is an Assan 2.4 transmitter & receiver. The Assan system behaves somehow strange. I have written a test code and have found out that if I use the command pulseIn(rxPin, HIGH, 25000) the function returns 2048 and 0 alternatively. I think this has something to do with the receiver software and framerate. When I change the command to pulseIn(rxPin, HIGH) everything reverts to normal operation. (I can write down the full code if you want but basically it is s code for a smart kill switch for gasoline engines where you have to double click the button to shut down the engine).