22.09.2015 Views

of Microprocessors

Musical-Applications-of-Microprocessors-2ed-Chamberlin-H-1987

Musical-Applications-of-Microprocessors-2ed-Chamberlin-H-1987

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

590 MUSICAL ApPLICATIONS OF MICROPROCESSORS<br />

Analog Module Replacement<br />

In many cases, digital techniques and circuitry can replace analog<br />

circuitry wi th the substantial advantages that have been described earlier.<br />

One <strong>of</strong> the biggest potential advantages in this role, however, is the ability <strong>of</strong><br />

digital logic'to multiplex itself among numerous channels. Modern logic is so<br />

fast that in many cases it would just be loafing when used to implement a<br />

single function. The surplus speed along with a small amount <strong>of</strong> memory can<br />

instead be used to simulate several independent modules using only one set <strong>of</strong><br />

somewhat more complex logic. The per-function cost is then reduced, <strong>of</strong>ten<br />

considerably below that <strong>of</strong> an equivalent quantity <strong>of</strong> analog modules. Digital<br />

oscillators, which will be discussed extensively in the following paragraphs,<br />

lend themselves well to multiplexed operation. It is not difficult to have one<br />

logic board perform the funnion <strong>of</strong> 16 or more functionally independent<br />

oscillators!<br />

Simple Digital Oscillator Module<br />

Enhanced frequency accuracy and greater waveform variety are the<br />

leading advantages <strong>of</strong> a digital oscillator over a conventional voltagecontrolled<br />

type. The oscillator we will be discussing initially accepts a<br />

single-word digital input that controls frequency and produces a single<br />

analog output. The oscillator may be used as a stand-alone oscillator module<br />

or may be part <strong>of</strong> a larger voice module.<br />

The most fundamental part <strong>of</strong> the oscillator is the variable-frequency<br />

source. Basically, all digital oscillators share one common trait in this area:<br />

they take a fixed, crystal-controlled, high-frequency clock and divide it down<br />

to a useful range under the control <strong>of</strong> a digital word. There are at least four<br />

distinct ways <strong>of</strong> doing this, each with a set <strong>of</strong> advantages and disadvantages.<br />

For the purposes <strong>of</strong> illustration, we will assume that the goal is to generate<br />

frequencies in the audio range with infinite frequency resolution and perfect<br />

short-term as well as long-term frequency stability.<br />

Divide-by-N Frequency Generator<br />

The most obvious frequency generator is the divide-by-N counter. The<br />

circuit merely accepts the fixed frequency reference, F, a digital number, N,<br />

and produces an output frequency <strong>of</strong> FIN Hz. Any number <strong>of</strong> logic schemes<br />

can be used to implement the divide-by-N, and they are all quite inexpensive<br />

and easy to understand. Figure 17-1 shows one that requires only counter<br />

blocks (plus one two-input gate) and is indefinitely expandable. The idea is<br />

to load N into the counter at the beginning <strong>of</strong> an output cycle and count up<br />

to all ones on successive clock pulses. When the counter overflows, N is<br />

loaded again and the cycle repeats. The actual division factor is 2 M - N , where<br />

M is the number <strong>of</strong> counter bits. If the twos complement <strong>of</strong> N is supplied,<br />

however, the circuit indeed divides by N.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!