Connecting I2C

This commit is contained in:
Yannick Reiß 2024-01-31 15:20:17 +01:00
parent 4385bc6dcc
commit fafd9320af
No known key found for this signature in database
GPG Key ID: 5A3AF456F0A0338C
1 changed files with 3 additions and 3 deletions

View File

@ -22,12 +22,12 @@ end I2C;
architecture Implementation of I2C is architecture Implementation of I2C is
signal Clk100k : std_logic := '0'; signal Clk100k : std_logic := '0';
signal Clk100Counter : std_logic_vector(10 downto 0) := (others => '0'); signal Clk100Counter : std_logic_vector(10 downto 0) := (others => '0');
signal PackageReg : std_logic_vector(11 downto 0) := (others => '0');
begin begin
ClkSplit100k : process(clk) ClkSplit100k : process(Clk)
begin begin
if rising_edge(clk) then if rising_edge(Clk) then
if unsigned(Clk100Counter) >= 500 then if unsigned(Clk100Counter) >= 500 then
Clk100Counter <= (others => '0'); Clk100Counter <= (others => '0');
Clk100k <= not Clk100k; Clk100k <= not Clk100k;