As you can see in this post, the pattern of the 8 leds is only two kinds: turn all leds to off or on. From this post I have an inspiration what if the pattern is stored in a table of ROM or is called as the look up table (LUT).
Just LED pattern permanently stored in ROM make the LEDs display will have variations. So in this post, the delay time is maintained constant so you can easily understand how it works. But on the other posts will be modified with a delay time that varies.
About the workings of the program above can be explained as follows:
- Lines 1-3 is definitions of library used. STD_LOGIC_ARITH library contain library of CONV_INTEGER that used in line 36 for converting INTEGER to STD_LOGIC_VECTOR.
- I / O ports are defined in lines 5-9, STOP to stop flasher, Q_LED to control 8 LED, CLK50MHZ as input timer.
- Lines 13-23 define the ROM 32x8bits for the pattern of the LED display is called “led_lut”. LUT was marked by the addresses 0-31 or 00000 to 11111 in binary. As marker addresses of LUT is addr_lut and the defining is line 26.
- Lines 25-26 are defining of variable dly as delay counter and addr_lut as a marker addresses of LUT.
- Lines 31-44 are block of process.
Last updated byat .