From a49d1444e780cccbd0b1daa29243404effbecefd Mon Sep 17 00:00:00 2001 From: Rutherther Date: Sat, 6 Jan 2024 20:24:42 +0100 Subject: [PATCH] fix: count to 9, make i2c frequency 10 MHz --- src/ssd1306/counter.vhd | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ssd1306/counter.vhd b/src/ssd1306/counter.vhd index 6c7c7fa3383cb8e75bff23eb087185bbed6bd2c2..ac2a59a9a6f2b6034abec8cbda4164a676a69b01 100644 --- a/src/ssd1306/counter.vhd +++ b/src/ssd1306/counter.vhd @@ -11,7 +11,7 @@ entity ssd1306_counter is generic ( CLK_FREQ : integer := 100000000; -- Input clock frequency - I2C_CLK_FREQ : integer := 5000000; + I2C_CLK_FREQ : integer := 10000000; -- 12500000; COUNT_FREQ : integer := 1; DELAY : integer := 20; EXPECT_ACK : std_logic := '1'; @@ -127,7 +127,6 @@ begin -- architecture a+ SSD1306_ZERO(0) when curr_state = ZERO_OUT_RAM and curr_index = 0 else SSD1306_ZERO(1) when curr_state = ZERO_OUT_RAM and curr_index /= 0 else SSD1306_CURSOR_TO_ZERO(curr_index) when curr_state = SET_ADR_ZERO and curr_index < max_index else - digit_data(curr_index) when curr_state = DIGIT_N and curr_index < max_index else "00000000"; @@ -204,7 +203,7 @@ begin -- architecture a+ counter: entity utils.counter generic map ( - MAX => 9, + MAX => 10, DIGITS => DIGITS, IN_FREQ => CLK_FREQ, OUT_FREQ => COUNT_FREQ)