65c816 "Core"
65c816 "Core"
I've been meaning to make an '816 based project that's running at 4 MHz and I've cobbled together this MPU and timing "core" the system will use. Is using 74HC's okay for this and will the timing work?
- Attachments
-
- CPU-CPU and Clock.pdf
- (74.55 KiB) Downloaded 115 times
Re: 65c816 "Core"
I assume that the two inverters between CLK and PHI2 are to delay CLK slightly? What's the reasoning behind that, and where do you use CLK vs. PHI2 and why?
Am I right that you're "trimming" the active time for the data bus transceiver at both ends using the U107A NAND gate by using CLK and a further-delayed version of PHI2 as the inputs?
Am I right that you're "trimming" the active time for the data bus transceiver at both ends using the U107A NAND gate by using CLK and a further-delayed version of PHI2 as the inputs?
Curt J. Sampson - github.com/0cjs
-
kernelthread
- Posts: 166
- Joined: 23 Jun 2021
Re: 65c816 "Core"
I'm not entirely sure what your nRD and nWR signals are being used for, but I suspect they aren't doing what you want. The way you have them derived on the schematic:
1. When the processor input clock is high, one input of each of U107B and U107C is low, and so both nRD and nWR are high, i.e. inactive. If they are meant to be Intel-style bus control signals, you want them active when the processor input clock is high, since that is when data transfer occurs.
2. When RnW is low, U107B pin 5 is low, so nWR is high, i.e. inactive. Similarly when RnW is high, nRD is inactive. U107C pin 10 should be connected to RnW directly and U107B pin 5 should be connected to inverted RnW in order to get nRD low when you're reading and nWR low when you're writing.
Also, if pin 1 of the HC245 is high, A is input and B output. This is the wrong way round since pin 1 is high when RnW is high, so the processor is reading - A needs to be output in order to drive the CPU data lines.
1. When the processor input clock is high, one input of each of U107B and U107C is low, and so both nRD and nWR are high, i.e. inactive. If they are meant to be Intel-style bus control signals, you want them active when the processor input clock is high, since that is when data transfer occurs.
2. When RnW is low, U107B pin 5 is low, so nWR is high, i.e. inactive. Similarly when RnW is high, nRD is inactive. U107C pin 10 should be connected to RnW directly and U107B pin 5 should be connected to inverted RnW in order to get nRD low when you're reading and nWR low when you're writing.
Also, if pin 1 of the HC245 is high, A is input and B output. This is the wrong way round since pin 1 is high when RnW is high, so the processor is reading - A needs to be output in order to drive the CPU data lines.
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
65C816 "Core"
GamerFox wrote:
I've been meaning to make an '816 based project that's running at 4 MHz and I've cobbled together this MPU and timing "core" the system will use. Is using 74HC's okay for this and will the timing work?
Can you please repost your schematic in monochrome?
As for 74HC logic, it will be more-than-adequate in your glue logic. However, the clock generator flip-flop should be 74AC or possibly 74AHC (I have not tried the latter in a clock generator to date). The reason is clock specs for the 816 require a maximum rise/fall time of no more than 5ns, which is generally not achievable with 74HC logic. Also, you want your clock to have sufficient fanout to support other parts of the circuit that are dependent on it. A less-than-robust clock signal can cause all sorts of nuisance problems.
For the bank latch and data bus transceiver, I'd consider something faster, e.g., 74AHC. In particular, successfully latching the bank bits is a timing-critical aspect of 65C816 circuitry. You may be able to get away with using 74HC here, but there's no downside to using 74AHC. It has the "gentle" edges of 74HC, but the low propagation time of 74AC.
Once you've posted a monochrome schematic I can go over it in detail and advise if there appear to be any timing "gotchas" waiting to "getcha."
You don't mention how you plan to build this unit. The manner of construction, e.g., breadboard, PCB, etc., can have a significant effect on how well the unit will run. Some construction methods are more forgiving than others...
One other thing: a memory map would be helpful in spotting any potential glue logic errors.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: 65C816 "Core"
BigDumbDinosaur wrote:
Can you please repost your schematic in monochrome?
Regardless of method, I'm sure you can understand that it's a lot more efficient for you to develop a technique to deal with this once than ask every new poster to replicate this work just for you. Lots of us (including me) have visual issues of various kinds, and asking all posters to compensate for all of these on the source side would be a bit ridiculous.
Curt J. Sampson - github.com/0cjs
- floobydust
- Posts: 1394
- Joined: 05 Mar 2013
Re: 65c816 "Core"
Ouch... that was harsh.
While I don't have any vision impairments yet, I too am not a fan of many of the new fangled schematic drawing aids. In many cases the default colors and line widths are poorly chosen. I've been drawing schematics for well over 50 years... the old days were pencil on graph paper. Back in the 80's, I customized a set of menus and created a set of components for an earlier release of AutoCAD... and always in black and white... as it's always easy to read.
Then again, there's still a good percentage of the technical world that doesn't run Windows as a workstation, who knew.
While I don't have any vision impairments yet, I too am not a fan of many of the new fangled schematic drawing aids. In many cases the default colors and line widths are poorly chosen. I've been drawing schematics for well over 50 years... the old days were pencil on graph paper. Back in the 80's, I customized a set of menus and created a set of components for an earlier release of AutoCAD... and always in black and white... as it's always easy to read.
Then again, there's still a good percentage of the technical world that doesn't run Windows as a workstation, who knew.
Regards, KM
https://github.com/floobydust
https://github.com/floobydust
Re: 65c816 "Core"
Here's the monochrome version.
- Attachments
-
- CPU-CPU and Clock.pdf
- (73.36 KiB) Downloaded 86 times
Re: 65c816 "Core"
floobydust wrote:
Ouch... that was harsh.
Quote:
Then again, there's still a good percentage of the technical world that doesn't run Windows as a workstation, who knew.
I should also mention that I not only have no objection to monochrome schematics; I have a slight preference for them over the default colours that KiCad produces. This isn't about colour preferences, it's about handling accessibility issues.
Curt J. Sampson - github.com/0cjs
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: 65C816 "Core"
cjs wrote:
BigDumbDinosaur wrote:
Can you please repost your schematic in monochrome?
Your presumption is wrong.
It has nothing to do with video displays and everything to do with having tritanomaly, an inherited form of color-blindness. Certain color combinations will result in one of the colored objects being difficult or impossible for me to see. For example, a blue line on a white or yellow background will be invisible to me. Ditto for light green on a white or yellow background. That is why I have trouble reading schematics drawn in color.
If there were a way to compensate for tritanomaly by fiddling with display adjustments, I would have dealt with it long ago. There isn't a way—the so-called color-blindness compensation in Windows et al is mainly of value to individuals who have deuteranomaly.
Unless you have tritanomaly or the similar, but worse, tritanopia, may I suggest to you to put your brain in gear before engaging your (metaphoric) mouth when I ask for a schematic to be posted in monochrome?
x86? We ain't got no x86. We don't NEED no stinking x86!
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: 65c816 "Core"
GamerFox wrote:
Here's the monochrome version.
Thank you. I've printed it on tabloid paper and will give it a good look.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: 65C816 "Core"
BigDumbDinosaur wrote:
Unless you have tritanomaly or the similar, but worse, tritanopia, may I suggest to you to put your brain in gear...
Quote:
...before engaging your (metaphoric) mouth when I ask for a schematic to be posted in monochrome?
Again, the real point here is that you expect dozens of people to do extra work to help just you when pretty much the same result could be achieved by only one person doing similar work. And I find it very hard to believe that if, say, a client sends you something in colour you can't see you simply dump the client if he won't conform to your needs.
Curt J. Sampson - github.com/0cjs
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: 65C816 "Core"
cjs wrote:
Again, the real point here is that you expect dozens of people to do extra work to help just you...
Wrong again. In this case, I am the one who is offering the help. Asking for a schematic to be posted in monochrome is a reasonable request in exchange for gratis assistance. I tried printing the color schematic with color off and still couldn't read some of it.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: 65C816 "Core"
BigDumbDinosaur wrote:
In this case, I am the one who is offering the help. Asking for a schematic to be posted in monochrome is a reasonable request in exchange for gratis assistance.
Curt J. Sampson - github.com/0cjs
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: 65C816 "Core"
Getting back to the topic at hand, I've examined your schematic and now see you are going to run on 3.3 volts. Here are some observations in no particular order:
That's all I can see for now. Hope it helps.
- My earlier comment about 74HC logic being suitable is now a qualified one. CMOS logic slows down when run at lower voltages. Be sure to work out your timing with that in mind.
That said, the clock flip-flop (U105A) should be a 74AC74. The 74HC74's output edge rate is too slow to meet the WDC requirement of 5ns maximum. It may be possible to use a 74AHC74 here, but I have not tried that in a clock generator circuit. As always, YMMV. - I recommend you use a 74AHC573 for the bank latch (U102) and a 74AHCT245 for the data bus transceiver (U103). Use of AHCT logic for the transceiver accounts for modern static RAM, almost all of which produces TTL-level outputs with a guaranteed VOH of 2.4. While 2.4 volts is marginally in the range of an acceptable CMOS logic 1 on 3.3 volts, use of an AHCT transceiver will give you better noise immunity when the MPU is in a read cycle.
- I see two inverters (U106A and U106B) in series with the Ø2 signal going to the MPU. There is no good reason for that, as it will skew the MPU's notion of the clock relative to the rest of the system. Also, see my previous comment about driving the MPU's PHI2 input with 74HC logic. PHI2 on the MPU should be directly driven from the Q output of the clock flip-flop (U105A).
- You have yet another inverter (U106C) clocking the LOAD input on the bank latch (U102). Commensurate with the change I suggest in 3. above, LOAD should be connected to the clock flop's (U105A) /Q output. That arrangement will assure that LOAD is driven low at the instant when the MPU's PHI2 is driven high. Doing so gives you the best timing window for this critical function.
- As with the bank latch, the CE input on the data bus transceiver (U103) should be driven from the clock flop's /Q output. There is no need for either of the gates you currently have connected to CE.
- I recommend you add a pullup resistor to the reset line, even though the MCP100 reset generator does drive it high when out of reset. The problem is that drive is a bit on the weak side and could under some conditions make the system vulnerable to a spurious reset due to noise. 3.3K is a suitable value. You may be able to use RN101 for this purpose.
- Your read/write generator circuit (U106E, U107B and U107C) can be implemented entirely with the NAND gate (74HC00) alone, since section U107D of that gate is not used in your present circuit. See below for an example circuit.
The above shows the use of 74AC logic. In your application, 74AHC would be a better choice. - VPB (vector pull) on the MPU is an output, hence does not need a connection to resistor network RN101.
- RDY on the MPU is a bi-directional pin that must be pulled up, which you can do by attaching it to RN101. When RDY is low the MPU will stop on the next high-to-low transition of the clock, which is why you can't let it float. Note that RDY should never be directly connected to Vcc or to the output of another gate.
That's all I can see for now. Hope it helps.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: 65c816 "Core"
(Welcome, Gamerfox! I hope you get the help you need and can at some point in the future post about your fully working system!)