A hiccup in how Counters work

A project log for WS2812B Delay Splitter

Splts a WS2812B bitstream, delaying one side by a selectable number of LEDs

petePete 10/25/2015 at 23:530 Comments

So I got my GreenPAK3 Dev Kit in the mail and started simulating things on it. I ran into an issue in that the counters start out on for three clock cycles before starting their counting loop. It wouldn't work to count three-byte blocks by counting off the first 24 bits, then the next 22, next 22, etc., so something else was needed. I think I've found a solution that works whereby I just reset the counter, not only at every reset interval between bitstreams, but after every three-byte block. That way I always get the 3-cycle startup pulse.

This issue also affected the reset interval counter, as it would start in its triggered state and wouldn't reset during the first three bits. For that, I ended up switching the counter to delay mode, and as long as DIn is oscillating, it stays in its last state until it stops for the reset interval and the output goes low. I added a 2bit LUT on the input so that as soon as it goes low it brings it high again for the next cycle, and reworked the latch fed by the delay cell.

I've generated a print editor snapshot which better shows the contents of each LUT and which input corresponds with which entry in the LUT. By itself, it would allow someone to recreate the circuit from a new GreenPAK Designer project.

Now for some more simulations and testing...