shopping list
- allisonlastname
- Posts: 88
- Joined: 06 Mar 2023
- Location: UK
- Contact:
shopping list
I'm following the "very basic whole-computer schematic" from the 6502 primer, but other than what's on there, is there anything you lot recommend buying (useful logic ICs, tools, etc)?
I'm planning to build it on a breadboard to save having to design a PCB or learn wire wrap (yes, I know there are issues with breadboards but my dad built a 6502 computer on breadboards and it works fine). One thing I was wondering about is putting LEDs on the buses. Do I need latches or something for that?
I'm planning to build it on a breadboard to save having to design a PCB or learn wire wrap (yes, I know there are issues with breadboards but my dad built a 6502 computer on breadboards and it works fine). One thing I was wondering about is putting LEDs on the buses. Do I need latches or something for that?
probably the youngest person on this forum
- floobydust
- Posts: 1394
- Joined: 05 Mar 2013
Re: shopping list
Okay, so what tools, if any, do you currently have?
In general, you should have a multimeter at the very least. Also, a way to program the EPROM or EEPROM. Beyond that, things get more expensive.... a logic analyzer is nice, as is an oscilloscope.
LEDS, how do you plan on hooking them up? You can connect them to the 6522 port lines, but you'll need some resistors so you don't overdrive them.
Other bits to think about... once you get some success with the basic setup, then what? More I/O is typical... perhaps a UART and USB-to-Serial adapter so you can setup a terminal program on a PC and interact directly with the system.
Whatever you do, have fun with it.
In general, you should have a multimeter at the very least. Also, a way to program the EPROM or EEPROM. Beyond that, things get more expensive.... a logic analyzer is nice, as is an oscilloscope.
LEDS, how do you plan on hooking them up? You can connect them to the 6522 port lines, but you'll need some resistors so you don't overdrive them.
Other bits to think about... once you get some success with the basic setup, then what? More I/O is typical... perhaps a UART and USB-to-Serial adapter so you can setup a terminal program on a PC and interact directly with the system.
Whatever you do, have fun with it.
Regards, KM
https://github.com/floobydust
https://github.com/floobydust
Re: shopping list
allisonlastname wrote:
I'm following the "very basic whole-computer schematic" from the 6502 primer, but other than what's on there, is there anything you lot recommend buying (useful logic ICs, tools, etc)?
I'm planning to build it on a breadboard to save having to design a PCB or learn wire wrap (yes, I know there are issues with breadboards but my dad built a 6502 computer on breadboards and it works fine). One thing I was wondering about is putting LEDs on the buses. Do I need latches or something for that?
I'm planning to build it on a breadboard to save having to design a PCB or learn wire wrap (yes, I know there are issues with breadboards but my dad built a 6502 computer on breadboards and it works fine). One thing I was wondering about is putting LEDs on the buses. Do I need latches or something for that?
If you want to be able to control an LED then yes, you'll need a latch of some sort. I started with a 74als573 for 8 output bits. A 65C22 VIA is more flexible but also bigger (physically) and needs a bit more care & time to get going (but not much).
Have fun,
-Gordon
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
Re: shopping list
Machine pin sockets for all of your ICs. If you're experimenting / troubleshooting you'll be putting things in and pulling them back out pretty frequently (especially your ROM). All those insertion cycles can be pretty hard on your chips' poor little legs. You might even want to go as far as getting a breadboard-compatible (caution: not all of them are!) ZIF socket for the ROM.
"The key is not to let the hardware sense any fear." - Radical Brad
- allisonlastname
- Posts: 88
- Joined: 06 Mar 2023
- Location: UK
- Contact:
Re: shopping list
floobydust wrote:
Okay, so what tools, if any, do you currently have?
As for programming ROMs, I have an arduino and a raspberry pi. Googling for "arduino eeprom programmer" turns up a lot of results, so I think we're fine there.
floobydust wrote:
LEDS, how do you plan on hooking them up? You can connect them to the 6522 port lines, but you'll need some resistors so you don't overdrive them.
drogon wrote:
If you want to be able to control an LED then yes, you'll need a latch of some sort. I started with a 74als573 for 8 output bits. A 65C22 VIA is more flexible but also bigger (physically) and needs a bit more care & time to get going (but not much).
floobydust wrote:
Other bits to think about... once you get some success with the basic setup, then what? More I/O is typical... perhaps a UART and USB-to-Serial adapter so you can setup a terminal program on a PC and interact directly with the system.
I'll get some sockets for the ROM, if I can get some ROM. Having had a quick peruse of Mouser, they appear to be completely out of 28c256 AND 28c64 ICs. Is there an alternative that still works with 6502?
probably the youngest person on this forum
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: shopping list
allisonlastname wrote:
I'm following the "very basic whole-computer schematic" from the 6502 primer, but other than what's on there, is there anything you lot recommend buying (useful logic ICs, tools, etc)?
Quote:
I'm planning to build it on a breadboard to save having to design a PCB or learn wire wrap (yes, I know there are issues with breadboards but my dad built a 6502 computer on breadboards and it works fine).
Be careful. That just means the failure rate is not 100%. That's not very useful information. It can be done of course, and has been many times, but we want to maximize your chance of success; so the first bullet point near the top of the 6502 primer page on AC construction has guidelines to help with that, if you really must use a solderless breadboard.
Quote:
One thing I was wondering about is putting LEDs on the buses. Do I need latches or something for that?
Unless you single-cycle it, they will change much too fast to see anything. If you really want them though, I recommend minimizing the bus loading by holding the LED current down to 1mA or so (which still gives decent brightness with modern LEDs); so (5V-1.7V)/1mA=3.3KΩ. The 1.7V is the approximate voltage drop across a red LED with this amount of current. The voltage drop will increase a little as you go from red to yellow to green to blue.
It might be more useful to put the LEDs on the I/O port pins; but then remember that they will present a load on port bits that are set as inputs too, not just outputs.
On the socket recommendation: The machine-pinned ones with several little fingers inside each hole are normally the most reliable; however I've found from experience that that benefit is lost if you remove and re-insert the IC lots of times for external programming. 33 years ago I did this and the sockets got quite loose and had to be replaced. My recommendation now, if you can't use a ZIF socket for that, is to use just use sockets with double-wipe contacts, which I think probably most sockets are today, meaning the contacts press against both sides of the IC pin, instead of just one side.
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?
- BigDumbDinosaur
- Posts: 9426
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: shopping list
Using a breadboard to prototype a computer circuit is always a crapshoot. In such an application, a breadboard tends to be like a politician, which means you are likely to be disappointed.
As for your parts list, where is your schematic? As I said to another person who is apparently about to get a comeuppance with his project (for the following reason), you are looking at rivets, but have yet to design the airplane. I highly recommend you develop a schematic based upon a realistic system, using Garth’s primer as a guide, and post it here so we can examine it and perhaps identify anything that might be a showstopper.
Garth’s suggestion that you use 74HC logic is one that I second. 74HC is more forgiving of dodgy construction methods than some other logic families, and will be fine at speeds up to at least 8 MHz. Definitely do not use any of the TTL families, e.g., 74LS, 74F, etc. Also, avoid 74AC for now, as that family has very aggressive outputs that may give a first-time builder (you) considerable grief.
Waste of time and LEDs, in my opinion. As Garth notes, you won’t see anything useful as the machine runs, unless you have Superman’s vision.
As for your parts list, where is your schematic? As I said to another person who is apparently about to get a comeuppance with his project (for the following reason), you are looking at rivets, but have yet to design the airplane. I highly recommend you develop a schematic based upon a realistic system, using Garth’s primer as a guide, and post it here so we can examine it and perhaps identify anything that might be a showstopper.
Garth’s suggestion that you use 74HC logic is one that I second. 74HC is more forgiving of dodgy construction methods than some other logic families, and will be fine at speeds up to at least 8 MHz. Definitely do not use any of the TTL families, e.g., 74LS, 74F, etc. Also, avoid 74AC for now, as that family has very aggressive outputs that may give a first-time builder (you) considerable grief.
Quote:
One thing I was wondering about is putting LEDs on the buses. Do I need latches or something for that?
Waste of time and LEDs, in my opinion. As Garth notes, you won’t see anything useful as the machine runs, unless you have Superman’s vision.
x86? We ain't got no x86. We don't NEED no stinking x86!
- BigDumbDinosaur
- Posts: 9426
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: shopping list
GARTHWILSON wrote:
On the socket recommendation: The machine-pinned ones with several little fingers inside each hole are normally the most reliable; however I've found from experience that that benefit is lost if you remove and re-insert the IC lots of times for external programming. 33 years ago I did this and the sockets got quite loose and had to be replaced. My recommendation now, if you can't use a ZIF socket for that, is to use just use sockets with double-wipe contacts, which I think probably most sockets are today, meaning the contacts press against both sides of the IC pin, instead of just one side.
What Garth says.
Although sockets are to be avoided for a number of reasons, gold-flashed, machined-pin types are best used in applications in which parts must be removable, but are seldom removed. Double-wipes are more reliable when frequent removal is required. For a ROM, which may see frequent removal for re-programming, I recommend use of a quality ZIF socket for convenience (during the early days of my POC development, I was constantly monkeying with the firmware). See attached for a ZIF socket that I use.
x86? We ain't got no x86. We don't NEED no stinking x86!
- allisonlastname
- Posts: 88
- Joined: 06 Mar 2023
- Location: UK
- Contact:
Re: shopping list
Ok, I have a partial schematic (see attached PDF). I haven't done the clock generation, reset button, or interrupts yet but I'll hopefully get those done soon.
I feel like the address decoding could be done a lot cleaner but I'm not sure how. I'm aiming to have RAM from 0000 to 7fff, IO from 8000 to bfff, and ROM from c000 to ffff.
I feel like the address decoding could be done a lot cleaner but I'm not sure how. I'm aiming to have RAM from 0000 to 7fff, IO from 8000 to bfff, and ROM from c000 to ffff.
- Attachments
-
- decode_r1.pdf
- (194.16 KiB) Downloaded 216 times
probably the youngest person on this forum
Re: shopping list
allisonlastname wrote:
drogon wrote:
If you want to be able to control an LED then yes, you'll need a latch of some sort. I started with a 74als573 for 8 output bits. A 65C22 VIA is more flexible but also bigger (physically) and needs a bit more care & time to get going (but not much).
However, you can boot a 6502 directly into C with a small hand-written "crt0.s" file using e.g. cc65 (I've done it as a proof of concept), you will need to patch the ROM with the reset vector.
But looks like good progress so-far.
I'd suggest is a slightly different memory map - 32KB RAM then 32KB ROM (with a small hole for IO) then you'll be able to run e.g. BBC Basic natively on it - but it's also easy for me to suggest that as that's what I did in my systems... However the 16KB from $C000 up is more than enough for e.g. EhBASIC and a small 'monitor'.
If you have a PiTubeDirect interface (ie. a big level shifter) then you can hook the VIA up to a Pi and use an 8-bit parallel transfer mode to use the Pi as a terminal - or bit-bang serial through the VIA. Or have a look at how the "slow bus" works on the BBC Micro - it's like an 8-bit interface driven through a VIA.
Cheers,
-Gordon
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
- allisonlastname
- Posts: 88
- Joined: 06 Mar 2023
- Location: UK
- Contact:
Re: shopping list
drogon wrote:
I'd suggest is a slightly different memory map - 32KB RAM then 32KB ROM (with a small hole for IO)
drogon wrote:
If you have a PiTubeDirect interface (ie. a big level shifter) then you can hook the VIA up to a Pi and use an 8-bit parallel transfer mode to use the Pi as a terminal
probably the youngest person on this forum
Re: shopping list
allisonlastname wrote:
drogon wrote:
I'd suggest is a slightly different memory map - 32KB RAM then 32KB ROM (with a small hole for IO)
The zero page thing was supposedly to save code (ZP addressing needing 2 bytes not 3) and make accesses go a cycle faster. Personally I think it's bogus today but in 1976 when speeds were low and memory expensive, then it might have been a thing.
drogon wrote:
If you have a PiTubeDirect interface (ie. a big level shifter) then you can hook the VIA up to a Pi and use an 8-bit parallel transfer mode to use the Pi as a terminal
allisonlastname wrote:
Arduino runs at 5v, so no need for a level shifter there.
-Gordon
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
- floobydust
- Posts: 1394
- Joined: 05 Mar 2013
Re: shopping list
I also agree with Gordon on a smaller I/O window. For years, I've used a single memory page (256 bytes) for an I/O page. I've always located mine at $FE00. I don't recommend putting I/O in page zero.
I designed a small CPU board back in the 80's that use 3 logic chips:
- 7400
- 7430
- 74138
Using the above, you can have a memory map as:
RAM - $0000 - $7FFF
ROM - $8000 - $FDFF / $FE00 - $FFFF
I/O - $FE00 - $FEFF
- I/O is broken into 8- I/O selects, each at either 16- or 32-bytes wide.
Also, the write line for memory is qualified using phase 2 CPU clock, which is required.
I've attached a section of a schematic for this, albeit the I/O selects are done at 16-bytes wide, so only half of the I/O page is used.
Note that in the setup, the chip select for the 32KB RAM is tied directly to A15 from the CPU, which eliminates decoding it separately. You can also use a jumper for the write line on the 28C256, as these devices can be programmed insitu if needed.
You can also find the entire system with an I/O adapter on my github page.
I designed a small CPU board back in the 80's that use 3 logic chips:
- 7400
- 7430
- 74138
Using the above, you can have a memory map as:
RAM - $0000 - $7FFF
ROM - $8000 - $FDFF / $FE00 - $FFFF
I/O - $FE00 - $FEFF
- I/O is broken into 8- I/O selects, each at either 16- or 32-bytes wide.
Also, the write line for memory is qualified using phase 2 CPU clock, which is required.
I've attached a section of a schematic for this, albeit the I/O selects are done at 16-bytes wide, so only half of the I/O page is used.
Note that in the setup, the chip select for the 32KB RAM is tied directly to A15 from the CPU, which eliminates decoding it separately. You can also use a jumper for the write line on the 28C256, as these devices can be programmed insitu if needed.
You can also find the entire system with an I/O adapter on my github page.
Regards, KM
https://github.com/floobydust
https://github.com/floobydust
Re: shopping list
To be clear, the IC goes into the socket and never (or rarely) comes back out of it. It is the socket that is inserted / removed from the breadboard. The round legs on machine pin sockets are MUCH more durable for this use than the legs of dual-wipe sockets.
"The key is not to let the hardware sense any fear." - Radical Brad
Re: shopping list
allisonlastname wrote:
And would it be worth putting IO in zero page? One of the original 6502 manuals actually mentions doing it like that.
It's true as Gordon says that speeds are higher nowadays, and it's also worth mentioning that many typical applications are compute bound rather than IO bound, which means a substantial boost in IO speed will probably yield no appreciable gain. [see addendum]
So, the question becomes this: What sort of work will you be doing, and what priorities are important to you? IO in zero page does undeniably provide a substantial boost in IO speed... even if your speed was already pretty fast to begin with.
There's more on the subject here. My own 65xx machines all have IO in zero page because bit twiddling is an important focus for me. There are pros and cons but my own priorities are such that I have never regretted the decision for an instant.
ETA: bit-bang serial IO is the sort of code that can really benefit. And if you're shooting for a certain specific speed goal (say, blab-blah kilobaud on your RS232) then IO in zero page can make the difference between possible and impossible. Note that this applies even if the associated application is something compute bound like a BASIC interpreter.
-- 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