gk16-11 Tone-Clock-Octave Selector
Revised 11-26-07 (If you did the earlier version, I'll give you extra credit)
20 points
OEES 235
![]() |
|
For this
project, you'll be designing a block that accepts a binary number and
then outputs a clock signal whose frequency increases by one octave for each
increment in the binary number. This clock signal will be used to run
the square wave generator that creates the output of the tone
translator, and it will provide any octave shifting needed.
Here's an example of what this project's circuit should do:
By the way, the Lowest C on
a
piano keyboard is 32.7 Hz and the highest C is 4186 Hz. We're going to
go one octave below this lowest C, which is 16.35 Hz. We won't be able
to reach the 4186 Hz C, but we will be able to reach the B just below
it (3951 Hz). I'm guessing we'd rather be able to hit the notes
below 32.7 Hz rather than the ones 4186 Hz and above. If it turns out
that my guess is wrong, we could either expand the octave range later,
or switch the range to 32.7 Hz - 4186 Hz. After all, changes are easy
to make on a PLD (programmable logic device).
Remember that for a binary counter, the low-order bit gives you a frequency half that of the clock. The next highest-order bit gives you a frequency one fourth that of the clock. And, the next one gives you one eighth the clock frequency, etc. Thus, as you go to higher- and higher-order bits, the octave goes down one step each time. In order to determine how many bits you'll need, write down the binary weights until you get to 128. In other words, write down 1, 2, 4, 8, etc., multiplying by two each time until you reach 128. The number of weights you write down is the number of bits you'll need. The binary number coming into this project's circuit on the OCQ lines will go to the select lines of the multiplexer, and the multiplexer's inputs will be connected to the counter's outputs. Thus, for each binary value put on the the multiplexer's select lines, the multiplexer will select a certain output line of the counter and then send it out on the multiplexer's single output line. The OCQ bus shown in the waveforms above is composed of OCQ0, OCQ1, OCQ2, etc. Right-click here to get the test vectors. The test vector file contains a large number of clock pulses, as you can see from the solid line shown in the waveforms at the top of this page. (The line is solid because the clock pulses are too close together at this magnification.) In the test vector file, the OCQ values start at 7 and then go 6, 5, 4, 3, 2, 1, 0. As the OCQ values decrease each time by one, you should see the period of TONECLK double. (In other words, the frequency will be halved each time.) You'll need to use the magnifier tool to see the waveforms at the beginning, and then you'll need to zoom out to see the ones at the end. There's no need to actually count the number of clock pulses. As long as your waveforms look like the ones shown at the top of the page, you're done. |