6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Nov 22, 2024 4:15 am

All times are UTC




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Help Me Buy & Build
PostPosted: Thu Aug 12, 2010 9:49 pm 
Offline

Joined: Thu Aug 12, 2010 9:17 pm
Posts: 4
So, I am very interested in the idea of building a simple 8 or 16 bit microcomputer from parts and using it as a toy and/or controller. Simply reading about this has already taught me a lot about the inner workings of computers that I have always sort of wondered about. I have decided to begin designing a computer in my spare time, and then assemble it once my current project (a small CNC Mill for PCBs) is complete. However, I have a few questions that are still unanswered:

1) 6502 or 8088?
Both are very simple, very cheap, and very popular. Both have 8 bit external buses. The 8088 is 16 bit with 20 bit addresses, while the 6502 is 8 bit with 16 bit addresses. The 8088 can run DOS, yet the 6502 seems to be more commonly used. Is there any reason I should not use the 8088?

2) Memory (8088)
Browsing around, I think I have a good configuration for memory addressing on the 8088. I would have a 74LS138 3-8 decoder, which should divide the 1 MB address space into 8 128 KB sections. Then, 4 of these would be 128x8 SRAM chips, and 1 would be a 128x8 EEPROM Chip. The remaining 3 sections would be 2 6522 VIAs and a 6551 ACIA. If I go with the 8088, would this configuration work?

3) Graphics
I've found next to no information on this. Links, anyone?

Thanks in advance.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 12, 2010 10:02 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
There are others here who know far more about the 8088 than I, but I will comment anyway that you'll find the 6502 to outperform the 8088, have a simpler bus, and it's even in current production. You can make a board that will take either the 6502 or 65816 with jumper selection, so you can go to the '816 when you're ready. The '816 has an 8-bit bus, 16-bit registers, and a 24-bit address bus; but still offers a a big step up in capabilities and performance even if you don't use the high 8 bits of the address bus. For many things, the '816 is actually easier to program. Jameco's parts, BTW, are very old and slow, which is fine to start, but later you will probably want the 20MHz current production from Western Design Center. Make sure you at least get the CMOS 6502 (65c02) because it fixes all the bugs and quirks that were in the original NMOS 6502 and has more instructions and addressing modes and other enhancements besides just taking less power.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 12, 2010 10:18 pm 
Offline

Joined: Thu Aug 12, 2010 9:17 pm
Posts: 4
Huh, I haven't heard of the 65816 before now, but it's interesting... Where can I get the schematics for a board like that?

I wasn't planning on buying from Jameco. I get everything from Digikey or Fry's if I can help it. Also, I was planning on getting the 65c02.

One of the things that bothers me about the 6502 is that it has only 16 address pins, so if you used a 2-4 decoder, you would only get 16 KB blocks, or 8 KB blocks for a 3-8 decoder. Because of this, there seems to be unnecessary complications when using larger RAM chips.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 12, 2010 10:31 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
What do you want to do with it? For just the program space, a new user won't put much of a dent in the memory capacity. If you do want lots of data space without going to a 65816, some users are doing banking, where for example an 8KB portion of the map will be a window into a comparatively huge memory space. Some output bits will tell where in that huge space the window gives you access. When that 8KB space is accessed, it enables the larger memory, and the output bits mentioned give the higher address bits for that memory, whether it's 128KB for example on the low side, or, on the high side, say 128MB, or anywhere in between.

Western Design Center's website is www.westerndesigncenter.com . You can download the data sheets and their excellent programming manual there. I'll come back later and add the url of one of the distributors when I find it. Hopefully someone will beat me to it.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 12, 2010 10:44 pm 
Offline

Joined: Thu Aug 12, 2010 9:17 pm
Posts: 4
Thanks for the link!

If I went with the 8088, I would install and old version of DOS and (hopefully, but in all likelihood not) use it to control my CNC Mill, which would require a lot of RAM. If I went with the 6502, I'm not sure what I'd do with it, but it would probably be good for controlling something once I got DOS/65 on it. Basically I'm looking to build just because I can.

The difficulty I described with RAM is best explained by Chris Ward:
Quote:
The A15 line is connected straight to the chip select and output enable pins of the 32k SRAM chip. Hence, if A15 is low (access to bottom 32k of memory) then the RAM is selected. Logic gates are used to activate the RAM's write enable when R/W is low (i.e. write) and the phase 2 clock is high. This assumes that write enable always overrides output enable (check your RAM's data sheet if you want to be sure).

If A15 is high, then the 74LS138 (3-to-8 decoder) is enabled and looks at A12-A14. The eight outputs correspond to 4k blocks of memory in the range $8000-$FFFF.

Outputs 6 and 7 of the '138 ($E000-$FFFF) are combined by an AND gate (made with two NANDS from a 74LS00) to provide the chip select for the EEPROM. This needs some thinking about due to the active-low inputs and outputs, but draw the truth table and it all makes sense. Output enable is provided by inverting the R/W line, and write enable is tied high because we will never write to this device.

Output 5 of the '138 selects the 4k of I/O space at $D000-$DFFF. This activates the 74LS154 (4-to-16 decoder) which looks at A8-A11 to divide the I/O space into sixteen 256-byte segments. Each of the sixteen outputs will act as chip select for a particular I/O device.

If you want to use chips larger than 16 KB, you need to do at least some of the decoding yourself with TTL components. Yikes!

EDIT: I suppose you could use a 3-8 decoder, 4 8 KB SRAM chips, a 8 KB EEEPROM chip, and then the rest for I/O, but that seems like a huge waste of space.

You're slowly convincing me to use a 6502, by the way.

EDIT: I'm eying these schematics: http://www.hytherion.com/beattidp/compu ... iy6502.htm


Top
 Profile  
Reply with quote  
 Post subject: Help Me Buy & Build
PostPosted: Fri Aug 13, 2010 2:02 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8505
Location: Midwestern USA
DylanW wrote:
Huh, I haven't heard of the 65816 before now, but it's interesting... Where can I get the schematics for a board like that?

Here's one place to look. Here's another.

Quote:
I wasn't planning on buying from Jameco. I get everything from Digikey or Fry's if I can help it. Also, I was planning on getting the 65c02.

Mouser is also a good source. Their online ordering is a bit friendlier, I think, than Digi-Key's. Pricewise they're about the same.

Quote:
One of the things that bothers me about the 6502 is that it has only 16 address pins, so if you used a 2-4 decoder, you would only get 16 KB blocks, or 8 KB blocks for a 3-8 decoder. Because of this, there seems to be unnecessary complications when using larger RAM chips.

Well, it is a 16 bit MPU, you know. :)

You should consider using the W65C816S instead. When operating in native mode, it can reach out to 16 MB for data, and code can run anywhere as long as it fits within a contiguous 64K segment. Code can also reach out beyond the 64K limit via instructions such as JSL and JML.

I personally wouldn't use the 8088 for a soldering iron rest, let along a microprocessor. What a lame design! The 65xx family beats it hands down in interrupt performance. The 65xx uses easier-to-implement memory-mapped I/O, and due to its ubiquity, the 65xx family is probably the most documented pile of parts ever made.

Regarding glue logic, you should be using CMOS not TTL, and where possible, 74ABT or 74AC (74F if ABT or AC isn't available). As the 65C02 and 65C916 can be cranked up to as high as 20 MHz (producing a throughput well beyond what the 8088 can generate), you will need all the help you can get in avoiding gate propagation delays.

Speaking of prop delay, the typical 3-of-8 decoder (e.g., 74AC138) has quite a bit of it. I limit use of those to I/O decoding. Depending on what you are doing memory-wise, you may find using basic 74ABT gates to decode memory a better choice. 74ABT logic generally has prop delays in the single nanosecond range.

As for accessing more than 64K of memory with the 65C02, you define a common area that never changes and then gate different chunks of RAM in as required. There have been designs where an EPROM was used to control the memory map (you drive the EPROM's address lines from the data bus, with latches connecting the EPROM's data lines to the hardware being controlled).

Much of the fun in this hobby of concocting 65xx contrivances is figuring out detailss like memory mapping, I/O decoding, and such. Once you get it working, there is a real sense of accomplishment.

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


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Aug 13, 2010 2:04 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8505
Location: Midwestern USA
DylanW wrote:
If you want to use chips larger than 16 KB, you need to do at least some of the decoding yourself with TTL components. Yikes!

Ah, c'mon! :) That's where half the fun is: figuring out which gates to use (not TTL, though).

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


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Aug 13, 2010 2:08 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
What you're talking about can be done with just a single 74xx00 quad NAND. I have a similar arrangement on my workbench computer, with 32Kx8 ROM, 16Kx8 RAM (ie, using half a 32Kx8 SRAM since there are no 16Kx8's), and six I/O ICs with up to four more possible without adding any more glue logic. The circuit sketch is here, and the main page for the computer is here. (The pages there are quite outdated and hopefully Mike will get my updates posted soon.) Yes, there are repeats in the I/O space, but it's never a problem. You just use the lowest address that goes to each I/O IC's range of registers, unless you wanted to write to two chips at once to set them up identically or start timers simultaneously or something like that, which I have never done. I've been using this computer in my work for 18 years, continuing to add improvements now and then. I know the logic is not optimum for getting the fastest possible operation from the RAM, but it works to 7MHz with 55ns RAM and 70ns EPROM. You could re-arrange things just a bit to turn it into 32KB of RAM, 16KB of ROM, and 16KB of I/O space.

Quote:

Douglas Beattie is a really nice guy, sharp, and a very hard worker too. He and I have had contact off and on over the years.


Last edited by GARTHWILSON on Fri Aug 13, 2010 2:24 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Aug 13, 2010 2:15 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
Quote:
The 65xx family beats [the 8088] hands down in interrupt performance.

Ah yes, I forgot about that one. Very few processors can touch the 6502 in interrupt performance which is very important in real-time work. Some of its contemporaries were more than an order of magnitude slower in this regard. With a very simple interrupt-service routine (like just increment a byte in memory), a 20MHz 6502 can realistically handle a million interrupts per second.


Top
 Profile  
Reply with quote  
 Post subject: Re: Help Me Buy & Build
PostPosted: Fri Aug 13, 2010 2:30 am 
Offline

Joined: Mon Mar 02, 2009 7:27 pm
Posts: 3258
Location: NC, USA
BigDumbDinosaur wrote:
...Mouser is also a good source. Their online ordering is a bit friendlier, I think, than Digi-Key's. Pricewise they're about the same....


I've had a problem with Mouser, where I place one order and I get two shipments from two different warehouses, and then get charged 2x shipping. I haven't ordered from them since.

Welcome DylanW, you've come to the right forum if you chose the 6502

_________________
65Org16:https://github.com/ElEctric-EyE/verilog-6502


Top
 Profile  
Reply with quote  
 Post subject: Help Me Buy & Build
PostPosted: Fri Aug 13, 2010 2:37 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8505
Location: Midwestern USA
GARTHWILSON wrote:
Ah yes, I forgot about that one. Very few processors can touch the 6502 in interrupt performance which is very important in real-time work. Some of its contemporaries were more than an order of magnitude slower in this regard.

In my first POC design, I used interrupt-driven EIA-232 processing, mostly just to satisfy myself that I had the right logic. Using a simple loop-back adapter, I ran both EIA-232 ports at 115.2 Kbps CBAT. That worked out to more than 44,000 IRQs per second. Even with the '816 slowed down to one MHz, it barely worked up a sweat with that many interrupts. Most likely, an 8088 would have figuratively gone up in smoke with that loading and would have been dropping chars left and right.

Quote:
With a very simple interrupt-service routine (like just increment a byte in memory), a 20MHz 6502 can realistically handle a million interrupts per second.

Even I can't type that fast. :lol:

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


Last edited by BigDumbDinosaur on Fri Aug 13, 2010 4:50 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Aug 13, 2010 4:24 am 
Offline

Joined: Thu Aug 12, 2010 9:17 pm
Posts: 4
Woa there!

Before you guys start a flamewar, you should know that the only reason I considered the 8088 was because it is a 16 bit x86 processor: something I can run DOS or even Linux on. I know now why it isn't common in DIY projects. Also, plastic packages tend to make poor soldering iron rests.

Thanks for your advice, I'll be sure to remember it when I start designing my board.[/list]


Top
 Profile  
Reply with quote  
 Post subject: Help Me Buy & Build
PostPosted: Fri Aug 13, 2010 4:47 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8505
Location: Midwestern USA
DylanW wrote:
Also, plastic packages tend to make poor soldering iron rests.

I was thinking CDIP, which package I believe was once an option with the 8088.

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


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Aug 13, 2010 5:27 am 
Offline

Joined: Sat Jan 04, 2003 10:03 pm
Posts: 1706
DylanW wrote:
Before you guys start a flamewar, you should know that the only reason I considered the 8088 was because it is a 16 bit x86 processor: something I can run DOS or even Linux on.


The 8088 Linux that came out in the early 90s was not intended for production use; rather, it was a demonstration package only, as it was horribly limited. Without support for multiple address spaces (the 8088 lacks an integrated MMU), you probably won't be able to launch more than 4 processes before it runs out of memory.

You're better off going with FreeDOS or an early version of MS-DOS.

That being said, using an 8088 isn't necessarily a bad choice if DOS compatibility is a priority. NEC still sells their variant of the 8088/8086 (V20 and V30 IIRC).

I personally don't mind the 8088; I just prefer the 6502 because, for my way of thinking, it's easier to program.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Aug 13, 2010 6:00 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
Quote:
You're better off going with FreeDOS or an early version of MS-DOS.

Maybe O.T., but I'll ask anyway-- Do you use FreeDOS? I tried last year to get onto either FreeDOS or DrDOS with my separate DOS computer, but I downloaded FreeDOS and only got an error message when I tried to install it and couldn't get any support on the FreeDOS forum (maybe nobody looks at it), and I also emailed questions about DrDOS to DrDOS and couldn't get any response. I would like to have a multitasking DOS on that computer with support for ethernet, USB, etc..


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

All times are UTC


Who is online

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