6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 24, 2024 2:21 am

All times are UTC




Post new topic Reply to topic  [ 34 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: Wed Feb 17, 2016 10:39 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1250
Location: Soddy-Daisy, TN USA
I'm working on several side projects but my main goal has always been to design my own SBC. As I work on these side projects, I learn new things...

So, I think I finally have a more sane decoding scheme that isn't crazy or hard to build. I would love everyone's input.

I'm not at my normal computer at the moment so I can't upload a true schematic but I have attached a hand-drawn version.

The basic plan is 32K RAM, 16K ROM and 6 I/O devices. I don't think I really need that many. So I could shorten the list.

Here is the memory map:

Code:
Memory Map
===============================================
ROM    11_xxxxxx_xxxxxxxx    $C000-$FFFF (16KB)
I/O 0  10_000001_RRRRRRRR    $8100-$81FF
I/O 1  10_000010_RRRRRRRR    $8200-$82FF
I/O 2  10_000100_RRRRRRRR    $8400-$84FF
I/O 3  10_001000_RRRRRRRR    $8800-$88FF
I/O 4  10_010000_RRRRRRRR    $9000-$90FF
I/O 5  10_100000_RRRRRRRR    $A000-$A0FF
RAM    0x_xxxxxx_xxxxxxxx    $0000-$7FFF (32KB)


I like the idea of full page I/O because I plan on using a micro-controller as one of them and I need the 256 bytes for it.

Here is my *CRUDE* schematic:

Attachment:
SCH_01.JPG
SCH_01.JPG [ 1.25 MiB | Viewed 5211 times ]


So I'm thinking I would need 3 quad-input NAND gates for the decoding logic. One would be for RAM, ROM and one I/O. And another would be for four I/O. I could ditch the third one and "settle" for 5 I/O devices.

What do you guys think?

I haven't spec'd the part yet. But I have a few 74HC132's around. Top speed for the computer would be 1-2MHz.

Do you think the setup would work with an even faster clock? Say 4-8 MHz? I imagine I would have to use faster NAND gates.

Thanks!

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
PostPosted: Wed Feb 17, 2016 11:59 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8546
Location: Southern California
Going into the NAND gates for the I/O select, you don't need to repeat it for every I/O IC. You can use the same one. What you do need to do though is invert the A14 before it goes into the NAND. However, what you have is pretty close to what's in the 2nd-to-last schematic of the address-decoding page of the 6502 primer.

_________________
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?


Top
 Profile  
Reply with quote  
PostPosted: Thu Feb 18, 2016 4:56 am 
Offline
User avatar

Joined: Wed Feb 13, 2013 1:38 pm
Posts: 589
Location: Michigan, USA
Would there be any advantage using ɸ2 qualified /RD and /WR signals instead of a ɸ2 qualified RAM select signal? You would use the A15 address line for the active-low RAM select ($0000..$7FFF). Also, if you think you might use an EEPROM and you'd like the capability to program it in-circuit, I think EEPROMs require mutually exclusive /RD and /WR signals, don't they? Please correct me if I'm wrong, guys.

I wouldn't mind trying this simple decoder scheme using the CLC (configurable logic cell) modules on a little 14-pin or 20-pin PIC.

Attachment:
decoder pic.png
decoder pic.png [ 81.85 KiB | Viewed 5192 times ]


Last edited by Michael on Sat Feb 20, 2016 7:18 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Thu Feb 18, 2016 1:16 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1250
Location: Soddy-Daisy, TN USA
GARTHWILSON wrote:
Going into the NAND gates for the I/O select, you don't need to repeat it for every I/O IC. You can use the same one. What you do need to do though is invert the A14 before it goes into the NAND. However, what you have is pretty close to what's in the 2nd-to-last schematic of the address-decoding page of the 6502 primer.


AH yeah! That's much better. lol

I don't know what I was thinking. Anyway, I certainly can't take credit as I got the idea from the primer site. :-D

So I should be able to use only one NAND chip right? Even for all 6 I/O's? Plus I think I can invert A14 using VCC and one of the NAND inputs.

I'll draw up another schematic soon.

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
PostPosted: Thu Feb 18, 2016 7:45 pm 
Offline
User avatar

Joined: Sun Oct 13, 2013 2:58 pm
Posts: 491
Location: Switzerland
I would also recommend the idea of Micheal to have a master read and write signal that is connected to the OE and WE signal of ROM / RAM. These signals are also useful for non 65xx peripherals like the UARTs often proposed by BDD. This takes 3 NAND gates. As Micheal said the best is to use A15 as the chip select for the RAM. THen you use the forth NAND gate with its inputs cnnected to A14 and A15 for the chip select of the ROM. Then I would propose to add a 74ACT138 as the IO address decoder. A15 would be connected to active high enable and A14 would be conncted to one of the active low enable inputs. The second active low enable input is connected to GND. Then you connect A13, A12 and A11 to the inputs A,B and C of the 74ACT138. With this you get 8 IO ranges. So with only two descrete TTL logic chip you have a complete address decoder. Note that 65xx peripherals can share one of the IO select lines using the activ hgh chip select to distinguish the individual chip using some of the unused addresss lines, in this case A10 to A4.


Top
 Profile  
Reply with quote  
PostPosted: Thu Feb 18, 2016 9:26 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1250
Location: Soddy-Daisy, TN USA
Michael wrote:
I wouldn't mind trying this using the CLC (configurable logic cell) modules on a little 14-pin or 20-pin PIC.


I'm not familiar with CLC in PIC's. Is that some type of low-level CPLD/FGPA functionality? That would be pretty awesome if it were.

cbscpe wrote:
I would also recommend the idea of Micheal to have a master read and write signal that is connected to the OE and WE signal of ROM / RAM. .......... As Micheal said the best is to use A15 as the chip select for the RAM.


cbscpe wrote:
Then you connect A13, A12 and A11 to the inputs A,B and C of the 74ACT138. With this you get 8 IO ranges. ......Note that 65xx peripherals can share one of the IO select lines using the activ hgh chip select to distinguish the individual chip using some of the unused addresss lines, in this case A10 to A4.


So the basic principal is that using the 1 of 8 decoder, I get 8 different IO devices using A[13:11]. But I'm not sure I understand what you mean about the 65XX sharing IO lines. I'm thinking 8 IO devices is plenty (up from my original 6). Or, do you mean something else?


cbscpe wrote:
Then I would propose to add a 74ACT138 as the IO address decoder


That chip looks pretty awesome (10.9ns propagation delay) but it doesn't appear to run at 3v3. I guess for that kind of speed you need 5v. Hmm. I could run everything 5v except my mcu. I planned on having 5v available anyway.


cbscpe wrote:
So with only two descrete TTL logic chip you have a complete address decoder


Which is exactly why I wanted to consult the experts. Not only did I learn something, now my chip count is reduced by two.

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
PostPosted: Fri Feb 19, 2016 5:53 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8514
Location: Midwestern USA
In regards to using the 74ACT138 as a general purpose decoder, there is no good reason to use 74ACT logic unless it is being driven by 74LS logic, or by devices that generate TTL-compatible outputs. Almost all 74ACT devices are slower than their 74AC equivalents, and are theoretically more noise-sensitive. This also applies to 74HC vs. 74HCT logic. While the speed of any one device may not be critical, the prop delays through a series of devices can quickly add up. So this should be a consideration in your design.

In general, if all devices (MPU, I/O hardware, RAM, etc.) in your system are CMOS then all logic should be CMOS, which means no 74ACT or 74HCT should be used at all. I generally recommend 74AC if the Ø2 clock will exceed 8 MHz.

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


Top
 Profile  
Reply with quote  
PostPosted: Fri Feb 19, 2016 6:01 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8514
Location: Midwestern USA
cbscpe wrote:
I would also recommend the idea of Micheal to have a master read and write signal that is connected to the OE and WE signal of ROM / RAM. These signals are also useful for non 65xx peripherals like the UARTs often proposed by BDD.

Here is the circuit I devised for POC V1.
Attachment:
File comment: Read/Write Generation
read_write_qualify.gif
read_write_qualify.gif [ 32.21 KiB | Viewed 5125 times ]

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


Top
 Profile  
Reply with quote  
PostPosted: Fri Feb 19, 2016 7:37 am 
Offline
User avatar

Joined: Sun Oct 13, 2013 2:58 pm
Posts: 491
Location: Switzerland
BDD is right, use the 74AC138. First it is more compatible with the output levels of the W65C02 (although this is no issue in this case) but more important the AC devices are specified for a voltage range of 2.0 to 6.0 volts. Of course running your system at 3v3 limits its max speed to approx 8MHz.


Top
 Profile  
Reply with quote  
PostPosted: Fri Feb 19, 2016 9:56 am 
Offline
User avatar

Joined: Wed Feb 13, 2013 1:38 pm
Posts: 589
Location: Michigan, USA
A couple single chip solutions come to mind;

Attachment:
decoder 1.png
decoder 1.png [ 68.38 KiB | Viewed 5107 times ]


Top
 Profile  
Reply with quote  
PostPosted: Fri Feb 19, 2016 1:54 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1250
Location: Soddy-Daisy, TN USA
Thanks for the suggestions!

I didn't know that about AC vs. ACT.

I added some 74AC138 & 74AC139's to my Mouser shopping cart. I think all I have at home are LS versions.

Concerning 3v3 and maximum speed, my target speed for my first computer is going to be in the 1-2MHz range with 4MHz being "high speed". :-)

SBC#2 or 3 will probably be an '816 running in the 8-10 MHz range. So I have some time.

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
PostPosted: Fri Feb 19, 2016 2:51 pm 
Offline
User avatar

Joined: Sun Oct 13, 2013 2:58 pm
Posts: 491
Location: Switzerland
Hi Micheal, I would rather not use the '139 to create the PHI2 qualified signals as the '139 is rather slow compared to a 74AC00 and due to the very short data hold time provided by the W65C02 and the required data hold time of normal speed RAM (55ns or slower) this could violate the guaranteed times for writes.

cbmeeks, if your goal for the clock range is in this range you could use the clock from the UART. 4MHz with this minimalistic decoder with short delays and without using buffers for the data bus is definitively going to work. My simple systems, using only one 10ns GAL for all the glue, run at 11MHz even when built on a breadboard. Of course at 5V and using a fast (20ns) RAM.


Top
 Profile  
Reply with quote  
PostPosted: Fri Feb 19, 2016 3:23 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1250
Location: Soddy-Daisy, TN USA
cbscpe wrote:
My simple systems, using only one 10ns GAL for all the glue, run at 11MHz even when built on a breadboard. Of course at 5V and using a fast (20ns) RAM.


I'd really like to get into that. I've done a little FPGA but FPGA is extreme overkill for this (not to mention hard to design boards).

I mean, 2-3 small logic IC's isn't the end of the world. But a small, through-hole GAL would be nice. However, everyone seems to recommend small CPLD's for anything NOT FPGA. Heck, many people say CPLD's aren't worth it. Which I don't get.

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
PostPosted: Fri Feb 19, 2016 4:57 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8514
Location: Midwestern USA
cbmeeks wrote:
However, everyone seems to recommend small CPLD's for anything NOT FPGA. Heck, many people say CPLD's aren't worth it. Which I don't get.

CPLDs have the advantage of being able to consolidate many logic functions into a single device, with a guaranteed pin-to-pin propagation time that will simplify timing calculations. GALs offer guaranteed pin-to-pin prop times as well, but being SPLDs, are limited in total logic functions, inputs and outputs. Even a small CPLD (e.g., an Atmel ATF1504AS) has considerably more logic resources, as well as many more uncommitted I/O pins (32 on an ATF1504AS). In my opinion, a small CPLD makes more sense with what most of us are trying to achieve.

That said, you can build a pretty decent system using only discrete logic. My POC V1 unit uses only 74AC and 74ABT logic in DIP packages, has 52KB of available RAM, 8KB of ROM, a 2KB I/O block (RTC, DUART and SCSI), and runs at 12.5 MHz, which is the maximum speed at which the I/O is stable (there is no wait-stating). RAM, ROM and I/O select logic is such that no more than two gate delays are present in any given circuit. I am certain that if it weren't for the limitations of the I/O hardware I could run the unit at 20 MHz.

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


Last edited by BigDumbDinosaur on Sat Feb 20, 2016 2:37 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Fri Feb 19, 2016 6:10 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1250
Location: Soddy-Daisy, TN USA
I'm going to order some AC series logic. But I'm assuming LS would be fine for 1-2 MHz systems?

_________________
Cat; the other white meat.


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

All times are UTC


Who is online

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