Hardware Reference
In-Depth Information
register several thousand times per second. Because of this, you can quickly
update the shift register outputs to make dynamic lighting animations. Here,
you light up each LED in turn from left to right, then from right to left. Watch the
demo video linked at the end of this section to see this finished circuit in action.
You first want to figure out each animation state so that you can easily cycle
through them. For each time step, the LED currently illuminated turns off, and
the next light turns on. When the lights reach the end, the same thing happens
in reverse. The timing diagram in FigureĀ 7-6 shows how the lights will look
for each time step and the decimal value required to turn that specific LED on.
Figure 7-6: Light rider animation steps
Search WWH ::




Custom Search