From: Tobias Weber Date: Mon, 6 Nov 2017 13:34:44 +0000 (+0100) Subject: correctly read back values from DACs. X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=b42fe447aa254ff7bbd694e36fbae7ca6ff77d7f;p=trb3.git correctly read back values from DACs. --- diff --git a/mupix/Mupix8/sources/LTC1658SPI.vhd b/mupix/Mupix8/sources/LTC1658SPI.vhd index 20a6df9..cde7e11 100644 --- a/mupix/Mupix8/sources/LTC1658SPI.vhd +++ b/mupix/Mupix8/sources/LTC1658SPI.vhd @@ -92,12 +92,12 @@ begin if (clk_enable = '1') then shiftregister_out(data_length - 1 downto 1) <= shiftregister_out(data_length - 2 downto 0); shiftregister_out(0) <= '0'; + shiftregister_in <= shiftregister_in(data_length - 2 downto 0) & spi_data_from_chip; state <= sendbit2; end if; when sendbit2 => --pull clock high spi_clk <= '1'; if (clk_enable = '1') then - shiftregister_in <= shiftregister_in(data_length - 2 downto 0) & spi_data_from_chip; if (wordcounter = data_length - 1) then -- we are done... state <= loading1; else