I'm trying to make a ATmega328 run on a breadboard.
I am stuck on deciding if I need a reset switch.
Do I need one? Can I just unplug and plug in the battery instead? If I do need one, how would I go about doing this?
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It only takes a minute to sign up.Sign up to join this community
The ATmega can work without a reset button. Powering down the controller will reset it, as the O.P. expected. In-circuit programmer will also reset the controller every time new firmware is loaded.
If it becomes apparent that a reset button would be a nice thing to have, it can be wired like this:
Source: Atmel application note AVR042 (AVR Hardware Design Considerations) p.6
There is also a simplified approach, although be sure to read the comments made by @vaxquis below.
Since the circuit is built on a breadboard, one can always take a wire and touch between RESET# and ground. That will momentarily bring the RESET# to ground, which will reset the controller.
Reset switches often fall in the category of things which aren't needed, but are nice to have, especially if a device will be communicating with a PC using something like an FTDI USB-to-serial converter. If an FTDI chip is powered by the board, communications will not be possible for the first few seconds after the board is powered on. If it's powered by the PC, the signal wires from the FTDI may power the board even when no other supply is connected. Adding a reset button will make it possible for the PC to have an open connection with the FTDI chip at the moment the board comes out of reset. That can a very useful ability to have, and a reset switch is one of the easiest ways to achieve it (another option may be to use the DTR wire from the FTDI to control the reset line, though most reset lines are active-low and the default behavior of most programs drive DTR low during communication).
Generally MCU itself does not require RESET because power cycle do it too with some exception as is register indication what is reason of reset (power, reset, watchdog, brown-out,...). But if you have another statefull ICs then they are affected but power cycle too. Typical example is USB ICs mentioned by supercat but also e.g. encoders, sensors, multi PCB project powered via bus etc.