Altera_Forum
Honored Contributor
8 years agoRead in external ADC values
Hello everybody,
I'm a newbie on VHDL programming, but for a course at university we have to deal with the DE1-SoC and the THDB-ADA Board. I want to read out the values of the ADC and display them in the signal analyzer in Quartus. So this is my source code (.vhdl): library ieee;use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity adc_test is
port(
adc_cs_n: in std_logic; --internal adc
adc_din: out std_logic;
adc_dout: in std_logic;
adc_sclk: out std_logic;
clock_50: in std_logic; --clocks
clock2_50: in std_logic;
clock3_50: in std_logic;
clock4_50: in std_logic;
dram_addr: out std_logic_vector(12 downto 0); --sdram
dram_ba: out std_logic_vector(1 downto 0);
dram_cas_n: out std_logic;
dram_cke: out std_logic;
dram_clk: out std_logic;
dram_cs_n: out std_logic;
dram_dq: inout std_logic_vector(15 downto 0);
dram_ldqm: out std_logic;
dram_ras_n:out std_logic;
dram_udqm: out std_logic;
dram_we_n: out std_logic;
adc_clk_a: out std_logic; --gpio
adc_clk_b: out std_logic;
adc_da: in std_logic_vector(13 downto 0);
adc_db: in std_logic_vector(13 downto 0);
adc_oeb_a:out std_logic;
adc_oeb_b:out std_logic;
adc_otr_a:in std_logic;
adc_otr_b:in std_logic;
dac_clk_a: out std_logic;
dac_clk_b: out std_logic;
dac_da: in std_logic_vector(13 downto 0);
dac_db: in std_logic_vector(13 downto 0);
dac_mode: out std_logic;
dac_wrt_a: out std_logic;
dac_wrt_b: out std_logic;
osc_sma_adc4: in std_logic;
power_on: out std_logic;
sma_dac4: in std_logic
);
end adc_test;
architecture arch_adc of adc_test is
signal clk : std_logic;
begin
process(clock_50)
begin
clk <= clock_50;
end process;
end arch_adc; Complilation succeeded but when I start the signal analyzer it displays "waiting for clock". Do you have some ideas what I forgot to include? Do I have to include an pll? Thank you for your help. Christoph :o