Ben Eater's Reset Circuit

Building your first 6502-based project? We'll help you get started here.
User avatar
drogon
Posts: 1671
Joined: 14 Feb 2018
Location: Scotland
Contact:

Re: Ben Eater's Reset Circuit

Post by drogon »

Martin A wrote:
BigEd wrote:
It might be interesting to look up how the Apple 1, the PET, the Superboard, the Atom managed their reset lines - I expect they were pretty minimal about the arrangement. Even moving forward, to the Apple II, the C64, the Beeb, I wouldn't expect to see a reset controller - maybe a monostable.
I have a few schematics to hand, looks like the PET, Vic20 and BBC used a 555 timer

An Apple 1 used just a 3k resistor the JPG I have is pretty bad, but I can't see anything other than the resistor

The Atom had an RC (1k/10uf) delay feeding an couple of LS04 inverters
The Apple II, Rev 0 was also a resistor to 5v and a switch to pull it low. Rev 1 and onwards boards used a 555 timer to generate the reset pulse. (Also note that some peripheral boards could also reset the system - notably the Disk II controller board which with the 2nd rev "autostart" monitor ROM would enable a Rev 0 board to reset and boot off disk on power on automatically. But that's incidental to this!)

-Gordon
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
gfoot
Posts: 871
Joined: 09 Jul 2021

Re: Ben Eater's Reset Circuit

Post by gfoot »

I've never liked just wiring it up to the 6502 like that - I prefer putting in a proper Schmitt inverter. One reason is that the 6502 is not the only thing that receives the reset signal, and different ICs may have different thresholds, and hence come out of reset at different times. Using a Schmitt inverter (or a 555, or digital timer, or a dedicated reset controller) more or less ensures that all the components agree about at which point the reset is complete.
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: Ben Eater's Reset Circuit

Post by BigEd »

Mmm, I see the motivation, and to an experienced person it might be a case of better safe than sorry. But for an educational or hobby context I personally don't see it - perhaps I'm more of a minimalist. We see that various popular home micros didn't try especially hard.

As for the timing, I'm not sure that seems like a big risk, with the 6502 taking 7 cycles to do the RESET sequence and probably a few more before it gets to talk to any peripheral.
gfoot
Posts: 871
Joined: 09 Jul 2021

Re: Ben Eater's Reset Circuit

Post by gfoot »

BigEd wrote:
As for the timing, I'm not sure that seems like a big risk, with the 6502 taking 7 cycles to do the RESET sequence and probably a few more before it gets to talk to any peripheral.
I'm not sure, I don't think it's unreasonable for the RC circuit to take a few hundred or thousand cycles to sweep up the voltage range from say 1V to 3V, if you've picked values to try to prevent bouncing or to delay things until the power is stable when booting from cold.
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: Ben Eater's Reset Circuit

Post by BigEd »

Ah, debouncing considered harmful! (Seriously though, while debouncing is exactly what might be needed for single-stepping, how much does it matter if a home computer is reset several times within a hundred milliseconds? Is the software at all likely to do anything to the hardware which isn't going to be OK to repeat next time around?)
pjdennis
Posts: 51
Joined: 15 Apr 2022
Location: San Antonio, TX, USA

Re: Ben Eater's Reset Circuit

Post by pjdennis »

For posterity, this is the "Ben Eater Reset Circuit" under discussion in this thread, consisting of a 1K resistor, a 0.1uF capacitor and a push button switch:
BE reset.png
BE reset.png (8.13 KiB) Viewed 8274 times
Edit: this is an excerpt from schematic on the Ben Eater web site at https://eater.net/6502
Last edited by pjdennis on Wed Jan 11, 2023 12:01 am, edited 1 time in total.
User avatar
Dr Jefyll
Posts: 3525
Joined: 11 Dec 2009
Location: Ontario, Canada
Contact:

Re: Ben Eater's Reset Circuit

Post by Dr Jefyll »

In the lead post, Chad says there's only the resistor and the pushbutton -- nothing else (no capacitor). And IMO that should be just fine, for a manual reset after powerup.

Automatic reset that occurs as a result of powerup is quite a different set of requirements.

-- Jeff
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
pjdennis
Posts: 51
Joined: 15 Apr 2022
Location: San Antonio, TX, USA

Re: Ben Eater's Reset Circuit

Post by pjdennis »

Dr Jefyll wrote:
In the lead post, Chad says there's only the resistor and the pushbutton -- nothing else (no capacitor).
A fair point. The Ben Eater videos don't show the capacitor, however it's on the schematic on the beneater.com web site.
barnacle
Posts: 1831
Joined: 19 Jan 2004
Location: Potsdam, DE
Contact:

Re: Ben Eater's Reset Circuit

Post by barnacle »

Dr Jefyll wrote:
Automatic reset that occurs as a result of powerup is quite a different set of requirements.
Indeed. A single board development kit has no great need to start up reliably if there is a big fat reset button sitting in front of you, though it's better if it does. By the time you get to a desktop machine it's a much better user experience if it just works when you turn it on. Though I recall x86 machines through the eighties all had a big reset button (usually next to the 'turbo' button :) )

And if one of my commercial embedded designs doesn't reliably start - not 99.9% but every time - then it's a serious problem... whether it's a cat feeder or a robot at the bottom end of a five kilometer drill string. But that said, modern processors seem to have got better at that, even without the assistance of an external reset circuit.

Neil
sburrow
Posts: 833
Joined: 09 Oct 2021
Location: Texas

Re: Ben Eater's Reset Circuit

Post by sburrow »

Indeed, I never did see Ben Eater's schematics, just the video. Now that I saw he added a capacitor in there, I just put that in my own circuit to test it. Attached is a picture of what I'm using right now (the IC used here is the MCP130xxxD, could also be a DS1813).

I don't know if that capacitor is hurting a lot or not, but it works on power up and push button WITH the MCP130 attached.

I then removed the MCP130 and it STILL worked, both on power up and push button.

I'm using a 10K pull-up, but Ben Eater is using a 1K pull-up. That's the only difference. And so far, with my minimal testing, it seems to work fine enough. I reconnected my MCP130 anyways because I'd rather be extra safe, and I want to test it like for the next few days. I can always clip off the capacitor and resistor if I wanted to.

This doesn't prove that a 10K pull-up with a 0.1uF cap is truly good for power on reset. But at least it works here, on this board, at the moment, for right now, at least a couple of times in a row. Lot's of stipulations :)

Thanks everyone.

Chad
Attachments
ModifiedResetCircuit.png
ModifiedResetCircuit.png (16.99 KiB) Viewed 8180 times
sburrow
Posts: 833
Joined: 09 Oct 2021
Location: Texas

Re: Ben Eater's Reset Circuit

Post by sburrow »

Update:

I had clipped the MCP130 off and was testing ONLY the 10K resistor with the 0.1uF cap and it seemed to work fine this morning, tried multiple times. I got to turn it on this afternoon and it worked enough to show the splash screen but then it crashed somewhere along the way and sent some garbage to the screen. Hm...

I'm thinking my 100uF power capacitor (can't remember the name for those things) has something to do with power-on reset stability or something. It seems that if I had it powered on recently, everything works fine. But a VERY cold power-on does not work well with the resistor+capacitor setup.

To keep this short: Don't rely on the resistor+capacitor reset circuit during power-up.

I replaced my MCP130 for the 5th time and it works fine now. I removed the cap but kept the 10K pull-up because I felt like it.

There's the update, thanks everyone!

Chad
User avatar
BigDumbDinosaur
Posts: 9425
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: Ben Eater's Reset Circuit

Post by BigDumbDinosaur »

sburrow wrote:
To keep this short: Don't rely on the resistor+capacitor reset circuit during power-up.

10K is too high a value—the circuit will be noise-sensitive. I’d go no higher than 3.3K.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
sburrow
Posts: 833
Joined: 09 Oct 2021
Location: Texas

Re: Ben Eater's Reset Circuit

Post by sburrow »

BigDumbDinosaur wrote:
sburrow wrote:
To keep this short: Don't rely on the resistor+capacitor reset circuit during power-up.

10K is too high a value—the circuit will be noise-sensitive. I’d go no higher than 3.3K.
Is that... with the MCP130 / DS1813 supervisor? Or without?

You are saying a 3.3K (or less) pull-up with the 0.1uF cap and remove the supervisor entirely?

Sorry for my confusion BDD.

Chad
User avatar
floobydust
Posts: 1394
Joined: 05 Mar 2013

Re: Ben Eater's Reset Circuit

Post by floobydust »

According to the datasheet for the MCP130, it is an open-drain output with an internal 5K pull-up. As a result, adding a 10K pull-up would result in 3.3K overall.

Also, keep in mind that triggering the MCP130 with a momentary switch on the output will NOT reset the internal delay, as the device is not designed to be used in such a circuit. The DS1813 is designed to be used with a manual trigger and will reset it's time delay when the momentary switch is closed.
plasmo
Posts: 1273
Joined: 21 Dec 2018
Location: Albuquerque NM USA

Re: Ben Eater's Reset Circuit

Post by plasmo »

sburrow wrote:
I'm thinking my 100uF power capacitor (can't remember the name for those things) has something to do with power-on reset stability or something. It seems that if I had it powered on recently, everything works fine. But a VERY cold power-on does not work well with the resistor+capacitor setup.
For consistent power-on characteristics, I would ground the power lead briefly to discharge residual voltage in capacitors before plug in 5V. RC-based reset will work consistently if you ground first before re-applying power.

Like floobydust said, MCP130 does not generate the long reset pulse if reset with push button, but you can monitor with scope and see the inexpensive tactile switch typically generates very clean reset without bounces. I use reset circuit like yours all the time and very seldom have problem with push button reset.

Another approach is put a 220 ohm resistor between 5V and MCP130’s VCC terminal and connect reset button to MCP130’s VCC terminal. Reset button will drop MCP130 voltage and trigger the power-on reset pulse. MCP130 is 50 cents vs $3 DS1813, it is worth the extra resistor if you really want a clean reset every time. I don’t bother with that, personally.
Bill
Post Reply