A small step further is to support in-circuit programming of an EEPROM using the Arduino, which if given control of the 65C02 BE bus enable line, can take the CPU off the bus during the programming operation. I have this working, but haven't used it much since I currently find it more convenient during code development to upload directly into RAM from a PC using a USB to "TTL" converter, with fixed loader software in EEPROM.
[WORKING] Simple 6502 SBC from scratch (Deck65)
Re: Attempting to build a simple 6502 SBC from scratch
and3rson wrote:
Your suggestion of using one of those boards for clock actually gave me an idea to use Nano as a simulator for DIP-28 ROM! I think there *should* be enough pins (12 addr + 8 data + /CE & /RD interrupts) for the task. Also, I'm not sure if 16MHz will be enough for this, I'll see if I manage to write a code that will take less than 8 CPU cycles of Nano to read the data (and I have serious doubts about this). As a last resort, I can just underclock my W65C02S so that Nano has more time to assert the data line.
A small step further is to support in-circuit programming of an EEPROM using the Arduino, which if given control of the 65C02 BE bus enable line, can take the CPU off the bus during the programming operation. I have this working, but haven't used it much since I currently find it more convenient during code development to upload directly into RAM from a PC using a USB to "TTL" converter, with fixed loader software in EEPROM.
- BigDumbDinosaur
- Posts: 9428
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Attempting to build a simple 6502 SBC from scratch
and3rson wrote:
Michael wrote:
You could also use an Uno or a Nano as a temporary clock source...
Be careful with these “roll your own†clock solutions. WDC specifies that the rise/fall time of the clock input not be greater than 5ns, and in a five volt system, the signal amplitude must swing between near-ground (0.4 volts) and VCC × 0.7 (3.5 volts). Said requirements eliminates a number of logic families from clock-generation duties, as well as some MCUs, whose output rise/fall times are too slow.
Quote:
EDIT: Note to future self - "never put EPROMs in the middle of the board with too many jumpers around, you'll need to remove it pretty often..."
Using a ZIF socket will ease the pain. Your idea of using an MCU to emulate a ROM is inserting unnecessary complexity into a circuit that is completely untested. Should your unit be DOA, you’ll have two separate troubleshooting paths to investigate.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: Attempting to build a simple 6502 SBC from scratch
Man, breadboards get nasty real fast. I think I'll stick to my trusty ol' soldering station and a roll of wrapping wire. And it looks way cleaner!
I'm going to put all buses at the bottom side, and use top side only for power rails & glue logic wiring.
Also reserving some space for EEPROM (rightmost socket), SID (bottom-right), & VIA (bottom). I'll mount 2004 LCD separately, probably in a daughterboard fashion. But I really want to keep all chips exposed, it's so satisfying to simply be able to observe them.
I'm also planning to add a bunch of dual 7-segment indicators with GAL-based hexadecimal decoders to be able to observe what's going on at the data & address lines.
I'm going to put all buses at the bottom side, and use top side only for power rails & glue logic wiring.
Also reserving some space for EEPROM (rightmost socket), SID (bottom-right), & VIA (bottom). I'll mount 2004 LCD separately, probably in a daughterboard fashion. But I really want to keep all chips exposed, it's so satisfying to simply be able to observe them.
I'm also planning to add a bunch of dual 7-segment indicators with GAL-based hexadecimal decoders to be able to observe what's going on at the data & address lines.
Last edited by and3rson on Wed Feb 22, 2023 7:47 pm, edited 1 time in total.
/Andrew
deck65 - 6502 slab with screen and keyboard | ПК-88 - SBC based on KM1810VM88 (Ukrainian i8088 clone) | leo80 - simple Z80 SBC
nice65 - 6502 assembly linter | My parts, footprints & 3D models for KiCad/FreeCAD
deck65 - 6502 slab with screen and keyboard | ПК-88 - SBC based on KM1810VM88 (Ukrainian i8088 clone) | leo80 - simple Z80 SBC
nice65 - 6502 assembly linter | My parts, footprints & 3D models for KiCad/FreeCAD
- BigDumbDinosaur
- Posts: 9428
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Attempting to build a simple 6502 SBC from scratch
and3rson wrote:
I'm going to put all buses at the bottom side, and use top side only for power rails & glue logic wiring.
What about the bypass capacitors?
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: Attempting to build a simple 6502 SBC from scratch
BigDumbDinosaur wrote:
and3rson wrote:
I'm going to put all buses at the bottom side, and use top side only for power rails & glue logic wiring.
What about the bypass capacitors?
/Andrew
deck65 - 6502 slab with screen and keyboard | ПК-88 - SBC based on KM1810VM88 (Ukrainian i8088 clone) | leo80 - simple Z80 SBC
nice65 - 6502 assembly linter | My parts, footprints & 3D models for KiCad/FreeCAD
deck65 - 6502 slab with screen and keyboard | ПК-88 - SBC based on KM1810VM88 (Ukrainian i8088 clone) | leo80 - simple Z80 SBC
nice65 - 6502 assembly linter | My parts, footprints & 3D models for KiCad/FreeCAD
- BigDumbDinosaur
- Posts: 9428
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Attempting to build a simple 6502 SBC from scratch
and3rson wrote:
BigDumbDinosaur wrote:
and3rson wrote:
I'm going to put all buses at the bottom side, and use top side only for power rails & glue logic wiring.
What about the bypass capacitors?
Dual-wipe DIP sockets are significantly cheaper than the machine-tooled ones you have on your board. In prototyping, there is no advantage to using machine-tooled parts, and in production, sockets are usually avoided where possible for reliability and cost reasons. You’ll find it easier to insert chips into dual-wipe sockets than into machine-tooled ones—pin alignment won’t be as critical.
In the future, you should consider the use of a half-can oscillator, which is functionally a DIP-8 package, but with four pins. Size-wise, it’s about 60 percent the size of a full-can unit of the type you have on your board. Sockets made specifically for half-can oscillators are readily available.
There are more-compact ZIF sockets that are available. Here’s the one I use.
x86? We ain't got no x86. We don't NEED no stinking x86!
- floobydust
- Posts: 1394
- Joined: 05 Mar 2013
Re: Attempting to build a simple 6502 SBC from scratch
In addition to BDD's construction notes...
the ZIF socket for the EEPROM. I generally use a machine-tooled socket on the board and plug the ZIF socket into it. You get the benefit of easy chip removal/insertion during development and can reuse the ZIF socket on later projects.
the ZIF socket for the EEPROM. I generally use a machine-tooled socket on the board and plug the ZIF socket into it. You get the benefit of easy chip removal/insertion during development and can reuse the ZIF socket on later projects.
Regards, KM
https://github.com/floobydust
https://github.com/floobydust
Re: Attempting to build a simple 6502 SBC from scratch
As a practical leg-defensive approach: I use a chunky zip socket on the programmer, but a standard socket on the board (apart from anything else, for space reasons). But I keep a sacrificial socket on the eeprom; neither the programmer nor the board socket object and it means the eeprom pins don't get accidentally bent with all the insertion and removal.
Neil
Neil
Re: Attempting to build a simple 6502 SBC from scratch
Using machine-tooled sockets with a ZIF socket is actually a cool idea, I didn't think about it. It will definitely reduce the footprint on the board also make it easier to squeeze extra caps/wires underneath. I'll try it!
In the meantime, I've updated my schematic to pass all ERC checks and came up with a version that I'll attempt to make a PCB of.
My 4x W65C02S have been shipped now, so I'll have them really soon - I hope! I've decided to include 2004 LCD & 6522 VIA in my "beta" PCB prototype, and I'll still use my perfboard for testing the basics - 6502+RAM+ROM.
In the meantime, I've updated my schematic to pass all ERC checks and came up with a version that I'll attempt to make a PCB of.
My 4x W65C02S have been shipped now, so I'll have them really soon - I hope! I've decided to include 2004 LCD & 6522 VIA in my "beta" PCB prototype, and I'll still use my perfboard for testing the basics - 6502+RAM+ROM.
Last edited by and3rson on Thu Feb 23, 2023 8:37 pm, edited 1 time in total.
/Andrew
deck65 - 6502 slab with screen and keyboard | ПК-88 - SBC based on KM1810VM88 (Ukrainian i8088 clone) | leo80 - simple Z80 SBC
nice65 - 6502 assembly linter | My parts, footprints & 3D models for KiCad/FreeCAD
deck65 - 6502 slab with screen and keyboard | ПК-88 - SBC based on KM1810VM88 (Ukrainian i8088 clone) | leo80 - simple Z80 SBC
nice65 - 6502 assembly linter | My parts, footprints & 3D models for KiCad/FreeCAD
-
daniMolina
- Posts: 214
- Joined: 25 Jan 2019
- Location: Madrid, Spain
Re: Attempting to build a simple 6502 SBC from scratch
Just once thing I once fell for. The most standard LCD text displays (All based on the Hitachi HD44780) have an active high Enable line. They are also quite slow, they will probably struggle at 1Mhz. In my SBC (viewtopic.php?f=4&t=5907), I bitbang the LCD interface with a VIA so I can run the CPU as fast as I need to.
- BigDumbDinosaur
- Posts: 9428
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Attempting to build a simple 6502 SBC from scratch
and3rson wrote:
In the meantime, I've updated my schematic to pass all ERC checks and came up with a version that I'll attempt to make a PCB of.
Looks as though it ought to work.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: Attempting to build a simple 6502 SBC from scratch
So I spent a ridiculous amount of time trying to route the PCB manually, and I eventually gave up and used DipTrace to auto-route things for me, because what the hell, it's just a prototype. (I think this project will actually never leave "prototype" stage, haha).
Also I've managed to squeeze everything within 10*10 cm footprint! That will save me some bucks.
My friend offered me some help with some improvements (including teardrops & copper pours), so that's what we'll try to do before printing.
Anyway, I know auto-routing is not perfect, there might be crosstalk and stuff, but I think it *should* work for my 1MHz device. I'll still be making another one with SID, EEPROM, & ACIA some time in the future - but for now, I just can't wait to order my bare-minimum first PCB ever!
Also I've managed to squeeze everything within 10*10 cm footprint! That will save me some bucks.
My friend offered me some help with some improvements (including teardrops & copper pours), so that's what we'll try to do before printing.
Anyway, I know auto-routing is not perfect, there might be crosstalk and stuff, but I think it *should* work for my 1MHz device. I'll still be making another one with SID, EEPROM, & ACIA some time in the future - but for now, I just can't wait to order my bare-minimum first PCB ever!
Last edited by and3rson on Sat Feb 25, 2023 12:18 am, edited 2 times in total.
/Andrew
deck65 - 6502 slab with screen and keyboard | ПК-88 - SBC based on KM1810VM88 (Ukrainian i8088 clone) | leo80 - simple Z80 SBC
nice65 - 6502 assembly linter | My parts, footprints & 3D models for KiCad/FreeCAD
deck65 - 6502 slab with screen and keyboard | ПК-88 - SBC based on KM1810VM88 (Ukrainian i8088 clone) | leo80 - simple Z80 SBC
nice65 - 6502 assembly linter | My parts, footprints & 3D models for KiCad/FreeCAD
Re: Attempting to build a simple 6502 SBC from scratch
Looks like a good result to me. Each year that passes, I'd imagine autorouters get just a little bit better.
- GARTHWILSON
- Forum Moderator
- Posts: 8775
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: Attempting to build a simple 6502 SBC from scratch
and3rson wrote:
My friend offered me some help with some improvements (including teardrops & copper pours), so that's what we'll try to do before printing.
Anyway, I know auto-routing is not perfect, there might be crosstalk and stuff, but I think it *should* work for my 1MHz device. [...]
Anyway, I know auto-routing is not perfect, there might be crosstalk and stuff, but I think it *should* work for my 1MHz device. [...]
In your case, I wouldn't worry about it. I think you'll do just fine as-is. For one thing, your board is kind of small for the edge rates involved. I would do a ton of manual clean-up, but that's partly just me being kind of OCD about this stuff. Do provide the shortest path you can between the ground pin of each IC and those around it, and of course to your bypass capacitors, and pay special attention to the Φ2 clock distribution, and you won't have any trouble.
Good luck. We'll look forward to a happy report of a working board.
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?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
Re: Attempting to build a simple 6502 SBC from scratch
and3rson wrote:
So I spent a ridiculous amount of time trying to route the PCB manually, and I eventually gave up and used DipTrace to auto-route things for me
I notice the headers attaching to VIA Port A and Port B are only 10 pins each. I'd suggest 14 or even 16 pins each so you can connect a ribbon cable to an external device and supply the device with power, ground and perhaps even an extra signal or two.
I guess you're anxious to proceed. But if you decide to do another pass on the design, you could save some space by using a smaller oscillator, if available. Alternatively, the oscillator could be relocated. Right now the width of the board (from west to east) is consumed by...
- oscillator, CPU, RAM, ROM, VIA. Instead, you could try...
- ROM, RAM, CPU, VIA
Whether you do or don't reorient the chips, I would still consider moving the oscillator. With the extra width that's freed up, maybe those two headers for Port A and Port B could snuggle up broadside right next to the VIA instead of being pushed off the end. Just an idea... Good luck with the project, and have fun!
ps- and as Garth says, you needn't bother with the pour -- it is not a ground plane.
-- Jeff
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
https://laughtonelectronics.com/Arcana/ ... mmary.html