6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Apr 20, 2024 1:16 am

All times are UTC




Post new topic Reply to topic  [ 28 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Thu Nov 27, 2014 6:02 am 
Offline

Joined: Sun Jul 28, 2013 12:59 am
Posts: 235
Isn't that oscillator circuit supposed to have a couple of capacitors from each side of the crystal to ground? I'm not seeing any...


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 27, 2014 6:13 am 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1922
Location: Sacramento, CA, USA
GARTHWILSON wrote:
It does sound primarily like a clock problem. The reset circuit, not being debounced, is not adequate, but is probably not what's keeping it from toggling the address lines. The 7805 takes about 1.5V minimum, so if you're starting with 6V from the batteries if they're pretty new, you'll only get 4.5V out of the 7805, which is below spec. for the processor but probably not low enough to keep address lines from toggling.

Many years ago I made a proto-board 65802 project, and the only problem that I had with it was an initial "zombie" condition that I finally traced to improper RESET hysteresis. Playing around with a simple RC combo finally did the trick, and I was off and running!

Here's a post with a picture and brief description.

Mike


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 27, 2014 6:20 am 
Offline

Joined: Wed Nov 26, 2014 7:45 am
Posts: 13
nyef wrote:
Isn't that oscillator circuit supposed to have a couple of capacitors from each side of the crystal to ground? I'm not seeing any...


That's what I thought, but every schematic I've seen doesn't have them or specify values.


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 27, 2014 6:26 am 
Offline

Joined: Wed Nov 26, 2014 7:45 am
Posts: 13
barrym95838 wrote:
GARTHWILSON wrote:
It does sound primarily like a clock problem. The reset circuit, not being debounced, is not adequate, but is probably not what's keeping it from toggling the address lines. The 7805 takes about 1.5V minimum, so if you're starting with 6V from the batteries if they're pretty new, you'll only get 4.5V out of the 7805, which is below spec. for the processor but probably not low enough to keep address lines from toggling.

Many years ago I made a proto-board 65802 project, and the only problem that I had with it was an initial "zombie" condition that I finally traced to improper RESET hysteresis. Playing around with a simple RC combo finally did the trick, and I was off and running!

Here's a post with a picture and brief description.

Mike


Thanks Mike. One of the fun things about accelerated AA courses are the loss of things. I vaguely remember anything about hysteria.


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 27, 2014 6:47 am 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1922
Location: Sacramento, CA, USA
kasrym wrote:
Thanks Mike. One of the fun things about accelerated AA courses are the loss of things. I vaguely remember anything about hysteria.

I wasn't exactly hysterical about it, but I remember being up against a deadline, and my blood pressure had reached an unhealthy level because of it! :shock:

Put in "layman's" terms, I found that my /RES was floating to logic high too quickly after power-up to allow the '802 and clock to settle properly, and my solution was to tie /RES to ground through a capacitor, and to +5v through a resistor. I apologize for not remembering the actual working values of those two components, but the idea was to delay the rise of /RES just long enough to do the trick. There are more efficient ways of doing it, I'm sure, but my little kludge got me through to a passing grade, and that was my immediate goal.

Best of luck,

Mike


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 27, 2014 6:52 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8423
Location: Southern California
I believe the '802 has a Schmitt-trigger reset input though, while the old NMOS 6502 does not, and just putting a capacitor on that line to let it up more slowly can cause problems on the NMOS '02 as the voltage slowly makes its way through no-man's land, possibly with noise on it from the clock and other lines that might start toggling. That's why I advocate a clean reset signal.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 27, 2014 6:56 am 
Offline

Joined: Wed Nov 26, 2014 7:45 am
Posts: 13
barrym95838 wrote:
kasrym wrote:
Thanks Mike. One of the fun things about accelerated AA courses are the loss of things. I vaguely remember anything about hysteria.

I wasn't exactly hysterical about it, but I remember being up against a deadline, and my blood pressure had reached an unhealthy level because of it! :shock:

Put in "layman's" terms, I found that my /RES was floating to logic high too quickly after power-up to allow the '802 and clock to settle properly, and my solution was to tie /RES to ground through a capacitor, and to +5v through a resistor. I apologize for not remembering the actual working values of those two components, but the idea was to delay the rise of /RES just long enough to do the trick. There are more efficient ways of doing it, I'm sure, but my little kludge got me through to a passing grade, and that was my immediate goal.

Best of luck,

Mike


Ah. Yeah, I have /RES tied to ground via a 10uF cap, and to VCC with a 2.7k. I'm going to try to verify the clock before I go forward. I just hope I didn't fry my 6502. What my current worry is. Lol


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 27, 2014 7:09 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8138
Location: Midwestern USA
I didn't see any mention of the MPU's RDY input. It should be pulled up to Vcc with a resistor (3.3K recommended).

Also, Garth noted the problems of generating a proper reset pulse to the NMOS 6502. A good solution is the Maxim DS1813 reset generator, a handy little gadget that will hold reset down for ~150ms after Vcc stabilizes above 4 volts. The DS1813 also responds to a push button on the reset line, so it is both automatic and manual in nature.

Other reset generation methods have included using a 555 timer (the Commodore 64 had one for that purpose) or half of an LM393 comparator rigged up to act as a timer (I used to do that years ago). The DS1813 is the simplest solution that I know.

Lastly, the NMOS 6502 has relatively weak fan-out. It doesn't take too much to load it to where you can no longer get adequate voltage on its outputs when they are supposed to be a logic one. This is one of several reasons why we recommend starting out with the 65C02.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Sat Nov 29, 2014 4:39 am 
Offline

Joined: Wed Nov 26, 2014 7:45 am
Posts: 13
Would adding 2 22pF caps between both pins of the crystal and ground force the clock to oscillate?


Attachments:
Screenshot_2014-11-28-22-36-55.png
Screenshot_2014-11-28-22-36-55.png [ 169.76 KiB | Viewed 974 times ]
Top
 Profile  
Reply with quote  
PostPosted: Sat Nov 29, 2014 4:58 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8423
Location: Southern California
See the 6502 primer's page on clock generation, at http://wilsonminesco.com/6502primer/ClkGen.html . There are a couple of ap. notes linked there also on making oscillators. Using oscillator cans however is less work, more reliable, and takes less board space.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Sat Nov 29, 2014 5:10 am 
Offline

Joined: Wed Nov 26, 2014 7:45 am
Posts: 13
kasrym wrote:
Would adding 2 22pF caps between both pins of the crystal and ground force the clock to oscillate?


I have read both of the pdfs on your primer, and the circuit you have at the top is the one that I am using, I just didn't know if anything is omitted to simplify it. I could do a Colpitts, but I was wanting to try it around the 7404. Just for a learning experience.


Top
 Profile  
Reply with quote  
PostPosted: Sat Nov 29, 2014 5:45 am 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1922
Location: Sacramento, CA, USA
kasrym,

Please take heed of Garth's warning about an inadequate /RST circuit ... the man knows his stuff! Even though it was 27 years ago, I was using a CMOS chip that was apparently much more tolerant of marginal design than your NMOS chip. I would strongly recommend implementing one of Garth's examples, rather than a simple R-C combo.

Mike


Top
 Profile  
Reply with quote  
PostPosted: Sat Nov 29, 2014 5:57 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8423
Location: Southern California
In going from 74LS04 to 7404, I think the resistor from the input (on the left) to ground will need to be about a quarter as much, since the 7404's input current is quadruple that of the 74LS04. There is no reason to use 7400 logic anymore though, unless you have a lot of it and you're in a place or situation that makes it hard to get at least 74LS if not 74HC or other CMOS. The capacitors provide phase shift; but for myself, without being strong in oscillator-related math (which can get rather complex for oscillators if you want them to be dependable across the range of all potential operating conditions), I don't know if maybe the 7404/74LS04's inputs provide a heavy enough load to omit the capacitors. I design mostly analog circuits for a living; but although I've designed various kinds of oscillators that do work, I don't consider myself to be expert enough in that department to fully trust my own crystal oscillator designs for products we will be marketing. For that, I'd rather buy an off-the-shelf one.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 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: