Okay, think if I continue to stare at this any longer I might go cross eyed. XD
Anyhow, revised (a lot)
Still think I need more around the DMA/RDY pin. (Or am I just over thinking it again?)
Things done:
- Split things up into different pages
- Diodes replaced/fixed
- Removed the 1502 in favor of a pair of ATF16V8Cs (figured out how to do this without chaining them together)*
- Removed the LCD and '138 on the 65C22 and replaced with a generic IDC.
- Replaced the 65C02 PLCC package.
- 65C22N replaced with 65C22S.
- Removed a bunch of the pull down resistors.
- Removed ATX power connector & circuitry.
- Added a debounced button on the NMI line.
- Brought back my debugging clock.
* Yes I know, there's still a 1502 in there, I'm considering using it as a PIC controller. I'm still on the fence about this idea though. I may just replace it with some AND gates; just think it could be handy to have some edge level interrupts.
Still not 100% on that JTAG connector, I find so many different conflicting pin outs for it. >_<
Addressing some specifics from BDD's post:
BigDumbDinosaur wrote:
I’ll add a little to the overall commotion.
[list=1][*]Your
RDY series diode (D2) is not a good choice, due to its forward drop and relatively slow recovery time. Even if the cathode of D2 is grounded,
RDY may not go low enough for the MPU to respond. I recommend you use an SD103A or similar (see attached), which is a small-signal Schottky diode with half the forward drop of the 1N4001 (and much faster recovery time).
I figured there was a lot more to this, which falls into the category of analog circuitry, of which I know very VERY little. I figured I was going to sit down and find formulas for this or something, but I wasn't sure what to look for.
I did a bit of reading on this and I can see that yes Schottkys are faster due to a thinner P junction? (Do I have that right? *much confusion*)
I'd like to learn more about this so I can make better decisions on this in the future.
Quote:
[*]While on the subject of the RDY circuit, I recommend you use the lowest pull-up resistance value consistent with the driving capabilities of whatever device will be controlling RDY. The lower the resistance, the quicker RDY will return to the quiescent state after the wait-state period has expired, lessening potential timing headaches.
I'm using 3.3K as that is what I have on hand at the moment, finding other values of course is not a problem; but like the above, I don't know how one goes about finding good values for this.
(Digital logic I get, analog, not so much)
Quote:
[*]Your Ø2 clock generator doesn’t need all those flops. Also, 74HC logic is not a good choice for clock generation, due to the somewhat sedate edges. WDC requires that the maximum rise/fall time of Ø2 not exceed 5ns, regardless of actual clock frequency.
I recommend you use a 74AC74, whose Q outputs have the required fast edges. As fast edges can cause ringing problems, the AC74’s output should be connected to the Ø2 circuit through a series resistor in the range of 100 to 150 ohms. That resistor should be as physically close to the AC74’s output as possible. Series resistance will help dampen ringing, especially undershoot on the high-going phase, which if sufficiently severe, has the potential to look like a double clock to the MPU.
I've replaced this ultimately with an 74AC74 and a single ATF16V8C. I did double check the rise/fall times of the 16V8C, it should be within the 5ns period. Thanks for pointing this out to me, I'll be sure to keep that in mind going forward.
Quote:
[*]The pull-down resistors on the address bus is unnecessary and in fact, may be detrimental. The 65C02 *always* drives A0-A15 high or low, unless BE is driven low. You’ve got BE permanently pulled high, so A0-A15 will never float in your system.
[*]Similarly, the pull-down resistors on D0-D7 are unnecessary. The data bus will not float if BE is high during a write cycle. The data bus will be hi-Z during a read cycle, but some other device would/should be driving D0-D7 in that case. If you are, for some reason, paranoid that D0-D7 will float and cause trouble, use pull-ups, not pull-downs.
Removed, though replaced with some 74AC245s* (I'll get into these in a bit)
I have started to implement the BE/RDY pins so I can later try and develop a DMA for this system.
Quote:
[*]As flooby noted, your reset circuit is much too complicated. A variety of devices, e.g., the Maxim DS1813, exist to handle this requirement. Don’t use a battleship to sink a rowboat.
I was using a DS1813, and I replaced it with the DS1511. The reasoning was fairly simple, I added the DS1511 to get a real time clock, when I realized it had a reset circuit built in, I didn't feel it made sense to keep the DS1813 AND the DS1511 around. The extra flops are/where to count out clock cycles; general indication is this is over kill so I've removed these.
I'd still like to tie the DS1511 into the reset circuit somehow, the watchdog timer in the datasheet looks like it could be very handy if my code should ever hang; I'll consider more about this.
I'm also considering if it would be worth while adding some sort of counter (e.g. a second 65C22) off the square wave as a high resolution timer.
Quote:
[*]Also as flooby noted, the reset connection of the DS1511Y is open collector and does not respond to a pushbutton. The 1511’s reset output is meant to be used under software control, usually by the device’s watchdog timer, to reset the MPU in the event of a crash. I recommend you pull that reset pin up to VCC through a suitable resistor and ignore it.
Yep, bad thinking on my part, removed.
Quote:
[*]Diode D1 is superfluous. In fact, unless you plan to use the DS1511Y to generate IRQs, don’t bother with connecting its IRQ output.
Not sure if I will or not, I might; going to go ahead and connect it to the interrupt line for now, and If I need to remove it later I can just break the trace (or use a jumper, which I think is what flooby recommended)
Quote:
[*]Further to another of flooby’s recommendations, simplify your power supply. I use a PC power supply to run my POC units, but then, I also have some hard disks and a CD drive hooked up to the system. So I need the 12 VDC output and the amps that go with it. Your unit won’t be all that power-hungry and will only need 5 volts to run everything.
I've removed the ATX power connector; I will point out though that I was considering the idea of connecting an old IDE DVD drive to act as a CD-ROM. That will likely wait until I start moving into the 65816 though.
Quote:
[*]The 16550 UART is not a good choice, in my opinion, as it has a hardware defect that prevents the receiver FIFO from working as it should. If you are going to use the 165xx series, at least use the 16550A or newer. As you will soon discover, the 165xx UARTs can be a pain in the derrière to program.
A better choice would be the NXP 26C92, 28L92 (obsolete but still available in some places) or the equivalent Exar 88C92. These devices are dual UARTs will a friendlier design and features that are lacking in the 165xx series.
D'OH! I didn't catch that, the original drawing is not correct, I'm using a 16C550C. I forgot to change the numbers in my drawing, fixed.
I also ditched the MAX per flooby's suggestion.
Quote:
As Garth recommended, you should study his 6502 primer from start to finish.
I've re-read this. I hope I didn't miss any of the finer points, time will tell.
I have added some 245s for the bus, which I'm sure someone will probably call me out on. I know the primer suggested NOT adding these because why would you want to add more gate delays; but I'm not sure what else I plan on connecting in the future and I imagine I can only drive the pins off the 6502 so far.
Quote:
Proxy wrote:
Eh I wouldn't recommend clock stretching on a 65C02 as it requires extra circuitry and you already have a CPLD that you could use to drive the RDY pin with (through resistor of course as RDY is bidirectional)
The resistor wouldn’t be necessary, since he has a blocking diode in the
RDY circuit, which is actually better.[/color]
Clock stretching or using RDY pin for a delay, either way; sounds like the ready pin is the easier route, so I'll work on that adding that next.
Attached is the updated PDF. As before this is a living document so I expect I'll be changing it again before long.
Thanks for the feedback guys! It's been very helpful.