diff options
author | Timothy Pearson <tpearson@raptorengineering.com> | 2019-04-28 21:58:15 -0500 |
---|---|---|
committer | Timothy Pearson <tpearson@raptorengineering.com> | 2019-04-28 21:58:15 -0500 |
commit | 894b7938b39316764bd985affda99fbd3816bb08 (patch) | |
tree | ef1e5ae2736c596bd2cc38c13b426a3c2993465d | |
parent | 1733ea93c9e4157958ee7848c5758c117147af26 (diff) | |
download | ulab-894b7938b39316764bd985affda99fbd3816bb08.tar.gz ulab-894b7938b39316764bd985affda99fbd3816bb08.zip |
Correctly implement 7-segment display LED persistence
-rw-r--r-- | fpga/serial/common/remote_access.v | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/fpga/serial/common/remote_access.v b/fpga/serial/common/remote_access.v index 9afdbf2..b7f0592 100644 --- a/fpga/serial/common/remote_access.v +++ b/fpga/serial/common/remote_access.v @@ -151,35 +151,39 @@ module remote_access( led_segment_bus_latch = led_segment_bus; led_digit_select_latch = led_digit_select; - if (led_digit_select_latch[0] == 0) begin - led_display_bytes[0] = led_segment_bus_latch; - digit_blanker_1 = 0; + if (led_digit_select_latch[0] == 1) begin + digit_blanker_1 = digit_blanker_1 + 1; + end + + if (led_digit_select_latch[1] == 1) begin digit_blanker_2 = digit_blanker_2 + 1; + end + + if (led_digit_select_latch[2] == 1) begin digit_blanker_3 = digit_blanker_3 + 1; + end + + if (led_digit_select_latch[3] == 1) begin digit_blanker_4 = digit_blanker_4 + 1; end + + if (led_digit_select_latch[0] == 0) begin + led_display_bytes[0] = led_segment_bus_latch; + digit_blanker_1 = 0; + end if (led_digit_select_latch[1] == 0) begin led_display_bytes[1] = led_segment_bus_latch; - digit_blanker_1 = digit_blanker_1 + 1; digit_blanker_2 = 0; - digit_blanker_3 = digit_blanker_3 + 1; - digit_blanker_4 = digit_blanker_4 + 1; end if (led_digit_select_latch[2] == 0) begin led_display_bytes[2] = led_segment_bus_latch; - digit_blanker_1 = digit_blanker_1 + 1; - digit_blanker_2 = digit_blanker_2 + 1; digit_blanker_3 = 0; - digit_blanker_4 = digit_blanker_4 + 1; end if (led_digit_select_latch[3] == 0) begin led_display_bytes[3] = led_segment_bus_latch; - digit_blanker_1 = digit_blanker_1 + 1; - digit_blanker_2 = digit_blanker_2 + 1; - digit_blanker_3 = digit_blanker_3 + 1; digit_blanker_4 = 0; end |