It works! (Believe it or not).
This monstrosity is an AWG using a simplified form of DDS (Direct Digital Synthesis).
DDS is a way to create analog signals using digital methods. The most basic form is to use a phase accumulator (or Numerically Controlled Oscillator) and a waveform look-up table (LUT).
HOW TO WORK IT:
I have preprogrammed a triangle wave into the waveform memory. The frequency is set by the 2 logic sources located to the right of the memory.
TUNING WORD "M" SPEED (HZ)
00 (BIN) 0 (DEC) 0
01 (BIN) 1 (DEC) 125
10 (BIN) 2 (DEC) 250
11 (BIN) 3 (DEC) 375
The formula to find the output frequency is
F = Fc × M / 16
M = Tuning word
Fc = clock frequency (2kHz)
16 = number of memory depth samples
DETAILS:
The LUT is where the signal amplitude data is stored. It is the left side of the screen and consists of 8 bytes with a memory depth of 16 samples. Each sample has a bit resolution of 4. Each 4-bit sample has a corresponding address, which can be selected through the 4:16 decoder.
0x0 (0000) is the top sample, and 0xF (1111) is the bottom sample. The column of AND gates is the decoder, and the counters on the right are the latches.
The phase accumulator is really just a special counter that helps determine the spot to grab in the LUT. (The current spot is remembered by the phase register, which is located to the right of the 4:16 decoder). You can think of phase accumulation as moving through the time base (or phase) of the signal stored in memory. It adjusts the frequency of the output by skip counting. It will jump over addresses, causing it to complete a period faster, which makes the frequency of the output signal increase, but the clock and sample rate stay the same. This is where the adder logic to the right of the memory block comes in. The amount it skips (in other words, the amount to add to the phase register) is set by the tuning word, which are the 2 logic buttons. This is how the frequency is adjusted.
Putting both of these things together, you basically have a phase to amplitude converter and a digital way to synthesize signals with various frequencies (DDS).
For the output, I have an output latch and simple filter. A hidden but very important advantage to DDS versus an adjustable clock is that the filter can remain the same for all frequencies because the sample rate is unchanged.
Sorry if this is all a bit confusing! If you want clarification or have questions, then by all means, leave a comment...
If you'd like more info on how an AWG works, check into my first circuit: https://everycircuit.com/circuit/6641355690082304
Larger example: https://everycircuit.com/circuit/6141640988950528
Variable clock example: https://everycircuit.com/circuit/5404744524496896
NCO: https://everycircuit.com/circuit/5760185112723456
|