Using the Atmega16, your primary task is to design and
implement in assembly a Quadrature Decoder (Google it).
In order to test it, you are to also write in the same program a
quadrature encoder signal generator to simulate an encoder.
By feeding the quadrature signal in software or through I/O pins
you should be able to test your primary task, your quadrature
I would like the following features in your Quadrature Decoder
and tester software:
1. A button to start the Quadrature simulator such
that when the signal is fed to the Atmega signal in
software or through actual output and input pins, the
quadrature simulator will generate 10 quadrature pulses.
Your decoder under test will give a resulting count of 10.
2. A button to repeat (1) but will give a result of -10.
3. A button to repeat (1) and (2) where the frequency signal of the quadrature pulses are doubled.
Develop a quadrature simulation signal that start at zero
frequency, ramps up its speed until the quadrature decode reaches
a count of a 100, then ramp back down to zero frequency.
In all of this please clearly document the pins you are assigning for
Phase A and Phase B for your quadrature.
You should have a Phase A out, Phase A in, and Phase B out,
Phase B in.
The outs are the output of your simulator, the ins are the input to
your quadrature decoder.
Clearly state the register you are using to store the results of your
YOU MAY LOOK AT MY ATTEMPTED CODE AND IF YOU CAN FIX IT GREAT! It is attached.