65c816 "Core"

Building your first 6502-based project? We'll help you get started here.
GamerFox
Posts: 32
Joined: 18 Mar 2021

Re: 65c816 "Core"

Post by GamerFox »

Attached is the revised schematic -- the 74HC02 has been moved from U108 to U106 since the inverter has been removed.

For the memory map, this is what I'm thinking so far:

0000-7EFF: RAM
7F00-7FFF: I/O
8000-FFFF: ROM

and I'm thinking banks 01-05 would just be pure RAM.
Attachments
CPU-CPU and Clock.pdf
(67.34 KiB) Downloaded 58 times
User avatar
BigDumbDinosaur
Posts: 9428
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: 65c816 "Core"

Post by BigDumbDinosaur »

GamerFox wrote:
Attached is the revised schematic -- the 74HC02 has been moved from U108 to U106 since the inverter has been removed.

For the memory map, this is what I'm thinking so far:

0000-7EFF: RAM
7F00-7FFF: I/O
8000-FFFF: ROM

and I'm thinking banks 01-05 would just be pure RAM.

32KB of ROM is probably more than you will likely use. With the 65C816, bank $00 RAM is prime real estate and you want as much as you can get. I'd limit ROM to 12KB or 16KB, the latter which would give you ROM from $00C000-$00FFFF.

Also, you may find that confining the I/O block to one page will result in convoluted decoding in order to accommodate more than a few devices. The narrower the window your I/O block appears in the greater the number of address bits that have to be used in the glue logic. Since it appears you are going to build this system entirely with discrete logic, you may find that what you want to do will introduce too many gates, with the associated performance penalties.

Just for reference should you decide to rethink your memory map, here's what I used in my POC V1.3 unit:

Code: Select all

$000000-$00BFFF - RAM (48K)
$00C000-$00C7FF - I/O (mirrors at $00C800-$00CFFF)
$00D000-$00FFFF - ROM (12KB)
$010000-$01FFFF - RAM (64KB)

Regarding the schematic, it looks good. There is less clutter and you were able to eliminate one part (the inverter). You might want to make VP on the MPU a no-connect, unless you plan to use it in some way.

If you are hankering to find something for U107D to do you could use it to generate an inverted reset signal for the benefit of anything that requires a positive-going reset (in my POC units, the 28L92 DUART(s) use an inverted reset). Or you could wire a green LED to it, through series resistance, of course. You'd connect the LED's anode to the resistor, which would be tied to Vcc, and connect the LED's cathode to U107D's output. Any time the reset circuit is quiescent the LED will light up. Push the reset button and the LED will go dark. Purely for entertainment, of course. :D
x86?  We ain't got no x86.  We don't NEED no stinking x86!
kernelthread
Posts: 166
Joined: 23 Jun 2021

Re: 65c816 "Core"

Post by kernelthread »

Check the direction of data flow through the 74AHCT245 - I think it's currently the wrong way round.
User avatar
floobydust
Posts: 1394
Joined: 05 Mar 2013

Re: 65c816 "Core"

Post by floobydust »

I would look more closely at your Reset device (MCP100-315).

1- This reset does not support a manual reset, so using a push-button switch will not cycle the delay sequence.
2- The datasheet shows that this device has a push-pull output. By shorting the output via the reset switch, you might damage the chip.

I suggest you look at an alternate device that has an open collector or open drain output. Also look for one that supports a manual reset.
User avatar
Dr Jefyll
Posts: 3526
Joined: 11 Dec 2009
Location: Ontario, Canada
Contact:

Re: 65C816 "Core"

Post by Dr Jefyll »

BigDumbDinosaur wrote:
2. I recommend you use [...] a 74AHCT245 for the data bus transceiver (U103).
74AHCT245 would probably work, but the 74AHC245 (ie; the non- "T" version) would be a better choice. For starters, the "T" version is a 5 volt part (the datasheet recommends 4.5 to 5.5 V Vcc). And in this schematic the '245 and the '816 are powered at 3.3V (unless I'm missing something).

-- Jeff
Attachments
74AHC245.pdf
(2.3 MiB) Downloaded 51 times
74AHCT245.pdf
(2.3 MiB) Downloaded 53 times
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
User avatar
BigDumbDinosaur
Posts: 9428
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: 65c816 "Core"

Post by BigDumbDinosaur »

kernelthread wrote:
Check the direction of data flow through the 74AHCT245 - I think it's currently the wrong way round.

You're correct. I didn't see that. Serves me right for working on this sort of thing in the middle of the night. :oops:

Dr Jefyll wrote:
...the 74AHC245 (ie; the non- "T" version) would be a better choice. For starters, the "T" version is a 5 volt part...in this schematic the '245 and the '816 are powered at 3.3V (unless I'm missing something).

Right you are. Minimum operating voltage for the AHCT part is 4.5 volts. The AHC should work fine in a 3.3 volt system. As I said above, serves me right for reading a schematic in the middle of the night.

BTW, I attached a more up-to-date data sheet for the 74ACH(T)245.

74ahc245_transceiver_8bit.pdf
74AHC(T)245 Bus Transceiver
(260.24 KiB) Downloaded 53 times

floobydust wrote:
would look more closely at your Reset device (MCP100-315).

1- This reset does not support a manual reset, so using a push-button switch will not cycle the delay sequence.
2- The datasheet shows that this device has a push-pull output. By shorting the output via the reset switch, you might damage the chip.

Also well-spotted. I only gave the MCP100-315 data sheet a cursory look and must've missed where is says it has a push-pull output (which doesn't output much current).

The MCP100 could be used with a push button if the push button is inserted in series with VCC and reset is pulled up as shown in his revised schematic. Interrupting and then restoring VCC would cause the reset sequence to start, same as power-on. That arrangement is a little Mickey-Mouse, however. Using the Maxim DS1813 might be a better choice, since it supports a push button on the reset line.

reset_controller_ds1813.pdf
Maxim DS1813 Reset Controller
(206.15 KiB) Downloaded 62 times
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
floobydust
Posts: 1394
Joined: 05 Mar 2013

Re: 65c816 "Core"

Post by floobydust »

As I've also been working towards a 3.3V design, I've researched quite a few piece parts for the first prototype. I'm not using a '245 for anything, however, I found some DIP parts that are 3.3V along with a 3.3V Reset chip and standard Radial half-size clock oscillator.

For the '245 data buffer, I suggest using a TI SN74LVC245A, which is a 3.3V part:
sn74lvc245a.pdf
(2.18 MiB) Downloaded 46 times
For the '573 latch, there's the TI SN74LVC573A, also a 3.3V part:
sn74lvc573a.pdf
(2.29 MiB) Downloaded 46 times
BTW, the DS-1813 is also a 5V part, so I would suggest using the Maxim DS-1233A:
(NOTE: the datasheet shows a 0.1uF cap in parallel with the reset switch.)
DS1233A-1291988.pdf
(97.23 KiB) Downloaded 49 times
The Dual Flip-Flop should be okay.... has a voltage range down to 2V, but should consult the datasheet for slew rate at lower voltages.

Also, the default clock oscillator shown in a small SMT device (and 3.3V). Abracon make some 3.3V clock oscillators in half-size Radial sizes:
ACHL-24088.pdf
(2.21 MiB) Downloaded 51 times
As always... consult the datasheet for everything.
User avatar
BigDumbDinosaur
Posts: 9428
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: 65c816 "Core"

Post by BigDumbDinosaur »

floobydust wrote:
As I've also been working towards a 3.3V design, I've researched quite a few piece parts for the first prototype...

An annoying thing about AHC and LVC parts is they all seem to come in SMT packages that aren't particularly hobby-friendly. Then there is the reduced performance. The latter is why I've stubbornly stuck with five volts.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
floobydust
Posts: 1394
Joined: 05 Mar 2013

Re: 65c816 "Core"

Post by floobydust »

BigDumbDinosaur wrote:
floobydust wrote:
As I've also been working towards a 3.3V design, I've researched quite a few piece parts for the first prototype...

An annoying thing about AHC and LVC parts is they all seem to come in SMT packages that aren't particularly hobby-friendly. Then there is the reduced performance. The latter is why I've stubbornly stuck with five volts.
That is certainly the trend, but the devices I attached datasheets for are available in DIP format and Mouser has stock as of right now. Also, the one's I listed do seem to have fairly fast response times. The LVC245 is spec'd at 6.3ns and the LVC573 is spec'd at 6.9ns, both at 3.3V.
GamerFox
Posts: 32
Joined: 18 Mar 2021

Re: 65c816 "Core"

Post by GamerFox »

The reason I've decided to use 3.3V is that I may in the future want to make an SPI/SD card addition to the board.

I also plan on having two 6522s, a real-time clock, and an LCD display using the ST7789VI driver/controller (https://www.newhavendisplay.com/resourc ... 7789Vi.pdf)
User avatar
GARTHWILSON
Forum Moderator
Posts: 8775
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: 65c816 "Core"

Post by GARTHWILSON »

GamerFox wrote:
The reason I've decided to use 3.3V is that I may in the future want to make an SPI/SD card addition to the board.

I also plan on having two 6522s, a real-time clock, and an LCD display using the ST7789VI driver/controller (https://www.newhavendisplay.com/resourc ... 7789Vi.pdf)
SD card and even the LCD controller can be run on serial interfaces. With so few connections necessary, and since each one is unidirectional, it's easy to add voltage translators; then you can run the 65xx at 5V and get more speed out of it if desired, and still run those outboard things at 3.3V.
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?
User avatar
Dr Jefyll
Posts: 3526
Joined: 11 Dec 2009
Location: Ontario, Canada
Contact:

Re: 65c816 "Core"

Post by Dr Jefyll »

BigDumbDinosaur wrote:
Also well-spotted. I only gave the MCP100-315 data sheet a cursory look and must've missed where is says it has a push-pull output (which doesn't output much current).
I found a few MCP100 datasheets online -- all from Microchip -- and they mention the push-pull output quite prominently (including a bullet point in the introductory list of Features and also in the document title itself, Microcontroller Supervisory Circuit with Push-Pull Output ). So unless you stumbled onto a less forthright datasheet from another manufacturer, I'm guessing you need to dial up the magnification on your PDF reader! Aren't you the one who's fond of saying, "The datasheet is your friend"? :wink: And did that detail about the AHCT part being 5 volt escape notice, too? Be that as it may, I wouldn't consider the MCP100's 3 mA output current even remotely insufficient for GamerFox's application.

BigDumbDinosaur wrote:
The MCP100 could be used with a push button if the push button is inserted in series with VCC and reset is pulled up as shown in his revised schematic.
Since the intent is to interrupt VCC, it's clear you mean a normally-closed pushbutton. So far so good, but unfortunately the pullup shown in the revised schematic might very possibly supply enough current to prevent /RESET from dropping to a valid logic low when the button is pushed.

A better suggestion for the MCP100 is one plasmo recently posted. The MCP100's VCC terminal would connect to the supply through a 1K or so current limiting resistor, and a normally-open pushbutton would, when pressed, shunt the VCC terminal to ground. Shown below are a pair of schematic excerpts altered to illustrate the two approaches. Instead of actually adding a 1K resistor, I "borrowed" a few of the unused 3.3Ks in the array. :twisted:

-- Jeff
Attachments
MCP100 pushbutton reset .png
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
User avatar
BigDumbDinosaur
Posts: 9428
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: 65c816 "Core"

Post by BigDumbDinosaur »

Dr Jefyll wrote:
BigDumbDinosaur wrote:
Also well-spotted. I only gave the MCP100-315 data sheet a cursory look and must've missed where is says it has a push-pull output (which doesn't output much current).
I found a few MCP100 datasheets online -- all from Microchip -- and they mention the push-pull output quite prominently (including a bullet point in the introductory list of Features...So unless you stumbled onto a less forthright datasheet from another manufacturer, I'm guessing you need to dial up the magnification on your PDF reader!

:D :D :D

Mr. Magoo I am. Psychologically, I still haven't come to terms with my substantially deteriorated vision, which went down hill rather quickly. So your wisecrack about dialing up the magnification is a point cheerfully taken. Just try not to remind me of my bad vision too often or else I'll develop an inferiority complex over it and will have to go into snowflake mode, retreat to my safe place and cry. :shock: :wink:
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
Dr Jefyll
Posts: 3526
Joined: 11 Dec 2009
Location: Ontario, Canada
Contact:

Re: 65c816 "Core"

Post by Dr Jefyll »

Well, it's a relief to hear you're cheerful, because no offense was intended, and I'm certainly nothing but sympathetic for anyone facing a visual or other impairment. At the same time I think we would be straying from the topic if the impairment became the center of discussion. (I almost said, become the focus. :roll: ) In your posts you commonly include datasheet excerpts, and seem quite fluent, so we gather you're satisfactorily handy in accessing technical content -- which is great. I hope the wisecrack didn't distract from the point I was hoping to make about keeping well informed about the subject matter in one's posts.

-- Jeff
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
GamerFox
Posts: 32
Joined: 18 Mar 2021

Re: 65c816 "Core"

Post by GamerFox »

Here's the new version of the sheet with the advice you gave me, and I'm a little afraid of cranking up phi2 too high to warrant memory bus ack lines.
Attachments
65816-comp.pdf
(112.83 KiB) Downloaded 58 times
Post Reply