6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 12:52 pm

All times are UTC




Post new topic Reply to topic  [ 55 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
PostPosted: Tue Jan 10, 2023 12:23 pm 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1488
Location: Scotland
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/


Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 10, 2023 12:58 pm 
Offline

Joined: Fri Jul 09, 2021 10:12 pm
Posts: 741
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.


Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 10, 2023 1:25 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
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.


Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 10, 2023 7:09 pm 
Offline

Joined: Fri Jul 09, 2021 10:12 pm
Posts: 741
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.


Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 10, 2023 7:14 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
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?)


Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 10, 2023 7:17 pm 
Offline

Joined: Fri Apr 15, 2022 1:56 pm
Posts: 47
Location: San Antonio, TX, USA
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:
Attachment:
BE reset.png
BE reset.png [ 8.13 KiB | Viewed 7380 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.

Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 10, 2023 10:22 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
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


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 11, 2023 12:08 am 
Offline

Joined: Fri Apr 15, 2022 1:56 pm
Posts: 47
Location: San Antonio, TX, USA
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.


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 11, 2023 6:41 am 
Offline

Joined: Mon Jan 19, 2004 12:49 pm
Posts: 985
Location: Potsdam, DE
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


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 11, 2023 1:10 pm 
Offline

Joined: Sat Oct 09, 2021 11:21 am
Posts: 718
Location: Texas
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 7286 times ]
Top
 Profile  
Reply with quote  
PostPosted: Thu Jan 12, 2023 10:01 pm 
Offline

Joined: Sat Oct 09, 2021 11:21 am
Posts: 718
Location: Texas
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


Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 13, 2023 12:58 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8509
Location: Midwestern USA
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!


Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 13, 2023 2:15 am 
Offline

Joined: Sat Oct 09, 2021 11:21 am
Posts: 718
Location: Texas
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


Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 13, 2023 2:28 am 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
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.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 13, 2023 3:17 am 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1120
Location: Albuquerque NM USA
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


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 55 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: