From: Jan Michel Date: Wed, 12 Apr 2023 07:26:23 +0000 (+0200) Subject: add support for TMP112 temperature sensor and its 13bit data format X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=f43dc25b5ef701b226af9ee9ad1af352c43ee6e9;p=trbnet.git add support for TMP112 temperature sensor and its 13bit data format --- diff --git a/special/trb_net_i2cwire.vhd b/special/trb_net_i2cwire.vhd index 7bf8da6..268ac4c 100644 --- a/special/trb_net_i2cwire.vhd +++ b/special/trb_net_i2cwire.vhd @@ -299,7 +299,11 @@ begin temp_int <= (others => '0'); elsif( (CURRENT_STATE = RD_TMP) and (valid_int = '1') ) then -- elsif( (temp_we = '1') ) then - temp_int <= i2c_dr_int(15 downto 4); + if i2c_dr_int(0) = '0' then --support for 13bit format of TMP112 + temp_int <= i2c_dr_int(15 downto 4); + else + temp_int <= i2c_dr_int(14 downto 3); + end if; end if; end if; end process THE_TEMP_REG_PROC;