From 33396a6b2ef2db812fd942331c9d0ff8e6d95b71 Mon Sep 17 00:00:00 2001 From: Andreas Neiser Date: Mon, 6 Oct 2014 11:35:41 +0200 Subject: [PATCH] ADC: Make CSB control more flexible --- adc_addon/adc_addon.vhd | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/adc_addon/adc_addon.vhd b/adc_addon/adc_addon.vhd index 30ee4db..0787ddf 100644 --- a/adc_addon/adc_addon.vhd +++ b/adc_addon/adc_addon.vhd @@ -212,7 +212,7 @@ architecture adc_addon_arch of adc_addon is signal enable_cfg_flash : std_logic; - --signal adc_csb_reg : std_logic_vector(12 downto 1) := x"000"; + signal adc_csb_reg : std_logic_vector(12 downto 1) := x"000"; begin @@ -382,7 +382,7 @@ begin if spi_channel_i(4) = '0' then case spi_channel_i(3 downto 0) is when x"0" => spi_reg20_i <= x"00" & b"000" & leds; - --when x"1" => spi_reg20_i <= x"0" & adc_csb_reg; + when x"1" => spi_reg20_i <= x"0" & adc_csb_reg; when others => null; end case; else @@ -401,14 +401,14 @@ begin if spi_write_i(2) = '1' then case spi_channel_i(3 downto 0) is when x"0" => leds <= spi_data_i(4 downto 0); - --when x"1" => adc_csb_reg <= spi_data_i(11 downto 0); + when x"1" => adc_csb_reg <= spi_data_i(11 downto 0); when others => null; end case; end if; end process; - adc_csb <= (others => '0') when SPI_TRB_CLK(1) = '0' else (others => '1'); - --not adc_csb_reg; -- active low! + -- adc_csb_reg 1=enable, but adc_csb is active low... + adc_csb <= (others => '0') when SPI_TRB_CLK(1) = '0' else not adc_csb_reg; --------------------------------------------------------------------------- -- Rest of the I/O -- 2.43.0