]> jspc29.x-matter.uni-frankfurt.de Git - trb3.git/commitdiff
correctly read back values from DACs.
authorTobias Weber <toweber86@gmail.com>
Mon, 6 Nov 2017 13:34:44 +0000 (14:34 +0100)
committerTobias Weber <toweber86@gmail.com>
Mon, 6 Nov 2017 13:34:44 +0000 (14:34 +0100)
mupix/Mupix8/sources/LTC1658SPI.vhd

index 20a6df9aad93e8d2f8d4da8b2e4609f7ed392aef..cde7e1185d4fc6c56bb04c37f75bf4927562f8e2 100644 (file)
@@ -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