Go Down

Topic: Using the reset pin on atmega328p (Read 1 time) previous topic - next topic


Hello, I have made a scoreboard and once it reaches all the way up to 10 I need a way to reset the game. I am wondering if I can hook up a push button to the reset pin of the micro-controller. Do I need to put any resistor or anything?. I will be using a standalone atmega328p with boot-loader on it for this project. Thanks for any assistance!


You should have around a 10k pullup resistor on the pin and have the switch pull the line to ground


It sounds like what you want to do could be done without having to reboot the board. That just seems a little harsh. You could use any pin you want as an input and just detect a voltage or logic state change. Like the previous reply said, implement a pull up resistor. There are plenty of code examples to help you with detecting a button press and handling de-bounce (which can also nicely be handled in many cases with a parallel capacitor). Check out the Playground:Input:Mechanical:Switches and Buttons section
What triggers your score to increment?


Jan 24, 2012, 03:59 pm Last Edit: Jan 24, 2012, 04:11 pm by jat421 Reason: 1
Thanks for the suggestions :)...Yea I was looking for a easy way out  ]:. I will try to read up on using the digital pin for resetting. Thanks!

I have a sensor photo sensor that is doing the increment.


Pulling the reset pin to ground will reset your program. It will work and cause no problems.

Most folks like the more elegant method of having another input that resets your counter to 0 and any other initial conditions that you need to set.


As others have said, you don't need to reset the board - only have a switch input to your sketch that tells you to zero the scores.

Since the Arduino inputs have a built-in pullup resister (software enabled), you can do this just by wiring a switch to pull one of the inputs low - you don't need to wire up external resisters.
I only provide help via the forum - please do not contact me for private consultancy.


I agree with the software version unless you don't mind the 1-2 sec while the bootloader runs
I usually like to have a pyshical pullup resistor, its more robust than the 20-50k internal,


All great suggestions!. Thanks!...Gonna give it a try over the weekend. Thanks again guys for the help!  XD

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131