Pages: [1]   Go Down
Author Topic: Reset button schematic for ATTiny84  (Read 917 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 1
Posts: 127
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am trying to figure out the proper way to hook up a reset button to the 84, according to the datasheet it needs 0.2v to 0.9v to trigger a reset, so should I just put a proper sized resistor between 5v rail, momentary button, and the reset pin?
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4095
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

The usual is a 10K resistor from the reset pin to Vcc, and the button from the reset pin to ground.

If a bootloader and capacitive auto-reset circuit is used, a small signal diode (1N914, 1N4148, etc.) in parallel with the resistor, cathode to Vcc is recommended. But that's probably not the case with an ATtiny84.
Logged

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

Offline Offline
Full Member
***
Karma: 1
Posts: 127
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Would that not supply voltage to reset until the button is pushed causing no power to reset while pushed?
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4095
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

Yes, that's the point, a low level causes a reset. The voltage specs are worst case. At worst, the chip will consider anything below 0.2Vcc to be a low level, and anything above 0.9Vcc to be a high level. Pushing the button forces the reset pin to 0V. When the button is not pushed, the reset pin will be held at Vcc by the resistor.
Logged

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

Offline Offline
Full Member
***
Karma: 1
Posts: 127
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If that is the case then how come the attiny84 runs fine with the reset pin floating, would that not then cause it to be stuck in reset and never run?
Logged

Offline Offline
Full Member
***
Karma: 1
Posts: 127
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Duh I feel like an idiot now that I think about it... if it's floating it isn't being driven low at all because it's not to ground...  BUT that brings me to my next thought, if it works floating why couldn't the button be connected in-line to ground with no resistor from Vcc?
Logged

Offline Offline
Full Member
***
Karma: 1
Posts: 127
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok I just tried it on the breadboard, 10k from Vcc to reset, button from Reset to ground, seems to work (I have it running the LED Fade sketch), when I hold down the button the LED stops fading, and as soon as I let go it starts fading again!  So I guess that works!
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4095
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

Yeah it may run while floating, or not. If it does, it's just luck. Remember input pins have very high impedance, so if there's nothing to pull it to ground, then it'll run, but EMI or static or the phase of the moon smiley-lol could change that from one second to the next. Likewise, there's nothing to pull it to Vcc. So the resistor is to ensure the pin is at (or very, very near to) Vcc and stays there unless the button is pushed. Random un-commanded resets are definitely a thing to be avoided!
Logged

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

Offline Offline
Full Member
***
Karma: 1
Posts: 127
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Awesome thanks so much for your help!  I just tested it on breadboard and it worked perfectly as you said to do so.  I am making a attiny84 proto board with 14 inline pins to easily plug into a breadboard, my first ever PCB circuit I made!  Did it earlier and it came out perfect, so now I just added the reset switch to it!  I still have a 5v 500ma regulator to put on there too yet.



Pics from before I added the reset button smiley.
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4095
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

Very cool. I've played with some of the other ATtiny MCUs, but not the '84. Someday...
Logged

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

Leeds, UK
Offline Offline
Edison Member
*
Karma: 80
Posts: 1730
Once the magic blue smoke is released, it won't go back in!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I like the 84's. I think of the Tiny series they are the closest to the atmega328 in terms of how the timers and other registers are layed out. They also seem to behave well when given a bootloader.

I have to say, you have done a great job with that peice of veroboard, it's very neat indeed!
Logged

~Tom~

Offline Offline
Full Member
***
Karma: 1
Posts: 127
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks!  Here is a pic after adding reset button to it, next step is 5v regulator up in the top right corner somewhere, 2 caps for it, and some sort of lead for power input and I think it will be finished smiley.


* IMG_20120820_114303-1.jpg (281.03 KB, 1342x976 - viewed 33 times.)
Logged

Pages: [1]   Go Up
Jump to: