
XY Spirograph draws four selectable patterns on an oscilloscope in XY mode. A 6-bit phase counter advances on every rising clock edge. The first three patterns combine triangle waves at different frequencies and phase offsets. The fourth uses a lookup table to trace a four-point star.
The chip outputs a 4-bit X coordinate on uo_out[3:0] and a 4-bit Y coordinate on uo_out[7:4]. Each coordinate drives an external R-2R DAC. At a 64 kHz clock, the pattern repeats 1,000 times per second.
ui_in[1:0] |
Pattern |
|---|---|
00 |
Diamond |
01 |
Bow tie |
10 |
Crisscross |
11 |
Four-point star |
uo_out[3:0] to the X DAC and uo_out[7:4] to the Y DAC. Use uo_out[3] and uo_out[7] as the most significant bits of their respective DACs.ui_in[1:0] to 00. Apply a 64 kHz clock, hold rst_n low through at least one rising edge, and then release it high.| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | Pattern select bit 0 (LSB) | X DAC bit 0 (LSB) | |
| 1 | Pattern select bit 1 (MSB) | X DAC bit 1 | |
| 2 | X DAC bit 2 | ||
| 3 | X DAC bit 3 (MSB) | ||
| 4 | Y DAC bit 0 (LSB) | ||
| 5 | Y DAC bit 1 | ||
| 6 | Y DAC bit 2 | ||
| 7 | Y DAC bit 3 (MSB) |