Wow, there was a lot more wrong with that than I was expecting! A few are face-palm worthy it-was-late-and-I-shouldn't-have-been-making-modifications-to-my-design-at-that-time (address decoding, for example, for which I already had a working and bread-board tested design). A lot of the others are rather more subtle.
Thank you all for the pointers. I'm pretty heavily engaged this week, so I'll be back to address several of them later, but I have a few follow on questions which I'll squeeze in now.
Quote:
using PHI1 is not generally a good idea as all the timing signals are specified against PHI2 and the delay between PHI1 and 2 is no longer guarenteed
I did test the timing (of one chip) using a scope, and found it to be damn close to 180 degrees, but I guess that's not really a good idea.
Quote:
On the RAM however, I am certain you will get spurious writes to bogus addresses during PHI2 low.
As I read it (and I am quite likely to be mistaken), the SRAM latches the address on the falling edge of /OE during on a write cycle, which (timing non-guarantees aside) would make PHI1 -> /OE a very convenient gate. The /OE to "ready to latch data" delay is advertised to be considerably shorter than the same delay from /CS so it seemed like a good idea, even if at the speeds I'm talking either would do...
I need to go back to the datasheet on that one, it was a long time ago I made that choice, and my reading of timing diagrams has improved somewhat in the interim.
Quote:
The IRQ outputs of the UART are open-drain
Oh, this is good news. I didn't find clarification in the datasheet (although the copy I have is a poor scan of a paper copy, and not being able to search the text is... less than convenient.
Quote:
The 65C52 ... inputs and outputs are TTL level
Damn, I overlooked that. Can anyone recommend a CMOS level alternative? Including converters would be a little... messy, esp from a routing PoV.
(edit): My datasheet says "Full TTL or CMOS input/output compatibility". That sounds... hopeful.
Quote:
I'm puzzled why you've decided to break out DTR on your serial headers instead of RTS?
I labelled the headers to match the FTDI breakout board I referenced in the original post. It comes from the Arduino world, where I believe a DTR signal is used to reset the microcontroller, making the bootloader available for sending a new program image. Thinking about it, this is probably not the standard usage. Perhaps I should just make the FTDI chips part of the main board and provide USB ports rather the relying on a pluggable breakout which might not be designed for exactly my purposes...
Quote:
You device selection circuitry is awkward and severely limits future expansion.
If you do have the time/energy, I'd be interested to hear your thoughts on how it might be improved (or just a pointer to some existing writings your aware of on "good address decoding practice").
The schematic as presented was also flat out wrong (I was holding an old memory map in my head and confusing the two when I wired it). My desired memory map is
$FFFF
8k ROM
8k IO
48k RAM
$0000
I had been considering a backplaned design so that I could iterate on different modules independently, and the idea was that the CPU board would provide that basic decoding, and then each IO board would perform a further address decoding of A10-12, gated by the IO_CS signal from the CPU board. That would give me 8 different IO "slots", with allocation probably hard-wired in to the IO boards.
I didn't expect the hard-wiring to be particularly limiting - I can't imagine 8 different classes of IO I'd attach to this particular model.
However, I scrapped that plan, mostly because the cost of PCB space for the connectors to the backplane on each board quickly eroded the expected savings from not having to re-print the whole computer if I want a new revision! But also because I've read enough here to know that it is
not recommended(TM) in spite of being very tempting.
Even at $5 per square inch for three copies (oshpark), PCBs are cheaper than ever, and well within my reach, but also cost more than all the other components combined! And three copies of a buggy board aren't much use...
So, the address decoding I presented (if corrected) was only ever intended to handle the one IO device and I was expecting to re-do it for any future revision which had more requirements. I'd be interested to hear how it might become more flexible, and how that flexibility might be exercised.
Thank you all for your thorough input. I'm especially glad that I decided to post, rather than re-check, order PCBs and hope!