My6502 - A 74-Series 6502

For discussing the 65xx hardware itself or electronics projects.
vfxsoup
Posts: 34
Joined: 30 Sep 2019

Re: My6502 - A 74-Series 6502

Post by vfxsoup »

Here's how the microinstructions are currently organised across the two 16-bit ROMs. It's worth mentioning that a hint Dieter's gave me about the Z and N flags are always affected together saved me a slot, which was eventually filled with S.DN (Stack count direction). That in itself saved quite a few gates on the Control Unit!
Attachments
My 6502 Project - Microinstructions.pdf
(12.68 KiB) Downloaded 84 times
vfxsoup
Posts: 34
Joined: 30 Sep 2019

Re: My6502 - A 74-Series 6502

Post by vfxsoup »

I've made some changes to the Control Unit, most notably around the clock generation, and some changes to net labels to make them more consistent. I've included my attempt at a single-instruction step solution, which makes use of a 74HC112 JK FlipFlop because of its falling edge clock. I'm not sure yet how well this will work, in particular I'm a bit concerned about gating the OSC.DIV8 clock source with U5.1, but since the (CLOCK RUN) (in the timing diagram) signal is generated from a derivative of the clock source, it should be fine...
My6502 - Control Unit
My6502 - Control Unit

I was wondering, is R3 necessary, or is its placement wrong? I'm thinking I want to clear U4.2 on power up, so take the clear pin (pin 15) to ground temporarily, but then the #IR.LOAD signal takes over to keep the pin high.

I've also added bus terminations. Again, I'm assuming this is good practice?

Would love some feedback please if anyone is able, on any of the above, and indeed any of the other schematics on the previous page. I'm particularly interested in whether my interpretation of interrupt handling is correct. (I'm also slowly working through some of the circuits on breadboards).

Thanks, Christian
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: My6502 - A 74-Series 6502

Post by GARTHWILSON »

vfxsoup wrote:
I've also added bus terminations. Again, I'm assuming this is good practice?

For terminations to accomplish the purpose of eliminating reflections, they have to at least approximately match the characteristic impedance of the transmission lines. Having transmission lines requires a true ground plane (not just copper pours); and to match the characteristic impedance, you'll need to know what it is, by the width of the traces and the separation between them and the ground plane. (The dielectric constant of the PCB material is involved too, but normal FR4 material is 4.2, so you hardly need to specify.) Just putting resistors in somewhere, of a stab-in-the-dark value, will probably not be of any help, only add a lot of DC loading and thus power-supply current. If you don't want to study what it's all about and some of the math behind it, I would say just keep the lines as short as practical, and if that's still getting pretty long, see if you can do with 74HC rather than 74AC whose much faster rise and fall times make ringing harder to tame; and then leave the resistors out and just take advantage of the fact that CMOS ICs' input-protection diodes do help a little bit by clamping the overshoots. We've had a few discussions on terminations. One appropriate post might be viewtopic.php?p=33837#p33837 . I'll try to give more if you want to go further.
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?
vfxsoup
Posts: 34
Joined: 30 Sep 2019

Re: My6502 - A 74-Series 6502

Post by vfxsoup »

Hi Garth, very interesting and useful, thanks very much for the info. Yes, this was a bit of a stab in the dark TBH. I failed to mention that the 1K resistor values were the default values provided by the schematic software and that I'd not yet given any proper thought to what those values should be. Cheers, Christian
vfxsoup
Posts: 34
Joined: 30 Sep 2019

Re: My6502 - A 74-Series 6502

Post by vfxsoup »

This is version 1 of the Flash ROM daughterboard that I somewhat prematurely had fabbed, before I'd really given any thought to interfacing a 3.3v chip with a 5v system.
Microcode ROM Daughterboard v1
Microcode ROM Daughterboard v1
As you can see it is missing any kind of logic level shifting, and so is mostly useless (the little chip in the middle is just a 74HC04 hex inverter for the enable LEDs, which I've dropped from the new version because the enables are all hard wired preset). I decided to write one half of my microcode to one of my flash chips anyway, just to see if it would actually work, and hand-soldered the TSOP48 chip to the board. As you can see it was quite traumatic for the poor PCB; even though the pins were drowning in flux it was 30 minutes of hair-raising drag soldering, solder wicking, and swearing, where I was convinced I'd fried the chip. However after hooking it up to a couple of breadboards, and remembering to enable the chip-enable line, it miraculously worked just fine. This was doubly successful because it also showed my export routine from the software emulation was also writing everything out properly.
One thing this little exercise definitely did was to put me off using TSOP parts. The v2 board uses ZIF sockets anyway for the ROMS but the level shifters (74LVX4245) were all TSOP24 parts, and the thought of hand-soldering six of them no longer appealed. So I've re-designed the board with SOIC chips instead (74LVC4245), that look much easier to solder. I've also upped the passive components to 0805 parts rather than 0604 that were on the v1 board. Finally on this design I've plumped for a 4 layer board (3.3v and GND in the middle - the 5v rail is top-layer tracks), since I can get five of them made for an astonishing £5.58 plus shipping (the 2 layer version is only £1.59!). That makes routing that much simpler, and that's easily worth the extra £4 in my book!
Microcode ROM Daughterboard PCB v2.1
Microcode ROM Daughterboard PCB v2.1
vfxsoup
Posts: 34
Joined: 30 Sep 2019

Re: My6502 - A 74-Series 6502

Post by vfxsoup »

Hello everyone! Hope you're all doing OK! It's been a while. I'm afraid I turned to the dark-side over summer, getting into audio, designing and building power amplifiers (two built - a class-D 10W stereo amp, and a class-AB 30W dual-mono amp, along with their power supplies). It took me away from the 6502 project, but I'm seeing that as a good thing since when I return to it (and I will return soon!) I'll be able to look at it with fresh eyes.

Until then...

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

Re: My6502 - A 74-Series 6502

Post by floobydust »

vfxsoup wrote:
Hello everyone! Hope you're all doing OK! It's been a while. I'm afraid I turned to the dark-side over summer, getting into audio, designing and building power amplifiers (two built - a class-D 10W stereo amp, and a class-AB 30W dual-mono amp, along with their power supplies). It took me away from the 6502 project, but I'm seeing that as a good thing since when I return to it (and I will return soon!) I'll be able to look at it with fresh eyes.

Until then...

Christian
All good... life has many distractions! Ive been doing audio projects for over 50 years, but I still gravitate to vinyl records or 15ips tape for source, all vacuum-tube equipment I design and build myself and electrostatic loudspeakers (Quads)... and lately, some single-driver full-range enclosures with Class-A single-ended triode amps. Great fun and the results can last for decades! Enjoy the diversion!
Post Reply