Lissajous Figures on 8X8 Led Matrix

A point of light oscillating in 2 perpendicular axes draws a pattern named “Lissajous Figure” (1857) or “Bowditch Curve” (1815). Patterns range from simple to complex depending on the frequency ratio and phase of the 2 axes.A 1:1 ratio with 0 phase difference draws a straight line at 45° angle. In this project the frequency ratio of the 2 axes slowly sweeps back and forth between 1:1 and 2:1. These patterns are easily generated with an oscilloscope and 2 sine wave oscillators. In the mid 1800’s Joules Antoine Lissajous deflected a light beam with mirrors attached to tuning forks. He also created a SAND PENDULUM. This project displays Lissajous Figures on an 8X8 led matrix (or 64 discrete leds for a larger device) and is driven by a PIC16F627 microcontroller.

Step 1: Watch Video

The motion of the active led in pixels/second is around 20X the frame rate of this video. For that reason the patterns might appear to be “jumpy”. The real device has a much smoother visual performance.

Step 2: Schematic:

PIC16F627 is the heart of the project.

Step 3: Decoder

PORTB pins of the mcu drive the 8 common anodes (X-axis). PORTA (Y-axis / LED cathodes) has a maximum of 7 pins configurable as outs. To obtain the necessary 8 outs, 2 pins PORTA <1:0> drive a decoder made with 3 nand gates (74HC00) which provides 3 outs from 2 pins of the mcu.

Step 4: Generating the “sine” Waves:

The “sine” motion of the pixel is obtained by reading a succession of 22 byte patterns from a table in memory for the X-axis and the Y-axis respectively. The rate at which these patterns are read determine the period of the sweep.

Step 5: Table Read for PORT A

Table read for PORTA is slightly different to PORTB. Port A drives the cathodes and is Active-LOW. Pins 0 & 1 drive 3 common cathodes through 74HC00 nand gate decoder.

Step 6: Basic Flowchart

Download link to HEX & ASM code for PIC16F627

Step 7: Watch the Video

slow motion showing the movement of the active pixel

Source: Lissajous Figures on 8X8 Led Matrix

About The Author

Muhammad Bilal

I am a highly skilled and motivated individual with a Master's degree in Computer Science. I have extensive experience in technical writing and a deep understanding of SEO practices.