Pages: [1]   Go Down
Author Topic: ATtiny85 performance issues with Arduino  (Read 1364 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4092
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yep you're right, I meant to post back here earlier actually after I fixed the issue smiley-razz resistor to ground did the trick!
Logged

Pages: [1]   Go Up
Jump to: