6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Apr 27, 2024 1:33 pm

All times are UTC




Post new topic Reply to topic  [ 60 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject: Re: shopping list
PostPosted: Sat Apr 01, 2023 5:20 pm 
Offline
User avatar

Joined: Wed Feb 13, 2013 1:38 pm
Posts: 586
Location: Michigan, USA
allisonlastname wrote:
How do you recommend mapping the hole?

Another decoder & glue logic method, if I may, specifically for those 32K/32K RAM/ROM configurations. Note the use of a 64K RAM and its active high CS2 input used to qualify RAM read and write operations.


Attachments:
temp4.png
temp4.png [ 180.15 KiB | Viewed 5896 times ]
Top
 Profile  
Reply with quote  
 Post subject: Re: shopping list
PostPosted: Sat Apr 01, 2023 6:11 pm 
Offline
User avatar

Joined: Mon Mar 06, 2023 9:26 am
Posts: 84
Location: UK
floobydust wrote:
I've attached a section of a schematic for this,


I can see a way to minimise gate delays here, but it would limit me to using IO ICs with multiple chip selects. You could route /IOSEL directly to a chip select input, and then have the 3-to-8 decoder go to the other chip select. That way, /IOSEL doesn't need to go through the decoder and you save a few nanoseconds of propagation delay. Limiting my choice of IO chips probably isn't a great idea at this state of the process though.

_________________
probably the youngest person on this forum


Top
 Profile  
Reply with quote  
 Post subject: Re: shopping list
PostPosted: Sat Apr 01, 2023 6:12 pm 
Offline
User avatar

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

May I ask which Arduino you have, please? An Uno R3 or Nano perhaps?


Top
 Profile  
Reply with quote  
 Post subject: Re: shopping list
PostPosted: Sat Apr 01, 2023 6:15 pm 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1398
Location: Scotland
allisonlastname wrote:
floobydust wrote:
I've attached a section of a schematic for this,


I can see a way to minimise gate delays here, but it would limit me to using IO ICs with multiple chip selects. You could route /IOSEL directly to a chip select input, and then have the 3-to-8 decoder go to the other chip select. That way, /IOSEL doesn't need to go through the decoder and you save a few nanoseconds of propagation delay. Limiting my choice of IO chips probably isn't a great idea at this state of the process though.


A this point, especially if you're sticking to breadboards and 1-2Mhz, then it's not really going to be an issue. Get a proof of concept going then worry later about making it go faster.

That was another reason I used a GAL - my systems run at 16Mhz on a simple double sided PCB, but with care, etc. you can go much much faster. I don't feel the need right now.

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
 Post subject: Re: shopping list
PostPosted: Sat Apr 01, 2023 6:32 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1373
allisonlastname wrote:
floobydust wrote:
I've attached a section of a schematic for this,


I can see a way to minimise gate delays here, but it would limit me to using IO ICs with multiple chip selects. You could route /IOSEL directly to a chip select input, and then have the 3-to-8 decoder go to the other chip select. That way, /IOSEL doesn't need to go through the decoder and you save a few nanoseconds of propagation delay. Limiting my choice of IO chips probably isn't a great idea at this state of the process though.


Well, I've made a few boards which are running 100% reliable with a 5MHz CPU clock, the limiting factor being the R65C51P4 ACIA. I have one board set which is running at 10MHz, using a 70ns 28C256 EEPROM and a early sample WD65C51 which doesn't have the Xmit bit problem. I don't think you'll have a speed problem.... unless you're trying to run at very high clock rates. Exactly how fast do you plan on running your first system at?

If you think you have to go faster, just use a PLD. My C02 Pocket uses an ATF22V10C and that has much less prop delay.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
 Post subject: Re: shopping list
PostPosted: Sat Apr 01, 2023 6:44 pm 
Offline
User avatar

Joined: Mon Mar 06, 2023 9:26 am
Posts: 84
Location: UK
Michael wrote:
May I ask which Arduino you have, please? An Uno R3 or Nano perhaps?


It's a Seeeduino v3, which is pretty much pin compatible with Uno for all intents and purposes. It does have an onboard switch to select 5v or 3.3v operation, which is nice.

floobydust wrote:
Exactly how fast do you plan on running your first system at?


I'm aiming for 1mhz. If I can get it reliably working that fast, I might aim for something faster, but I won't be pushing for much above that for a while yet. I only pointed out the design change as an observation, rather than something I was seriously considering.

_________________
probably the youngest person on this forum


Top
 Profile  
Reply with quote  
 Post subject: Re: shopping list
PostPosted: Sat Apr 01, 2023 7:03 pm 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1398
Location: Scotland
allisonlastname wrote:
I'm aiming for 1mhz. If I can get it reliably working that fast, I might aim for something faster, but I won't be pushing for much above that for a while yet. I only pointed out the design change as an observation, rather than something I was seriously considering.



This:

https://projects.drogon.net/ruby-6502-on-stripboard/

Ran at 16Mhz.

Achieving 1 or 2 Mhz on a breadboard ought to be easy.

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
 Post subject: Re: shopping list
PostPosted: Sun Apr 02, 2023 7:23 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8144
Location: Midwestern USA
As designed, your circuit will not work as expected.

You are using Ø2 to qualify chip selects, which is not good design practice. In a 65xx system, chip selection and read/write gating are two separate operations, with the former occurring during Ø2 low and the latter occurring during Ø2 high. Note that everything that occurs during a 65xx bus cycle starts with the fall of the clock.

The MPU drives A0-A15 with a valid address tADS nanoseconds after the fall of Ø2. At that time, the glue logic should decode the address and select the device to be accessed. In particular, chip select and address pins of 65xx peripherals must be valid and stable before the rise of the clock. In your circuit, your 65C22 will not see a chip select until Ø2 goes high and hence will fail to respond.

What does need to be qualified by Ø2 is the write input of non-65xx peripherals, in this case, the SRAM. The data bus cannot be considered valid during Ø2 low and furthermore, the address bus will be briefly unsettled prior to the elapse of tADS. Asserting /WE during that time may result in corruption of RAM contents due to a potential timing race.

Attached is an example of how RAM/ROM and I/O can be controlled in a 65C02 system with three gates and a 3-of-8 decoder. The result is a maximum of 48K of RAM and 12 K of ROM, plus up to 8 I/O devices. This circuit has been tested at 20 MHz.

Attachment:
mapping_65c02.gif
mapping_65c02.gif [ 41.26 KiB | Viewed 5850 times ]

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


Top
 Profile  
Reply with quote  
 Post subject: Re: shopping list
PostPosted: Sun Apr 02, 2023 10:58 am 
Offline
User avatar

Joined: Mon Mar 06, 2023 9:26 am
Posts: 84
Location: UK
Ok, I've done everything except clock generation. Let me know if there's any issues with the design.


Attachments:
nearly_there.pdf [263.32 KiB]
Downloaded 72 times

_________________
probably the youngest person on this forum
Top
 Profile  
Reply with quote  
 Post subject: Re: shopping list
PostPosted: Sun Apr 02, 2023 6:28 pm 
Offline
User avatar

Joined: Wed Feb 13, 2013 1:38 pm
Posts: 586
Location: Michigan, USA
Would I be out-of-line suggesting a couple parts changes? Unless you already have 62256 RAM and 28C256 EEPROM IC's, you might consider using a 64K or 128K RAM IC and a 39SF010A Flash ROM IC instead. A new AT28C256 costs $12+ compared to $3+ for a new 39SF010A and a new 128K RAM IC like the AS6C1008 is almost the same price as a new 32K 62256. Also, you could get a 5-pack of skinny 64K W24512AK-15 RAM IC's for about $3.50 (including shipping) from a vendor on AliExpress.

IMO, the 39SFxxx series Flash ROM's are easier to program and the extra active high chip select on 64K / 128K RAM IC's is quite handy but these chips will take up more room on a breadboard or a PCB.

Good luck. Cheerful regards.


Attachments:
SBC6502 Partially Populated 2.png
SBC6502 Partially Populated 2.png [ 1.81 MiB | Viewed 5811 times ]
6502 on BB.png
6502 on BB.png [ 503.04 KiB | Viewed 5811 times ]
Top
 Profile  
Reply with quote  
 Post subject: Re: shopping list
PostPosted: Sun Apr 02, 2023 10:45 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8144
Location: Midwestern USA
allisonlastname wrote:
Ok, I've done everything except clock generation. Let me know if there's any issues with the design.

A few things and you should be ready to build:

  1. You are mixing logic families. VOH in TTL (i.e., 74LS) logic is a guaranteed 2.4 volts, with a theoretical maximum of 3.4. A CMOS logic 1 is typically VCC × 0.7 volts, which is higher than the capabilities of TTL logic. While it probably will work okay, there is no guarantee it will.

  2. /OE on the ROM should be connected to the same circuit to which /OE on the SRAM is connected.

    A sneaky benefit of gating /OE on Ø2 high is that the ROM will inject milder transients into the power supply circuit than it would if simultaneously selected and enabled. Also, the ROM will get off the data bus more quickly if /OE is enabled only when Ø2 is high. In this circuit, that is not a critical requirement. However, it may become so when you build your next design and decide to amp up the clock.

  3. Add a 3.3K pullup resistor to your reset circuit. The DS1813’s internal pullup is weak and relying only on it to keep reset high may make your reset circuit noise-sensitive.

  4. You have your Ø2 circuit connected to the 65C02’s Ø2 output. WDC advises against doing so in new designs. They recommend that everything should be driven by the clock oscillator.

    A problem with using the C02’s clock outputs is they lag the clock input (Ø0) by an unspecified amount, hence subtle timing errors could be introduced with any device slaved to the clock, e.g., the 65C22. WDC no longer tests Ø1 out and Ø2 out and doesn’t guarantee their behavior. These outputs are present only to provide backward compatibility in systems in which the NMOS 6502 is to be replaced with a 65C02. Modern HCMOS clock oscillators have more than enough fan-out to handle all reasonable loads.

  5. Note that the 65C22S has a totem-pole IRQ output—which can’t be wired OR. While that is of no concern in this design, it is something to keep in mind in a future design in which more than IRQ source is present.

  6. I recommend you connect NMI and SOB to VCC through 3.3K pullup resistors so those inputs can be put to use. In my POC units, I have a DS1813 attached to NMI so I can manually interrupt a running program that has gotten stuck in a loop.

    SOB can be used as a high-speed input, which may be of some value.

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


Top
 Profile  
Reply with quote  
 Post subject: Re: shopping list
PostPosted: Sun Apr 02, 2023 11:01 pm 
Offline
User avatar

Joined: Mon Mar 06, 2023 9:26 am
Posts: 84
Location: UK
BigDumbDinosaur wrote:
You are mixing logic families.


All the 74 is supposed to be 74HC but kicad only has 74LS symbols for a lot of stuff.


BigDumbDinosaur wrote:
Add a 3.3K pullup resistor to your reset circuit.


Does that go here?
Attachment:
2023-04-02_23-57.png
2023-04-02_23-57.png [ 16.81 KiB | Viewed 5781 times ]



BigDumbDinosaur wrote:
You have your Ø2 circuit connected to the 65C02’s Ø2 output.


Ah. I had assumed that was the done thing, but apparently not. Is phi2 the inverse of phi0?


BigDumbDinosaur wrote:
Note that the 65C22S has a totem-pole IRQ output—which can’t be wired OR.


BigDumbDinosaur wrote:
I recommend you connect NMI and SOB to VCC through 3.3K pullup resistors so those inputs can be put to use.


The prototype is gonna be on breadboards, so I can mess with those when I need to.

_________________
probably the youngest person on this forum


Top
 Profile  
Reply with quote  
 Post subject: Re: shopping list
PostPosted: Sun Apr 02, 2023 11:06 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8144
Location: Midwestern USA
allisonlastname wrote:
BigDumbDinosaur wrote:
Add a 3.3K pullup resistor to your reset circuit.
Does that go here?
Attachment:
2023-04-02_23-57.png

Can you please post that in monochrome? I’m partially colorblind and can’t make out all of what is in your graphic.

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


Top
 Profile  
Reply with quote  
 Post subject: Re: shopping list
PostPosted: Sun Apr 02, 2023 11:20 pm 
Offline
User avatar

Joined: Mon Mar 06, 2023 9:26 am
Posts: 84
Location: UK
This better?


Attachments:
2023-04-02_23-57_gray.png
2023-04-02_23-57_gray.png [ 7.45 KiB | Viewed 5780 times ]

_________________
probably the youngest person on this forum
Top
 Profile  
Reply with quote  
 Post subject: Re: shopping list
PostPosted: Sun Apr 02, 2023 11:36 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8428
Location: Southern California
allisonlastname wrote:
Is phi2 the inverse of phi0?

Φ0 is an input.  Φ1 is an output, basically Φ0 followed by an inverter.  Φ2 is also an output, basically Φ1 followed by another inverter.  So although Φ2 is supposedly in phase with Φ0, it is slightly delayed, by the propagation delays of the inverters.  In ye olden days, the Φ2 output always went to the other things that took Φ2; but WDC now recommends that for their W65C02S, you run everything from the same signal you feed to the Φ0 input (sometimes called the Φ2 input which is pin 37 on the DIP), not the Φ2 output (which is pin 39 of the DIP).

_________________
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  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 60 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC


Who is online

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