GL01-16 Whole System, Version 3
10 points

OEES 235

Back to Main Page


(A more readable version of this will be handed out.)


Legend:
OCTUP = Octave up
OCTMID = Octave middle
OCTDN = Octave down
CLK = Clock
INCNT = Start input counter
LD_STHO = Load shift to highest octave shift register
LD_ND = Load note determiner counter
LATCH_OUT_PER = Latch output period
PERIOD_IN = Square wave generated from microphone signal
QINPONE = Output of input counter plus one
NOTESEL = Note select code
QSH = 12-bit period number to be used by output square wave generator (used to be "Output of octave shifter")
 



Scroll down--there's more.


















Binary
Note
Code
Decimal
Period
Length
(Clock
Pulses)
Hexidecimal Period Length (Clock Pulses)
C 0000 4095 FFF
C# 0001 3865 F19
D 0010 3648 E40
D# 0011 3443 D73
E 0100 3250 CB2
F 0101 3068 BFC
F# 0110 2896 B50
G 0111 2733 AAD
G# 1000 2580 A14
A 1001 2435 983
A# 1010 2298 8FA
B 1011 2169 879

The CLK line in the waveforms above is solid black. This is because the clock pulses are very close together.

The first INCNT pulse occurs at the extreme left of the waveforms above. Because INCNT occurs on the leading edge of PERIOD_IN, the Input Counter starts counting when it sees INCNT go high. The Input Counter stops counting when PERIOD_IN goes low. Thus, the Input Counter finishes up with a number representative of the period length. Other PERIOD_IN pulses are ignored until the entire cycle (LD_STHO, LD_ND, LATCH_OUT_PER, and CYCLE_END) has finished. Then, the next time PERIOD_IN goes high, a new INCNT pulse is generated, and a new cycle is begun.

Notice that for the first cycle, the Input Counter (QINPONE) reaches 22H. When the first LD_ND pulse comes along, the Note Determiner circuit puts 0BH onto the note select lines (NOTESEL). This is the correct value for an input period of 22H, as can be seen from the table on the left above. (The Note Determiner counts down from 22H until it reaches 21H, which corresponds to 0BH, which also happens to be the note B.)

When the second LD_ND pulse comes along, QINPONE contains 21H. The Note Determiner also converts this into a note select code of 0BH.

When the third LD_ND pulse comes along, QINPONE contains 30H. The Note Determiner counts down from this until it reaches 2FH. From the table on the left above, you can see that this corresponds to a note code of 05H, which is the code for the note F.

When the fourth LD_ND pulse comes along, QINPONE also contains 30H, and the Note Determiner also puts out a note code of 05H.

The Note to 12-Bit Period circuit takes the 0BH note code and converts it to 879H. The table on the right above shows that this is the correct period length for the note B.

The Note to 12-Bit Period circuit takes the 05H note code and converts it to 0BFCH, which is the corect period length for the note F.

For some reason, the note code at the far left of the waveforms is 8, and the Note Determiner circuit converts this to a period length of 0A10H. The note code 8 corresponds to the note G#, which should be 0A14H, as can be seen from the table on the right above. At present, I can't see why this happens. Hopefully, it's has something to do with the fact that the tone translator circuit has just started up.


Back to Main Page
1