From b42fe447aa254ff7bbd694e36fbae7ca6ff77d7f Mon Sep 17 00:00:00 2001 From: Tobias Weber Date: Mon, 6 Nov 2017 14:34:44 +0100 Subject: [PATCH] correctly read back values from DACs. --- mupix/Mupix8/sources/LTC1658SPI.vhd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.43.0