6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu Nov 21, 2024 11:22 pm

All times are UTC




Post new topic Reply to topic  [ 34 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
PostPosted: Fri Feb 19, 2016 7:22 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
Don't use LS. Its inputs load the signal lines a lot more, and its outputs can't pull up high enough for some CMOS loads to recognize them consistently as a valid "1".

_________________
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: Fri Feb 19, 2016 7:45 pm 
Offline
User avatar

Joined: Sun Oct 13, 2013 2:58 pm
Posts: 491
Location: Switzerland
Yes, as Garth said, stay with a CMOS only design if possible. HC is fast enough for a 4MHz system. AC is required for faster systems only.


Top
 Profile  
Reply with quote  
PostPosted: Sat Feb 20, 2016 2:38 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8504
Location: Midwestern USA
cbmeeks wrote:
I'm going to order some AC series logic. But I'm assuming LS would be fine for 1-2 MHz systems?

Avoid 74LS in new designs. That's like using tires from the 1940s on a new automobile.

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


Top
 Profile  
Reply with quote  
PostPosted: Sat Feb 20, 2016 5:43 pm 
Offline
User avatar

Joined: Sun Oct 13, 2013 2:58 pm
Posts: 491
Location: Switzerland
Hi cbmeeks,

here the schema for the decoder I was referring to in one of my previous posts. I hope you also put some 74AC00 into your basket at mouser.
Attachment:
File comment: Minimalistic Decoder for a 6502 System
minimal-decoder.png
minimal-decoder.png [ 7.61 KiB | Viewed 1624 times ]

cbmeeks wrote:
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?

A typcial 65xx peripheral has two chip selects, one is active low and the other active high. Both must be asserted for the chip to be selected. In case of a W65C22S these are named CS1 and /CS2 (respectively C2B). When CS1 is high and /CS2 is low the W65C22 is selected. Now lets assume that you have 4 (or more) W65C22S. Then you can connect all /CS2 to one of the outputs of the 74HC138, in our case lets use /Y0 which is asserted for $8000..$87FF. Now you connect A4 to CS1 of the first W65C22, A5 to the CS1 of the second W65C22, A6 to the CS1 of the third W65C22 and A7 to the CS1 of the forth W65C22. Now when accessing a address in the range $8010..$801F CS1 of the first W65C22 is high and CS1 of the others W65C22 is low, so only the first W65C22 is selected. The same happens when using any address in the range of $8020..$802F for the second, $8040..$804F for the third and $8080..$808F for the forth W65C22. Of course you should avoid all addresses with more then one of the address lines A4, A5, A6 and A7 set to one. Especially on reads. In this way using only one chip select from the address decoder you can select multiple 65xx devices. And they don't have to be all the same type.


Top
 Profile  
Reply with quote  
PostPosted: Mon Feb 22, 2016 2:40 pm 
Offline
User avatar

Joined: Wed Feb 13, 2013 1:38 pm
Posts: 589
Location: Michigan, USA
cbscpe wrote:
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
Hi Peter.

Looking at the TI Datasheets for 74AC00 and 74AC139, the propagation times at 3.3 volts seem pretty close. Perhaps you or another forum member could point out why using a 74AC139 in this application might be a problem, please?

TIA... Cheerful regards, Mike


Attachments:
decoder 2.png
decoder 2.png [ 120.2 KiB | Viewed 1603 times ]


Last edited by Michael on Tue Feb 23, 2016 3:26 pm, edited 1 time in total.
Top
 Profile  
Reply with quote  
PostPosted: Mon Feb 22, 2016 3:21 pm 
Offline
User avatar

Joined: Sun Oct 13, 2013 2:58 pm
Posts: 491
Location: Switzerland
Right you are the difference in prop delay for the AC versions are extremely small. I must admit that this was based on the figures I had in mind for the other technolgies (HC, LS, etc.). So yes the '139 would be a feasable single chip option.


Top
 Profile  
Reply with quote  
PostPosted: Mon Feb 22, 2016 9:29 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1250
Location: Soddy-Daisy, TN USA
Michael wrote:
A couple single chip solutions come to mind;

Attachment:
decoder 1.png



Michael,

I really like the idea of a simple one-chip decoder. When looking at your schematic, are you saying that I would pick either the left or right and not both?

Would you mind letting me know the pros/cons of either one?

Thanks

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 23, 2016 4:23 pm 
Offline
User avatar

Joined: Wed Feb 13, 2013 1:38 pm
Posts: 589
Location: Michigan, USA
cbmeeks wrote:
I really like the idea of a simple one-chip decoder. When looking at your schematic, are you saying that I would pick either the left or right and not both?
That's correct. You would choose either the ɸ2 Qualified RD/WR or the ɸ2 Qualified RAM Select circuit.

A third method involves driving the active-high chip select pin available on 8K, 64K, or 128K SRAM chips directly from the ɸ2 clock. The active-low chip select from the address decoder (the A15 address line in this case) would drive the SRAM active-low /CS and /OE pins while the 65C02 R/W line drives the SRAM /WE pin.

Speaking of single-chip solutions, Daryl Rictor (8BIT) has a very nice 22V10 Memory Decoder GAL available.

Quote:
Would you mind letting me know the pros/cons of either one?
That's pretty much the same question I asked earlier. We see both methods used all the time. I'd really like to hear the conclusions and (qualified) opinions from our more experienced and knowledgeable members.

Cheerful regards, Mike


Last edited by Michael on Sat Aug 07, 2021 10:27 pm, edited 4 times in total.

Top
 Profile  
Reply with quote  
PostPosted: Wed Feb 24, 2016 7:10 am 
Offline
User avatar

Joined: Sun Oct 13, 2013 2:58 pm
Posts: 491
Location: Switzerland
For moderate clock rates and decent RAM access times it does not matter. What I mean is that if the PHI2 high phase is longer than the sum of the delay time of the decoder, the '139 in this case, plus the access time of the RAM, plus the data set up time of the CPU, plus any delays of bus drivers if included, you can use a signal controlled by PHI2 to control the chip selects of the RAM. However in case the PHI2 high phase is longer than the sum you should consider a setup that creates the chip selects as early as possible. The reason is that many high speed RAM use the chip select to activate the address decoder and the access time from chip select to valid data is higher than the delay from output enable to valid data. This is because the RAM chips put the address decoder into a power save mode when the chip is not selected to save power. For systems with 32kbyte RAM I always use A15 as the chip select. Then also many non 65xx peripherals require a RD and WR signal that is asserted after the chip selects are asserted. Having a global RD and WR qualified with PHI2 then can not only be used to control OE and WE of the memory but as well be used for these peripherals.


Top
 Profile  
Reply with quote  
PostPosted: Wed Feb 24, 2016 4:48 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1250
Location: Soddy-Daisy, TN USA
@Michael

So, going by your example...if I used the scenario on the left (qualified by /RD, /WR), what prevents me from reading from ROM and RAM at the same time? What disables the RAM chip?

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
PostPosted: Wed Feb 24, 2016 7:23 pm 
Offline
User avatar

Joined: Wed Feb 13, 2013 1:38 pm
Posts: 589
Location: Michigan, USA
cbmeeks wrote:
@Michael

So, going by your example...if I used the scenario on the left (qualified by /RD, /WR), what prevents me from reading from ROM and RAM at the same time? What disables the RAM chip?
The A15 address line is used for the SRAM active-low chip enable ($0000-$7FFF) while the /ROM decoder output is used for the ROM active-low chip enable ($C000-$FFFF).


Attachments:
Beater 02.png
Beater 02.png [ 374.44 KiB | Viewed 592 times ]


Last edited by Michael on Sat Aug 07, 2021 11:03 pm, edited 4 times in total.
Top
 Profile  
Reply with quote  
PostPosted: Wed Feb 24, 2016 7:49 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1250
Location: Soddy-Daisy, TN USA
Ah, OK. That was the piece I was missing. A15 goes into the /CE of RAM AND the '139 mux.

While I admit I'm an uber n00b when it comes to this stuff, I can't find anything wrong with the design and I think it would be a great fit for what I want to build.

I plan on using a couple Propellers instead of the ACIA but I should be able to treat them like any other I/O device.

Thanks

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
PostPosted: Thu Feb 25, 2016 12:49 am 
Offline
User avatar

Joined: Wed Feb 13, 2013 1:38 pm
Posts: 589
Location: Michigan, USA
Just came across an interesting '139 decoder circuit. It appears to avoid bus contention if you were to accidentally write to an address in EPROM. What's interesting to me is the use of the PHI1 output instead of the PHI2 output and the use of a 74139 decoder. Is there such a thing as a 74139?

Does anyone know if there is an advantage using PHI1 instead of PHI2 to qualify the Read/Write signals in this decoder design? Also, why the extra inverter going to the B input on the second half of the 74139? Couldn't it be eliminated by simply moving some decoder outputs?

Regards, Mike


Attachments:
decoder beattie.png
decoder beattie.png [ 70.44 KiB | Viewed 1487 times ]
Top
 Profile  
Reply with quote  
PostPosted: Thu Feb 25, 2016 5:00 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
Yes, there's a 74139. Use at least an 'HC139 though, or for faster designs, an 'AC139.

Phase 2 is basically phase 1 after an inverter, used here since the '139 has a negative logic "Gate" input but not a positive logic one. There will be a few ns delay from phase 1's edge to phase 2's, but not enough to cause any trouble here.

Douglas Beattie is very sharp; but we all overlook possibilities sometimes, and it does look like you could eliminate that one inverter section if you swap that 139's Y0 and Y2 outputs and swap its Y1 and Y3 outputs.

_________________
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 25, 2016 5:54 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8504
Location: Midwestern USA
Also, the simultaneous assertion of /CE and /OE on the EPROM will have some negative effects on performance.

It's best if /CE is asserted as soon as the address bus goes valid with an EPROM address, even though Ø2 is still low. /OE should only be asserted when Ø2 goes high. Controlling both inputs from a single source, as shown in the above circuit, narrows the window of opportunity to read the EPROM before the end of the bus cycle. This because it takes time for the EPROM to come out of the high-Z state and connect to the bus, which can only occur when both /CE and /OE have been asserted. Asserting /CE is what "wakes up" the device from low power mode and typically takes the most time. Hence the suggestion that /CE be asserted as soon as a valid address exists. Reading the device should be gated only with /OE.

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


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 34 posts ]  Go to page Previous  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: