Chip Parade (Part 10)
Simply years ahead
Robert Penfold discusses applications and specifications for a range of digital and analogue convertors.
As microprocessors and microcomputers play an increasingly important role in electronic music, so do computer peripheral devices that not so long ago would have seemed totally irrelevant in this field of electronics. Analogue to digital converters (ADCs) and digital to analogue converters (DACs) are two types of device in this category. Microprocessors are purely digital circuits, but sounds are analogue in nature. A digital to analogue converter can be used to convert the digital output of a microprocessor system into an analogue signal, or an ordinary audio output in other words. An analogue to digital converter provides the opposite function and can convert an audio signal into a digital signal that can be processed by a computer or microprocessor system. In an electronic music context the processed signal would then be fed back out to a DAC to give an audio output, having perhaps changed the pitch of the sound or altered it in some way.
In fact a system of this type can be used as a straightforward recording system with, say the sound of a cymbal being digitized via an ADC and stored in a ROM, and then played back at will. This is a rather complex way of doing things, but enables quite complex and difficult sounds to be accurately synthesized. A variation on this method is to record a short sample of a sound, and to then replay this in a loop to give a continuous output signal. An envelope shaper is then used to give a signal with suitable attack and decay characteristics. The advantage of this system is that only a comparatively small amount of memory is needed to store the digitised sound signal, but it has the disadvantage of giving a slightly less accurate sound. Of course, with suitable software a microprocessor can synthesize sounds via a DAC without going through any recording process, but quite advanced software is needed in order to synthesize complex sounds in this way.
There is another common role for the digital-to-analogue converter in electronic music, and this is in a digital keyboard circuit. Some synthesizers (the SCI Pro 1 for example) have a digital keyboard, but a circuit that is in other respects totally analogue. A digital to analogue converter is used to convert the value returned from the keyboard scan into a corresponding control voltage. This may seem to be a rather over-complicated way of doing things, which it is if operation only from a keyboard is required. However, if sequencing is required it is easily added into this system, which is then the most simple and sensible way of doing things.
An allied use for a digital-to-analogue converter is as part of an interface between a home-computer and an analogue synthesizer. Here the digital output of the computer is processed by the converter to give a suitable output for the CV input of the synthesizer. An interface of this type for the ZX81 was described in an article in the January 1984 issue.
Digital delay lines are becoming increasingly popular, and these do, of course, use an ADC at the input of the circuit and a DAC at the output.
There are a great many DAC and ADC chips available at present, and amongst the eight bit types the Ferranti range is perhaps the most useful and popular. The basic digital-to-analogue converter of this range is the ZN426, and the circuit diagram in Fig 1 shows the way in which this device is used.
There are eight digital inputs, but in music applications it is not always necessary to use all eight. For example, when driving the CV input of a synthesizer from a DAC it is common practice to use only six bits (giving 63 notes and a range of just over five octaves). In this case the two least significant inputs (pins nine and 10) are not used and are simply connected to the 0V supply rail. The ZN426 does not have latching inputs, and it must be fed from a latching output port — not direct from the data bus.
Internally the ZN426 has a precision reference voltage source plus an R — W2R circuit. The latter is a resistor and switching network, and it is arranged so that taking an input of the device high causes the output voltage to be boosted by the appropriate amount. The ZN426 has a 2.55 volt reference voltage, and this sets the full scale output voltage at the same figure. This conveniently gives an output voltage that increments in 10 millivolt steps. For those who are unfamiliar with the binary numbering system the table given below shows the amount by which each input, when set high, boosts the output potential, and this should help to clarify matters.
Ferranti produce other DACs, including the ZN428. This is in many ways similar to the ZN426, and it is used in what is essentially the same circuit. However, the ZN428, as can be seen from the pinout diagram of Figure 2(a), has some additional terminals which make it a little more versatile than the ZN426. One obvious difference is the inclusion of separate ground terminals for the digital and analogue circuits. The circuit will operate properly with up to 200 millivolts between the two ground terminals, although in most applications these will probably just be tied to a common point in the circuit.
Perhaps of greater importance is the inclusion of the 'enable' input. The ZN428 includes an octal transparent latch on the digital inputs, and this enables it to be directly interfaced to the data bus of most microprocessor systems. Taking the enable input low places the latches in the transparent mode so that data at the inputs is coupled straight through to the converter. Taking the enable input high gives the latching action. In other words, a negative pulse from an address decoder is used to latch data from the data bus into the device. Like the other Ferranti analogue converters, the ZN428 is compatible with MOS, CMOS, and TTL logic devices.
Analogue-to-digital conversion is slightly more difficult than digital-to-analogue conversion, but the added complexity is mainly taken care of in the converter device and not in the discrete circuitry. There are several types of analogue to digital converter, but for electronic music applications the successive approximation type is probably the most suitable. Devices of this type can provide a suitably high conversion rate for audio signal digitizing, but are reasonably inexpensive.
With the successive approximation technique the input signal is compared with the output of a digital-to-analogue converter. Initially the most significant bit of the DA converter is set high, and all the others are set low. If the output of the converter is at a higher voltage than the input signal the most significant bit is set low. Otherwise, it is left high. Next bit six is set high, and again the comparison process takes place with bit six being set low if the output of the converter is at a higher potential than the input signal. This process is repeated for bits five to 0 until all eight bits have been set at the correct levels, and the digital input levels to the DA converter then provide the digital outputs of the AD converter.
The Ferranti range of converters includes a relatively recent successive approximation AD converter, the ZN447. There are two other devices (the ZN448 and ZN449) which are identical, but have lower guaranteed accuracies. The accuracies of these devices are 0.25, 0.5 and 1 LSB respectively. For audio digitizing the accuracy of the ZN449 is perfectly adequate.
The circuit diagram of a simple analogue-to-digital converter based on the ZN447 ZN448 or ZN449 is shown in Fig 3. Apart from the eight outputs to the computer or microprocessor system there are three other connections, although not all of these may be needed. The aptly named start conversion input must be provided with a brief negative pulse to start a conversion. The end of conversion output then goes low, but returns to the high state once the conversion has been completed. By monitoring this output the system can be made to avoid reading the converter during a conversion. It is not essential to use this output since a conversion takes nine clock cycles, and a timing loop for this period after the start conversion pulse will provide a suitable hold off. The enable input is taken low when data is to be read from the circuit, and this is fed with a negative pulse from the address decoder if the eight outputs are fed direct to the data bus. This input is simply tied to the negative supply rail if the converter is interfaced to the host system via a PIA or some similar interface device.
The ZN447 series of converters have a built-in clock oscillator, and the only discrete component required for this is C1. The value of this component controls the clock frequency, and the specified value gives operation at approximately 1 mHZ, which is the highest guaranteed operating frequency for these devices. This enables a conversion rate in excess of 100,000 per second to be achieved. R1 and C2 are the discrete components in the voltage reference circuit, while R2, R3, and RV1 bias the input of IC1 for bipolar operation. RV1 is adjusted to give an output reading of 128 with no input signal applied to SK1. An input of 2.55 volts peak to peak is needed to fully drive the circuit.
A small negative bias must be applied to pin 5 of IC1, and this is provided by a simple oscillator, rectifier, and smoothing circuit based on IC2.
The ZN427E is a popular analogue-to-digital converter from Ferranti, and it is in many ways similar to the ZN447 series. The main difference is the lack of an integral clock oscillator. Also, the maximum guaranteed usable clock frequency is somewhat lower at 600kHz, although this still permits up to about 66,000 conversions a second to be achieved. Pinout details of the ZN427E are provided in Figure 2(b).
Feature by Robert Penfold
mu:zines is the result of thousands of hours of effort, and will require many thousands more going forward to reach our goals of getting all this content online.
If you value this resource, you can support this project - it really helps!