Hardware
Hardware implementation could be one of the following:
A desktop computer equipped with a sound card.
Stand-Alone DSP System
A stand-alone DSP system consists of an Analog-to-Digital Converter (ADC), a digital signal processor (which could even be a microcontroller), and a Digital-to-Analog converter (DAC). A stand-alone system should be used if the system is a dedicated effects processor, such as a digital delay unit. A stand-alone system can be portable, feature a serial link to allow it to be controlled by a PC (or a MIDI device), or mount onto a rack.
Analog-to-Digital Converter
The ADC used will depend on the system requirements. For good (CD) quality sound, a 16-bit ADC with a max sampling rate of at least 44.1kHz is required (about 22 microseconds conversion time). However, an 8-bit ADC with a sampling rate of at least 44.1kHz won't sound too bad, and for radio-quality sound, 8-bit at 22kHz would do. A sampling rate of 11kHz will result in telephone-quality sound, which just doesn't cut it.
Various chip manufacturers produce complete ADC units on a single IC, that allow easy interfacing to a signal processor. Also, complete A/D subsystems are available from some manufacturers (at a price). Some chips have both an ADC and a DAC in one package. Here are a few ADC packages:
| Type | Bits | Speed (us) | Price (plastic 100 pcs) ($) |
| ADC0844 | 8 | 40 | 3.85 |
| ADC0831 | 8 | 32 | 2.70 |
| TLC548 | 8 | 22 | ?? |
| AD670 | 8 | 10 | 6.00 |
| AD7575 | 8 | 5 | 5.50 |
| ADC71 | 16 | 50 | 63.00 |
| ADC76 | 16 | 15 | 100.00 |
| CX20018 | 16x2 | 9 | 18.00 |
The Sony CX20018 dual-channel digital audio ADC is a good option (remarkably cheap). Note: the prices are quoted from the book The Art of Electronics by Paul Horowitz and Winfield Hill (1993).
As an alternative to buying an ADC chip, consider building one yourself. A simple successive approximation ADC will usually do the job as well as the expensive ADC chips. A successive approximation register (SAR) chip will simplify the job, although it is possible to design the SAR using discrete components, or better yet, using a programmable device (PAL device).
Signal Processor
The signal processor used to perform the audio effects is critical. Factors to consider when choosing a processor is cost, speed, no. of bits, features (such as interrupts, DMA), on-board RAM and external memory space, and development software.
For a 16-bit system, it obviously needs to be a 16-bit processor (16-bit arithmetic & data) capable of processing samples fast enough to output them on the DAC at a sampling rate of at least 22kHz for acceptable sound quality. To enable this, the signal processor must have at least one hardware interrupt and a timer interrupt. The hardware interrupt will service the ADC when a conversion is complete, and the timer interrupt will service the DAC when a sample needs to be output. The processor must be capable of multiply (thus most RISC microcontrollers can't be used, unless an FPU is used), except in the case of effects such as echo and octaving. In some cases, lookup tables can be used as a substitute for multiplication which results in faster executing code.
Processing time is limited to about 22 microseconds for 44kHz sampling frequency, or at worst 44 microseconds (for 22kHz sampling). Thus, at 44kHz sampling, a processor with a 1 microsecond instruction cycle can at most perform only 22 instructions (assuming the instructions take 1 cycle to complete). For example, the Intel 8031 (a very cheap, 8-bit microcontroller) using a clock frequency of 12MHz has a 1 microsecond instruction cycle. The PIC 16C84 microcontroller is a fast, very cheap 8-bit RISC chip from MicroChip, with an instruction cycle of 400ns using a 10MHz clock. However, this chip does not have a multiply instruction. These chips are useful for implementing echo since echo does not require multiplication, or complex processing. I am currently working on a very cheap, 8-bit digital delay unit based on the Intel 8031 microcontroller chip.
The processor will need program and data memory. For a digital delay unit, working at 8-bits with a sampling frequency of 22kHz, 2 seconds of delay will need 44kb of data memory. A 32kb SRAM chip can be used, giving slightly less than 1.5 seconds of delay (which is adequate). Program memory is generally not a problem since EPROM is cheap and the programs are usually so tiny they'll probably fit in the internal EPROM memory provided with many processor chips. If lookup tables are used, more program memory will be needed.
A DSP chip would be ideal for this application, as these chips satisfy all the above requirements. DSP chips are lightning fast, feature single cycle floating point arithmetic, DMA for processor-independent data transfer (from ADC/to DAC), hardware and timer interrupts, large addressable memory space, etc. DSP chips such as the Intel 8096 or 80196, and Texas Instruments TMS320 series DSP chips are ideal. However, these chips are surface mount devices (SMD) and thus complicate the process of building the hardware. Another problem with these chips is that they are very expensive (esp. for hobbyists like me). You could consider using DSP evaluation boards.
Another chip I considered for signal processing was the Intel 8088 chip.
This chip is a 16-bit microprocessor, and the internal architecture and
instruction set is well understood. A nice feature of this chip is that it
has a minimum mode of operation, in which it becomes an almost stand-alone
chip, requiring very few support chips. It generates it's own bus signals
in this mode, thus doing away with bus controllers. This feature makes it
easy to build a motherboard for this chip. It can address up to 1 megabyte
of memory, and has multiply and divide instructions. The chip can be made
to boot off EPROM. The programs can be programmed using a standard 8086
assembler, converting the resultant EXE file to a binary file using the EXE2BIN
utility that comes with Microsoft's MS-DOS Operating System, and then finally
converting the resultant BIN file to the Intel HEX file format using a BIN2HEX
utility that is available on the Internet. The HEX file can then be downloaded
into the EPROM.
The problem with using the 8088 chip is that the chip's instruction cycle
is way too slow for signal processing.
Digital-to-Analog Converter
There are various DAC chips available, and they are considerably cheaper than the ADC chips. Some ADC chips, such as the Sony CX20018, contain a DAC (or two) as well, and thus a seperate chip would not be needed. Some factors to consider when choosing a DAC chip are resolution, speed (usually not a problem), internal/external voltage reference, whether the DAC is current output or voltage output (current output chips are generally faster), and of course, price. Here are some popular DAC packages:
| Type | Bits | Speed to MSB/2 (ns) | Price ($) |
| AD7225 | 8x4 | 5000 | 18.00 |
| AD558 | 8 | 1000 | 6.00 |
| DAC0830 | 8 | 1000 | ?? |
| AD7528 | 8x2 | 350 | 6.00 |
| AD569 | 16 | 6000 | 28.00 |
| DAC71/72 | 16 | 1000 | 45.00 |
| PCM54 | 16 | 350 | 11.00 |
The PCM54 digital audio DAC is a good option (cheap). Note: the prices are quoted from the book The Art of Electronics by Paul Horowitz and Winfield Hill (1993).
A simple R-2R resistor ladder network can also be used to do the job. This is a very much cheaper option, however, be careful when building a DAC yourself. To maintain (all 16-bits of) accuracy, an accurate reference voltage should be used. Don't use the voltage levels from the latches to drive the resistor network as these voltage levels are not accurate. Also you may need to shield the circuit carefully from the electrical noise of surrounding cards and the motherboard.
DSP Evaluation board
The problems encountered in the previous hardware implementation method can be overcome by using a DSP evaluation board that contains the ADC, DSP processor, and DAC on one board. The boards are usually equiped with the neccessary hardware allowing the DSP chip to be programmed from a PC and usually comes with plenty of powerful development software. The problem with using a DSP evaluation board is that the boards are usually very expensive. Check out DSP net for more information.
Desktop Computer
The widely-used personal computer can be used as a signal processor. This allows the design to become a commercially viable product, and the PC has plenty of development software and is well supported with the necessary hardware. Furthermore, the processors available today have blazing performance characteristics.
ADC and DAC hardware
The PC has support from many companies who manufacture sound cards. Some of the more popular sound cards available are the SoundBlaster 16, SoundBlaster AWE 32 (these are virtually standard hardware for most PC's nowadays), and Gravis UltraSound (GUS). Many other soundcards exist, and a large percentage of them are compatible with the aforementioned sound cards. These sound cards support full duplex (simultaneous input and output), 16-bit digital sound samples, dual 16-bit ADC converters capable of up to 44.1kHz sampling rate, and 16-bit DAC chips.
Alternatively, a sound card can be built for the PC using ADC and DAC chips. Note that the Soundblaster cards do not support direct reading/writing of 16-bit samples on the DAC/ADC. The implication of this is that for a real-time system, only 8-bit processing can be implemented. This is because the PC is equipped with only 2 DMA controllers, and one of them is 8-bit, and DMA has to be used for 16-bit transfers. You would thus need to build a card that supports direct 16-bit transfers that you can use in conjunction with the SoundBlaster, which is what I am doing for my final year project. I am designing a 16-bit ISA DAC card to support 16-bit direct output, while a SoundBlaster 32 will be used for 16-bit DMA input.
You could alternatively get a soundcard that supports direct 16-bit transfers (are there any??).
