Go Down

Topic: ATtiny85 performance issues with Arduino (Read 1 time) previous topic - next topic

smnanthny

I've recently programmed an ATtiny85 with the Arduino bootloader (8MHz) for a project I need to read 3 analogue inputs.

I started by writing a simple sketch that calls a digitalRead() on pin 2 (physical pin 7) and changes the state of an LED based on whether an input is detected or not. When I apply a voltage to the input using a resistor it reacts instantly changing the LED state but when I remove the input, the 'Tiny takes ~5seconds to respond and switch the LED back.

Does anyone have any information that may help? I started by burning the bootloader that came with the Arduino 1.0.5 IDE and then tried a 3rd party 'Tiny core when I had the issue but it still persists.

Jack Christensen

Is there anything else connected to the input pin? A resistor to ground might be appropriate. Else the pin will float, it may return to a low logic level at some point, or not.
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

smnanthny

Yep you're right, I meant to post back here earlier actually after I fixed the issue :P resistor to ground did the trick!

Go Up