Home -> Magazines -> Issues -> Articles in this issue -> View
Chip Parade (Part 10) | |
Article from Electronic Soundmaker & Computer Music, June 1984 |
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.
Bit Number | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
Millivolts | 10 | 20 | 40 | 80 | 160 | 320 | 640 | 1280 |
By setting the inputs at the appropriate states any output voltage from 0 to 2.55 volts in 10 millivolt (0.01 volt) increments can be achieved. Any digital system provides only a limited number of levels, and therefore limited accuracy. In theory the ZN426 has a maximum error of five millivolts with the required output voltage falling exactly halfway between two of the device's output levels. In practice there is inevitably slight non-linearity in a DAC which reduces accuracy (but not resolution) slightly, but this is usually very small (plus and minus 0.5 LSB for the ZN426). For a very high degree of precision a 14 or 16 bit circuit is needed, but for most applications a good quality eight bit circuit is adequate. The chances of an 0 to 2.55 volt output being suitable for a practical application where a DC output is required are, to say the least, slim. In most cases the output will either need to be attenuated using a simple two resistor network, or as in this circuit amplified.
IC2 is used as a straightforward non-inverting amplifier having its voltage gain adjustable by means of RV2. With the specified values a full scale output voltage of between about four and 12 volts can be achieved, RV1 is the offset null control, and this is adjusted to give zero volts at the output with all the digital inputs set low.
If the circuit is used to provide an audio output signal it would in most cases be acceptable to simply take the output from pin four of IC1 by way of a coupling capacitor. The maximum output voltage is then 2.55 volts peak to peak. Of course, the output is a stepped waveform, but low-pass filtering can be used to smooth out the steps to give a normal audio output signal. Changes in output potential need to occur at a fairly high frequency in order to give satisfactory results. They need to occur at a minimum of double the maximum input frequency, and preferably at about three times this figure. This gives a frequency of around 40 to 60kHZ in order to accommodate the full audio bandwidth. It can be seen from this that quite a large amount of memory is needed in order to store even a few seconds of full bandwidth, digitized audio signal (around 40 to 60k per second in fact). The ZN426 has a settling time of typically (1 us) which is more than adequate for audio use.
R1 and C1 are discrete components in the reference voltage generator. An external reference voltage of between 0 to 3 volts can be connected to pin 5 of IC1, but the internal voltage source is a high quality type which should prove to be more than adequate in practice. A useful feature of the ZN426 is its low current consumption of only about five milliamps.
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).
Read the next part in this series:
Chip Parade (Part 11)
(ES Jul 84)
All parts in this series:
Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7 | Part 8 | Part 9 | Part 10 (Viewing) | Part 11
Technically Speaking |
Powertran MCS1 - Playing with Time (Part 1) |
Fader-Panner Project |
Multi-waveform LFO |
Short Circuit |
Add Muting, Decay/Release Isolation and/or End of Cycle Triggering to Your 4740 |
The Miniblo |
Workbench - Modifying The Midiverb |
Lab Notes: The Polyphonic Synthesizer |
Lab Notes: Potpourri & The Apple Connection |
The Spectrum Synthesiser (Part 1) |
Workbench - Lighting Effects on Stage — Update |
Browse by Topic:
Topic:
Series:
Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7 | Part 8 | Part 9 | Part 10 (Viewing) | Part 11
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!
New issues that have been donated or scanned for us this month.
All donations and support are gratefully appreciated - thank you.
Do you have any of these magazine issues?
If so, and you can donate, lend or scan them to help complete our archive, please get in touch via the Contribute page - thanks!