[sdiy] Looking for an ADC

rsdio at audiobanshee.com rsdio at audiobanshee.com
Fri Apr 28 10:19:21 CEST 2017


On Apr 27, 2017, at 7:36 AM, Tony Kalomiris <weplar at gmail.com> wrote:
> My first sampler 'design' was the 1-bit tape in on the Apple ][+ ;) (See E&MM "Dodolator")
> 
> Tony

Same here (but I haven't heard of the Dodolator).

The Apple ][+ can read the binary state of the tape input, but can only toggle the state of the speaker output, i.e., there is no direct access to set the output value to a known state. I wrote an assembly program that was the tightest loop that could read the tape input, compare it to the previous value, and toggle the speaker whenever the tape input changed state. This reproduced the input waveform, with a 50/50 chance that the polarity might be reversed but that's good enough. With the 1 MHz 6502, the sample rate was high enough to make music intelligible, albeit extremely distorted - nice and crispy!

Rewriting the loop to store the data into RAM for later playback involved adding enough cycles to the loop that the sample rate dropped significantly. Unfortunately, this meant that the intelligibility of the recording suffered too much, especially given how horrible it sounded to start with.


The next step was inspired by an article that suggested using the potentiometer inputs for A/D. That hardware involves a capacitor and a comparator. The 6502 simply timed how long it took to discharge the cap, and this corresponded to the voltage. The standard routine stops as soon as the cap is discharged, which means that the sample rate changes with the voltage. I modified this to make the loop keep going for the same number of cycles no matter what the voltage was. This reduced the maximum sample rate, but at least kept things at a constant sample rate.

The article also had a simple circuit for a 4-bit resistor ladder D/A using spare Apple ][+ I/O pins. The combination allowed for 8-bit recording and 4-bit playback. This was enough for me to record my sister's voice with enough resolution to hear the reverb in our family dining room (where the computer lived at that time, for some reason).


After that, I built the S.A.M. (Software Automatic Mouth) speech synthesizer 8-bit DAC from the schematic in the manual, and went to Radio Shack to pick up an 8-bit ADC in an 8-pin chip with serial output. The Application Notes from Radio Shack showed interfacing for the four popular 8-bit processors of the time, but they all used a routine that read one bit at a time. This was basically bit-banging the serial interface on a 1 MHz CPU, and I knew that wouldn't be fast enough for a good sample rate. So, I designed a circuit with a counter, serial-to-parallel shift register, and 8-bit latch transceiver. With this, the CPU could trigger a conversion and then later read the entire 8-bit value over the parallel bus. I eventually coded a 6502 assembly oscilloscope with waveform sync.

I much recommend the parallel output ADC chips over these serial chips, but being in high school means you can't really afford to buy anything that's not stocked at the local Radio Shack and then shoehorn it to fit the application. These were the days when you could get a 4096 bin BBD at the local mall.


At one point, I had an 8-bit digital delay with around 40 KB of memory and crude 6 dB attenuation on the feedback / regeneration. Manual LFO of the delay time was enough to get some interesting comb filter sweeps going.

Brian





More information about the Synth-diy mailing list