For the tone
translator, period numbers for the highest octave on the piano keyboard
will range from 01DH to 042H. (H stands for hexadecimal.) The job of this circuit is (if
necessary) to shift the period number to the right until it is 042H
(0000 0100 0010 binary) or smaller. (Later, we will add circuitry to discard anything smaller than 01DH).
Once the period number has been shifted to bring it within the range of
the highest octave on a piano keyboard, the job of determining what
musical note (C, D, E, etc.) has come from the microphone will be much
easier. In one tone translator mode of operation, the closest accurate
musical note will be substituted for the actual frequency coming from
the microphone. The octave shifter circuit we've already developed will
then be used to shift this note to the desired octave.
- Before starting, right-click here to download the partial schematic shown above. You might as well download the test vector while you're at it by right-clicking here.
- The period number will be coming in on lines Q11 - Q0, and
LD_STHO is the signal that should load this number into the shift
register.
- We're using an 8-bit right-shift
register (SRR38) and a 4-bit right-shift register (SRR34) to form a
12-bit right-shift register. (Below, we'll refer to the two combined
shift registers as "the 12-bit right-shift register.")
- Notice that Q11 goes to D0 on the 4-bit shift register.
In other words, D0 on the 4-bit shift register is the most
significant bit of the period number.
- Lever's right-shift registers shift the bit in D2
into D3, the bit in D1 into D2, and the bit in D0 into D1. (In other
words, it's backwards from what you'd think, with D0 being the most
significant bit.)
- Q3 of the 4-bit shift register should be connected to CAI on the 8-bit shift register.
- CAI stands for "cascade in."
When a register shifts right, whatever bit is on CAI will be shifted
into flip-flop Q0. (This flip-flop is inside the shift-register.)
- Output Q3 of the 4-bit
register contains the bit that needs to go to flip-flop Q0 of the 8-bit
register when a right-shift is performed.
- CAI on the 4-bit register should be connected to ground.
- As numbers are shifted right,
a low on CAI will cause zeroes to be shifted into Q0 of the 4-bit
register (which is what we want to happen).
- The CD and PS inputs on a shift
register are for clearing and presetting the flip-flops in a shift
register. We won't be using these features, so connect these pins to
ground.
- The MAG8 macro near the center of the schematic is an
8-bit magnitude comparator. It's job is to compare the number on its A
inputs with the number on its B inputs and indicate whether A is
greater than B, equal to B, or less than B. A high on the GT output
indicates that A is greater than B. A high on EQ indicates it is equal to B. And, a high on LT indicates it is less than B.
- Notice that on the schematic above, the binary number present on B7 to B0 is 0100 0010, which is equal to 42H.
- 42H is the largest period number we want to have,
because it represents the low-frequency end of the piano keyboard's
highest octave.
- Here's the rule for when the 12-bit right-shift register should shift:
- If the high-order four bits (STHO11 to STH08)
of the 12-bit register are anything other than 0000, the register
should be enabled to shift (seeing as how it contains a number greater
than 042H).
- Also, if the low-order eight bits (STHO7 to STHO0) are greater than 42H, the register should be enabled to shift.
- The four-bit counter on the right of the schematic
should start out with a zero in it and then count up while the shift
register is enabled.
- The counter should be cleared each time a number is loaded into the shift register.
- The (active-high) CD input to the counter will clear it.
- This counter will indicate the octave of the
original signal from the microphone. The counter's outputs will be
needed by other circuitry.
- Your job is to add one gate and some wires to partial
schematic shown above to make it work as described above. You'll also
need to add VCC and GND to macro input pins where needed.
|