Making slow stuff work in fast systems
Posted: Tue Mar 24, 2020 7:22 pm
I have been dealing a lot with trying to get good and easy to use devices working in systems that run at speeds those devices were never intended for. Sometimes it's pretty easy, as it was with the MCP14495 hex decoder driver, and sometimes it's a bit harder. I'm still working on some devices and may never succeed, but I did have some success with the ADC0804N analog to digital converter. It will now work with 65C02s running at 16MHz just dandy. Here's how I did it - comments are welcomed and encouraged.
The ADC0804N requires the /WR and /RD pulses to be a minimum of 200ns wide. I was able to push some examples to run on 2MHz systems hanging them directly off the CPU buss and qualified control lines, but beyond that they just quit. In the circuit above, a write to the device address will trigger 1/2 the 74HCT123 to produce a 220ns pulse which is directed to the the /WR input on the ADC. This begins the conversion. Once the conversion is complete it drives the /INT line low which triggers the other half of the dual one-shot to produce another 220ns pulse. This pulse is then used to drive both the /RD line on the ADC and the clock input of the 74AC574, giving the ADC enough time to guarantee valid output data before the rising edge transfers the data into the 574.
The whole thing takes a maximum of 120us, so you must wait that length of time between initiating the conversion and reading the 74AC574. Since the entire activity is asynchronous from the CPU's perspective, this solution should work on any system that produces a write pulse long enough to be recognized by the 74HCT123. Which is typically about 2.5ns (17ns max) at 24C.
The ADC0804N requires the /WR and /RD pulses to be a minimum of 200ns wide. I was able to push some examples to run on 2MHz systems hanging them directly off the CPU buss and qualified control lines, but beyond that they just quit. In the circuit above, a write to the device address will trigger 1/2 the 74HCT123 to produce a 220ns pulse which is directed to the the /WR input on the ADC. This begins the conversion. Once the conversion is complete it drives the /INT line low which triggers the other half of the dual one-shot to produce another 220ns pulse. This pulse is then used to drive both the /RD line on the ADC and the clock input of the 74AC574, giving the ADC enough time to guarantee valid output data before the rising edge transfers the data into the 574.
The whole thing takes a maximum of 120us, so you must wait that length of time between initiating the conversion and reading the 74AC574. Since the entire activity is asynchronous from the CPU's perspective, this solution should work on any system that produces a write pulse long enough to be recognized by the 74HCT123. Which is typically about 2.5ns (17ns max) at 24C.