Close

Display Line Counter

A project log for Zappotron Super-Sequencer

NES Zapper Controlled drum sequencer

russell-kramerRussell Kramer 03/18/2017 at 20:050 Comments

Touching the output pins of the 4040 binary counter will produce patterns of three lines, six lines, twelve lines and so on. There's a total of 240 visible lines in an NTSC video signal and the 4040 output pins provide that divided by powers of two. I want a total of 16 steps displayed on the TV and the closest I can get is 12.

I had originally planned to use the count from the 4060 which can produce 16 vertical lines, but this meant changing the demultiplexer state 260 times more frequently because it needed to cycle though all 16 positions once per scanline instead of ones per frame. This caused a lot of instability in the capacitor array.

The solution is to add another set of 4040 counters. One for clock division of the Hsync pulse and one to produce a count going from 0-15 from that divided clock. There's another two lower bits which count from 0-3 for each step of the display draw count. These are used to draw the four channels in each step.

Discussions