Building a simple 6502 microcomputer

Let's talk about anything related to the 6502 microprocessor.
alkopop79
Posts: 122
Joined: 19 Sep 2012
Location: England

Re: Building a simple 6502 microcomputer

Post by alkopop79 »

Your website is a gold mine of 6502 goodies!
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: Building a simple 6502 microcomputer

Post by GARTHWILSON »

alkopop79 wrote:
GARTHWILSON wrote:
I am slowly working on getting a basic, whole schematic together to post. (I say "slowly" because I've been back to work for the last three months.) It will have 65c02 µP, 32KB ROM, 16KB RAM (using half a 32KB), a 65c22 VIA, a quad NAND for glue logic, and perhaps a serial EEPROM. There will be a note on how to easily add lots more I/O if desired. I started out just modifying the diagram of the computer in the 2nd-to-last picture at http://wilsonminesco.com/6502primer/addr_decoding.html, removing some confusing things that don't need to be that way for the hobbyist, then went on to change the serial EEPROM from Microwire to I²C to get more capacity since it's basically free to do so at this point although we didn't need much for that particular project in 1994, increase the RAM & ROM size, change the I/O connector(s) to be compatible with Daryl's, then realized it was all too much modifying and I really just needed to start over.

I also want to add a pot-pourri page of circuits to interface to different voltage levels, LEDs, LCDs, keypads, I²C, data converters, strings of shift registers, and other things, possibly with code to run those things as shown.
Looking forward to all these additions!
It's up, at http://wilsonminesco.com/6502primer/potpourri.html. The only thing on that page so far is the whole-computer schematic, but I'll be adding schematics for how to interface various devices to the I/O like SPI and I²C devices, keypads, LCDs, A/D and D/A converters, etc., expanding on my Tips column which I originally did back when our Delphi forum did not allow graphics at all (although I've added some since).
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?
whartung
Posts: 1004
Joined: 13 Dec 2003

Re: Building a simple 6502 microcomputer

Post by whartung »

I notice that the individual chips do not have the decoupling(?) capacitors between power and ground, but there is a single 100 uF cap at the power jumper. Is that there to solve that problem? And the others are not needed?
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: Building a simple 6502 microcomputer

Post by GARTHWILSON »

whartung wrote:
I notice that the individual chips do not have the decoupling(?) capacitors between power and ground, but there is a single 100 uF cap at the power jumper. Is that there to solve that problem? And the others are not needed?
They're shown in the lower-right corner.
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?
User avatar
BigDumbDinosaur
Posts: 9427
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: Building a simple 6502 microcomputer

Post by BigDumbDinosaur »

whartung wrote:
I notice that the individual chips do not have the decoupling(?) capacitors between power and ground, but there is a single 100 uF cap at the power jumper. Is that there to solve that problem? And the others are not needed?

Garth is follow a common drafting practice of aggregating the decoupling caps in one place to reduce drawing clutter. I do the same thing and often add a small table that tells where each cap is located.

If Garth is doing what I think he's doing, the 100 µf cap is there to assist in stabilizing Vcc. Again, I did the same thing on the POC unit, with one cap right by the power connector and another close to the MAX238 TIA-232 transceiver. I also have a 0.1 µf cap across the 100 µf electrolytic at the power connector to assure that any high frequency noise that shows up at that location is properly disposed of (electrolytics are not as good at bypassing high frequencies as ceramic caps). Any electrolytics that you may use for bypassing should be low ESR types.

During construction always place your decoupling caps as close the the chips as you can get them, with the minimum possible lead length between the Vcc leg of the chip and the cap. You want to make the noise path to ground as short and sweet as you can get it. Use MLCCs of the X7R type and with a working voltage that is at least five times Vcc (I use 0.1 µf caps with a 50 volt rating because they are cheap and readily available). Spikes caused by the rapid switching of chips can have an amplitude much higher than you think. Applying excessive voltage to an MLCC will, at best, cause a capacitance derating that may occasionally lead to mystery problems with noise and stability.

On Garth's schematic, he lists the three methods by which a Ø2 clock can be generated. I recommend the use of a half-size (square) can oscillator of the correct frequency, which will reduce the parts count and space consumed. In years past, oscillators were quite a bit more expensive than discrete crystals, but that is no longer the case—oftentimes a crystal costs as much as an oscillator. Can oscillators generate a strong and generally symmetric TTL clock signal with good fanout and stability. You can get even more fanout and symmetry by feeding the oscillator output into a D flop and use the flop's Q output to produce the actual Ø2 clock (which will be one-half the oscillator frequency). However, on a basic circuit use of the flop is overkill.

One other caveat if you decide to build Garth's circuit (which, I might add, should work very well and give you a fun gadget to play with). WDC's version of the 65C22 has a totem-pole IRQ output, which means it actively drives in both directions. If you later add another device that is also to be tied to /IRQ, odds are it will have an open drain IRQ output meant for use in a wired-OR circuit. Wired-OR is not directly compatible with the 'C22's totem-pole output, requiring that you isolate the 'C22 from the wired-OR /IRQ line with a Schottky diode (not a standard diode like a 1N4152 or 1N4001), with the diode's cathode connected to the 'C22. Omitting the diode will result in the other device attempting to sink the 'C22's IRQ output, which will cause the /IRQ circuit to malfunction, and possible result in device damage. A wired-OR circuit must be pulled up to Vcc with a resistor—3.3K is customary for that purpose. Use either a carbon film or metal film resistor, not a carbon comp. Also, keep /IRQ as short as you can to avoid too much stray capacitance.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
Zetmor
Posts: 10
Joined: 26 Aug 2012
Location: France

Re: Building a simple 6502 microcomputer

Post by Zetmor »

I have 3 procs actually (from '84 Apple //e + '88 //e Platinum + a '86 //e Enhanced motherboard).

One is on a '86 Apple //e Enhanced motherboard: the chip is marked "Rockwell 6503 Mexico".
And I'm just discovering there have been a 6503 variation. ;)
(I suppose it's a 65C02 variation since I found that on a //e Enhanced motherboard)

This leads me to a question: are those variation pins & electrically compatible?
I mean, on my '88 //e Platinum, can I swap the cpu with an old NMOS 6502 (from a '82 Apple ][)?
(for some games that might use undocumented instructions, or just for testing)
alkopop79
Posts: 122
Joined: 19 Sep 2012
Location: England

Re: Building a simple 6502 microcomputer

Post by alkopop79 »

Just got the Maxim 232 IC marked as "232N". Is that the right one? I'm planning to build Grant's UK101:

http://searle.hostei.com/grant/uk101/uk101.html
User avatar
BigDumbDinosaur
Posts: 9427
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: Building a simple 6502 microcomputer

Post by BigDumbDinosaur »

alkopop79 wrote:
Just got the Maxim 232 IC marked as "232N". Is that the right one? I'm planning to build Grant's UK101:

http://searle.hostei.com/grant/uk101/uk101.html

It sounds right. Can you list the full part number, including suffix?

Also, in Grant's circuit, he shows 74LS logic. Better if you use CMOS logic, e.g., 74AC or 74HC. I know I sound like a stuck record saying this, but you should avoid old silicon designs. The CMOS is better in all respects, especially the 74AC.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
alkopop79
Posts: 122
Joined: 19 Sep 2012
Location: England

Re: Building a simple 6502 microcomputer

Post by alkopop79 »

I already bought LS ones and running out of money so I will give them a try. Thank for the advice though, I will swap them for CMOS ones! The packaging of the serial IC has a TI logo and it's written "18A0KKK E4 MAX232N".
User avatar
Dajgoro
Posts: 808
Joined: 08 Aug 2011
Location: Croatia
Contact:

Re: Building a simple 6502 microcomputer

Post by Dajgoro »

I used LS, i was lucky to find them whatsoever, since the electronic store is turning to consumer electronics... I remember when i switched from 4000cmos glue logic to 74ls glue logic i had an issue somewhere with some voltage level being incompatible, because i had one 74hc ic if i remember correctly, but it didn't take me long to fix it. LS should work fine for start.
User avatar
BigDumbDinosaur
Posts: 9427
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: Building a simple 6502 microcomputer

Post by BigDumbDinosaur »

alkopop79 wrote:
The packaging of the serial IC has a TI logo and it's written "18A0KKK E4 MAX232N".

Can't say for certain if what you have is actually a MAX232. AFAIK, Maxim did not license second sources for the MAX232 family.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: Building a simple 6502 microcomputer

Post by GARTHWILSON »

I ordered MAX232's once and was given Sipex SP232's which are aparently a pin-compatible knockoff. I never went through with the project they were for, so I still haven't used them. The only line drivers and receivers I've used are the 1488, 1489, and MC145406. These need the ± power supply voltages, but are less expensive and don't require the charge-pump capacitors, meaning you get better board density.
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?
John West
Posts: 383
Joined: 03 Sep 2002

Re: Building a simple 6502 microcomputer

Post by John West »

alkopop79 wrote:
The packaging of the serial IC has a TI logo and it's written "18A0KKK E4 MAX232N".
TI do make MAX232s, and have since at least 1989: http://www.ti.com/product/max232. The 'N' just means it's in a DIP package.
alkopop79
Posts: 122
Joined: 19 Sep 2012
Location: England

Re: Building a simple 6502 microcomputer

Post by alkopop79 »

Thanks!
alkopop79
Posts: 122
Joined: 19 Sep 2012
Location: England

Re: Building a simple 6502 microcomputer

Post by alkopop79 »

I started assembling my SBC. Only trouble is that the kynar wires often break while wrapping them around the posts. I've been trying to wrap very slowly but even then it happens occasionally. What am I doing wrong?
Post Reply