6522 doesn't register input

For discussing the 65xx hardware itself or electronics projects.
gfoot
Posts: 871
Joined: 09 Jul 2021

Re: 6522 doesn't register input

Post by gfoot »

technifix wrote:
Is HC logic fast enough for 14MHz+ operation? One of my goals was to eventually have a small ROM read a small routine from an sdcard, jump there, disable the rom and clock stretching circuitry and copy a second stage kernel to upper RAM. I didn't want to have a ROM copy circuit (although I guess the clock stretch circuit adds enough components that only run for an instant). Basically with this setup I don't need to write a ROM every time I want to change something.
As an aside there, as plasmo has been suggesting in another thread, you might want to consider a programmable oscillator like the DS1086 which can be programmed to power-up at a low frequency but shift to a higher frequency on-demand. It is fairly easy to program and control using a few I/O pins and very flexible - so you can boot up slowly, with ROM enabled, and later disable the ROM and step up to a higher clock speed.

On the topic of logic families, I don't think there's a hard-and-fast answer to whether HC is fast enough at a given clock speed because it depends a lot on how complex your logic circuit is - both how deeply chained the logic is, and what type of logic gates you are using. You can look at the datasheets and add up the propagation delays for the critical paths in your circuit to work out whether HC is going to be fast enough, and you might find you only need to change one IC to a faster family.

Personally I tend to just use 74AHCT by default for faster circuits, as it seems to be quite easy to work with as well as being quite fast, so maybe a good compromise. My fastest 6502-based circuit was based on this, using 74AHCT32s to manage the clock signal and 74AHCT139s to generate OE/WE signals for the RAM, and this was able to run at >30MHz with 12ns RAM. But I used slower HC/HCT components for the I/O interfacing which was done at reduced clock speeds (less than 10MHz) - at those speeds I'm not very careful with exactly which I use, it's more based on what I happen to have stock of.
Quote:
I know about AC and other logic types, I just haven't checked to see if the chips I need each have an AC variant, and I know that AC is also more susceptible to noise.
If I want something faster than HC or HCT, I generally just look for availability in AHCT, AHC, ACT, or AC, and check the datasheets in case there are significant timing differences but usually any of these are within a few ns of each other as far as propagation delays are concerned.
User avatar
BigDumbDinosaur
Posts: 9425
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: 6522 doesn't register input

Post by BigDumbDinosaur »

technifix wrote:
Is HC logic fast enough for 14MHz+ operation?

Echoing what George says, it depends on how much cascading logic you use.  I’d be inclined to say “maybe”.  It seems from testing I’ve done with my logic analyzer that most jelly-bean logic being produced today is better-performing than what the data sheets would suggest.  So it is possible that 74HC will run okay at 14 MHz—type of construction may also be a factor.  However, my preference for logic at that speed would be 74AHC or similar.  The timing margins are much better, especially with devices such as decoders, which in 74HC logic tend to be on the slow side.

Quote:
I know about AC and other logic types, I just haven't checked to see if the chips I need each have an AC variant, and I know that AC is also more susceptible to noise.

74AC does have aggressive edges that can give rise to ringing problems, as well as VCC sag and ground bounce if the physical construction is dodgy.  Ringing can trigger instability if a low-going signal drives another device’s input significantly negative—undefined operation may occur.  Ringing with a high-going signal is rarely an issue as long as the lower limit of the resulting voltage excursions doesn’t go below the nominal CMOS logic 1 level of ~VCC × 0.7.  If that happens, the device receiving the signal might think multiple logic transitions have occurred; that sort of behavior on a clocked input can be particularly unwelcome.

That said, I have built several of my POC units with 74AC logic.  Every one of them has exhibited rock-solid stability at speeds varying from 12.5 to 20 MHz.

74AHC logic combines the very low propagation delay of 74AC with the less-aggressive edges of 74HC.  In most of our designs, 74AHC is a good choice, especially for breadboard or wire-wrap builds.  74AC is okay if you are building on a printed circuit board, especially if a four-layer PCB, which is what I use.  Trace routing will require some care.

Another fast logic family is 74FC(T), which again combines low prop time with gentle edges.  Logic variety isn’t as good as 74A(H)C, though, and much of it appears to be in SMT packages only.

You might also consider using a GAL as a single-chip glue logic solution.  When using purely combinatorial logic, a GAL will exhibit a very predictable and uniform prop delay, with parts available down to 7.5 nanoseconds.  Some logic analysis I’ve done with Atmel (Microchip) GALs indicated that they tend to perform better than the data sheet suggests (linked graphic is from a 7.5ns 22V10).  Although their outputs are specified as TTL, they will drive a lightly-loaded output up into the low four-volt range, sufficient for a reliable CMOS logic 1.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
LeighAH
Posts: 5
Joined: 27 Jun 2025

Re: 6522 doesn't register input

Post by LeighAH »

BigDumbDinosaur wrote:

A mistake occasionally seen with this sort of thing is using the Ø2 clock to qualify the 65C22’s chip select and read/write inputs.  That is incorrect design and depending on signal skew, the phase of the moon and the state of the stock market, may result in intermittent or no operation.
I can't thank you enough, this has brought me to the end of days of head-scratching, logic probing, oscilloscoping, rewiring, etc. I had adapted my design from running a peripheral directly from the data bus to instead using a 65c22 and it was producing the most baffling intermittent failures.
Post Reply