Thank you Garth and Jeff for seeing me through!
The major flaw in my calculation was taking 215ns from the datasheet and not the 250ns my clock circuit actually produces.
Dr Jefyll wrote:
I don't know which 6522 datasheet you're referring to
Datasheet MOS VIA 1977 from 6502 archive, and of MOS 6551 ACIA also from there. For now I only possess the ACIA, but the datasheet speaks of the same timing requirement of 90ns.
Dr Jefyll wrote:
-- many different manufacturers source 6522s -- but it sounds as if the pertinent device may not be fast enough for guaranteed operation within this roughly-calculated 100 ns margin. It may (and probably will) work, but operation can't be guaranteed (due to variations in manufacturing process, supply voltage and temperature). If your 6522 needs the register select inputs valid 90 ns before the start of Phase2 then that issue will be OK, given that the RS inputs typically connect directly from the CPU address outputs. But if 90 ns is also the specified setup for CS and /CS then you have a problem, since you'll have some address-decode logic that must process the address before outputting a chip-select signal to the 6522. Your options include slowing the CPU clock or selecting a faster-rated 6522 even though you plan to run it at only 2 MHz. What matters is satisfying its spec for setup time etc.
Let's see how they do it in CBM 610 - 6509 & 6551 running at 2MHz system speed. (Why didn't I have that idea earlier??)
http://www.6502.org/users/sjgray/computer/cbm2/cbm2-schematics-8256043-bl.pdfACIA-CS comes out of 74S138 which depends on another 74S138 which in turn depends on a 74S241 line driver. ACIA-phi2 seems to be the undelayed phi2.
*woops* - to me it looks like
phi1 250ns - TACC 150ns => 100 ns time left
ACIA datasheet says address must be valid 90ns before rise of phi2 - that would leave only 10ns for glue logic
My 138 datasheet lists a
typical delay of 18-27ns, so that is at least 54ns (and not taking into account delay in '241) => 46ns left for ACIA instead of 90ns.
(Maximum specs are 27-40ns - in those areas not much of the 100ns would be left...)
If your theory is right, and ACIA only needs RS-lines valid that early, even then the construction is hardly within spec. (Good that reality seldom knows about specs...)
What do I learn from this? MOS specs are bogus? MOS specs are a raw estimates and used only for preliminary orientation?
Dr Jefyll wrote:
Getting back to the 6509, I notice that, unlike 6502 and 'C02, it requires 6800-style clocking -- ie; two non-overlapping clock signals, with virtually rail-to-rail voltage swings.
For a 6800/6509 clock generator circuit I'd suggest using a fast CMOS family such as 74AC. This'll avoid sluggish rise & fall times which waste some of the cycle time.
For clock generation I copied the circuit of CBM 500
http://www.commodore.ca/manuals/funet/cbm/schematics/computers/p500/4256041-01of15.gif using LS02ALS. Which seems to work so far. (Don't ask me about the looks of rise and fall - no oscilloscope here.)
But that brings me to another question - but that rather should go to nostalgia: why did MOS drop/not use the clock generation inside 6502 using only one input clock? I can't imagine that they needed the die space so badly, and I can't imagine either what application would make it necessary to have it that way.
Dr Jefyll wrote:
Does anyone know of a better version of the 6509 datasheet? This one is terrible! I noticed several more errors, such as the absurd memory map, and the fact the timing diagram for writes repeatedly details a clock-low voltage as 2.0V rather than 0.2V. Also, the datasheet lists 1 MHz, 2 MHz and 3 MHz timing figures, implying that three different speed grades were available. But nowhere do I see a part-number scheme (such as -1, -2 and -3 or -A -B and -C suffixes).
I only have seen the one here in the archive. (But I didn't search for another one so far to be honest.)
(The part number scheme should be the one MOS used throughout all its 65xx parts: no appendix: 1MHz, A 2MHz, B 3MHz, C 4MHz).