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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

DIGITAL HARDWARE<br />

599<br />

MOST SIGNIFICANT<br />

10 BITS OF N<br />

REF. IN<br />

RAW<br />

SAWTOOTH<br />

CONSTANT<br />

>----.....- AMPLITUDE<br />

OUTPUT<br />

(AI<br />

( B)<br />

Fig. 11-8.<br />

Digital divider waveshaping circuits. (A) Generating a sawtooth<br />

wave. (B) Compensating a sawtooth from a divide-by-N oscillator.<br />

increased at higher frequencies by deriving it from a DAC connected to the<br />

most significant frequency control bits. For a divide-by-N frequency source,<br />

a multiplying DAC could be placed in the feedback path <strong>of</strong> an op-amp to<br />

provide reciprocal compensation.<br />

Along these same lines, a square-wave output can be integrated into a<br />

triangle wave, and a multiplying DAC can be used to raise the integrator<br />

gain at high frequencies. Two variable integrators in a state-variable low-pass<br />

configuration can filter a square wave into a reasonable sine wave as well. The<br />

2040 integrated voltage-controlled filter can do both <strong>of</strong> these jobs quite well<br />

and can be driven directly from a current output DAC.<br />

Although these essentially analog methods do work, they seem to<br />

defeat the whole purpose <strong>of</strong>going digital in an oscillator module. Much more<br />

flexible waveshaping can be had by implementing some <strong>of</strong> the techniques<br />

discussed in Chapter 13. In the example <strong>of</strong> accumulator division given<br />

earlier, the most significant 8 bits <strong>of</strong> the register were implemented as a<br />

binary counter, which counted through everyone <strong>of</strong> its states every cycle. If<br />

an 8-bit DAC is connected to the counter, a sawtooth wave with amplitude<br />

independent <strong>of</strong> frequency would emerge. One could also construct logic to<br />

implement all <strong>of</strong> the direct waveform computation methods detailed in<br />

Chapter 13 such as triangle and sine conversion as well.<br />

Another possibility is table lookup shaping followed by digital-toanalog<br />

conversion and filtering to get an analog output. In hardware, this is<br />

accomplished by placing a read-only memory (ROM) between the accumulator<br />

divider and the DAC as in Fig. 17-9. The ROM functions exactly like a<br />

MOST<br />

SIGNIFICANT<br />

B BITS OF<br />

ACCUMULATOR<br />

DIVIDER \<br />

256-WORD<br />

BY B-BIT<br />

READ-ONLY<br />

MEMORY<br />

8-BIT<br />

DAC<br />

ANALOG<br />

OUTPUT<br />

"-------------J \<br />

ADDRESS<br />

INPUT<br />

DATA<br />

OUTPUT<br />

Fig. 17-9. Digital waveshaping <strong>of</strong> digital oscillator

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

Saved successfully!

Ooh no, something went wrong!