Forum Discussion
Altera_Forum
Honored Contributor
13 years agoDAC with THDB-ADA on DE2-115
Hi there,
I'm working with DAC on the daughter board THDB-ADA. The pin assignments are correct, I believe, but the circuit doesn't seem to be working. Here are my waveforms from ModelSim, can somebody give me some suggestion on what I did wrong? https://www.alteraforum.com/forum/attachment.php?attachmentid=6876 fyi: I create the data output to the board from 0-16300-0... (so that it will be a triangle waveform) I'm still doing and glad to here from you. Thank you, Tan30 Replies
- Altera_Forum
Honored Contributor
--- Quote Start --- I tried to test the program. However it doesnt work. I am using the altera DE2 board and the terasic daughter board. I checked the pin assignment. I cant see anything in the output. Could you help me with this??? --- Quote End --- Could you tell me how you set up your design? If I will check the basic operation, I would set it like: Use an SMA cable to connect the ADC channel A to a generator, say you're using a 1V, 500kHz sine wave. Use another SMA cable for the DAC channel A to the osciloscope. Make sure the contact between your THDB ADA to your DE2-115 is HSMC and is firm (pushing it down a bit hard) If it doesn't work either, check the jumpers on your daughter board. Leave it as default if you've changed something. I'm curently not with my board so I can't check it. If it doesn't work either, connect the data, XIN, to the LEDS to check if it works. If not, make sure to set the ADC_OEA to 0 - Altera_Forum
Honored Contributor
--- Quote Start --- Follow this your entity should have: XOUT : out std_logic_vector(13 downto 0); YOUT : out std_logic_vector(13 downto 0); -- adc 14 bit data inputs XIN : in std_logic_vector(13 downto 0); YIN : in std_logic_vector(13 downto 0); -- Setup ADC and DAC DAC_MODE : out std_logic; -- DAC mode, 1 for dual DAC_WRTA : out std_logic; -- Write signal Channel A DAC_WRTB : out std_logic; -- Write signal Channel B ADC_OEA : out std_logic; -- Channel A enable ADC_OEB : out std_logic; -- Channel b enable PLL_OUT_ADC : out std_logic_vector(1 downto 0); PLL_OUT_DAC : out std_logic_vector(1 downto 0)); -- Clock from HSMC your interface: --Clock processing--------------------------- process(CLOCK_50) begin if falling_edge(CLOCK_50) then clockF <= not(clockF); end if; if rising_edge(CLOCK_50) then clockR <= not(clockR); end if; end process; --DAC and ADC interface---------------------- PLL_OUT_ADC(0) <= clockR; PLL_OUT_ADC(1) <= clockR; PLL_OUT_DAC(0) <= clockF; PLL_OUT_DAC(1) <= clockF; DAC_WRTA <= clockF; DAC_WRTB <= clockF; DAC_MODE <= '1'; -- Dual mode ADC_OEA <= '0'; ADC_OEB <= '0'; --your outputs YOUT <= YIN;; XOUT <= XIN; The whole thing should work. Here is pins the assignment ADC_OEA Location PIN_T25 ADC_OEB Location PIN_T26 CLOCK_50 Location PIN_Y2 DAC_MODE Location PIN_H24 DAC_WRTA Location PIN_H23 DAC_WRTB Location PIN_M25 PLL_OUT_ADC[0] Location PIN_G23 PLL_OUT_ADC[1] Location PIN_G24 PLL_OUT_DAC[0] Location PIN_V24 PLL_OUT_DAC[1] Location PIN_V23 RESET Location PIN_AB28 XIN[0] Location PIN_T22 XIN[1] Location PIN_T21 XIN[2] Location PIN_R23 XIN[3] Location PIN_R22 XIN[4] Location PIN_R21 XIN[5] Location PIN_P21 XIN[6] Location PIN_P26 XIN[7] Location PIN_P25 XIN[8] Location PIN_N26 XIN[9] Location PIN_N25 XIN[10] Location PIN_L22 XIN[11] Location PIN_L21 XIN[12] Location PIN_U26 XIN[13] Location PIN_U25 XOUT[0] Location PIN_D27 XOUT[1] Location PIN_D28 XOUT[2] Location PIN_E27 XOUT[3] Location PIN_E28 XOUT[4] Location PIN_F27 XOUT[5] Location PIN_F28 XOUT[6] Location PIN_G27 XOUT[7] Location PIN_G28 XOUT[8] Location PIN_K27 XOUT[9] Location PIN_K28 XOUT[10] Location PIN_M27 XOUT[11] Location PIN_M28 XOUT[12] Location PIN_K21 XOUT[13] Location PIN_K22 YIN[0] Location PIN_V22 YIN[1] Location PIN_U22 YIN[2] Location PIN_V28 YIN[3] Location PIN_V27 YIN[4] Location PIN_U28 YIN[5] Location PIN_U27 YIN[6] Location PIN_R28 YIN[7] Location PIN_R27 YIN[8] Location PIN_V26 YIN[9] Location PIN_V25 YIN[10] Location PIN_L28 YIN[11] Location PIN_L27 YIN[12] Location PIN_J26 YIN[13] Location PIN_J25 YOUT[0] Location PIN_F24 YOUT[1] Location PIN_F25 YOUT[2] Location PIN_D26 YOUT[3] Location PIN_C27 YOUT[4] Location PIN_F26 YOUT[5] Location PIN_E26 YOUT[6] Location PIN_G25 YOUT[7] Location PIN_G26 YOUT[8] Location PIN_H25 YOUT[9] Location PIN_H26 YOUT[10] Location PIN_K25 YOUT[11] Location PIN_K26 YOUT[12] Location PIN_L23 YOUT[13] Location PIN_L24 --- Quote End --- Does this code work for a Cyclone IV? because I have different pin assigments and I'm using the De2-115 board and the data conversion HSMC. - Altera_Forum
Honored Contributor
--- Quote Start --- Does this code work for a Cyclone IV? because I have different pin assigments and I'm using the De2-115 board and the data conversion HSMC. --- Quote End --- That works for DE2-115 (Cyclone IV, for more specific, Cyclone IV EP4CE115F29C7N) using HSMC THDB ADA - Altera_Forum
Honored Contributor
Hi ,
I have to interface my Cyclone 3 starter kit with my ADA_thdb board. Can anyone tell me how to proceed with? Are there any sort of constraints or specific things to be noted while interfacing the two boards. I do not wish to spoil my board by programming it in a wrong way. So any guidelines on how to start with will be appreciated. Please do enlighten this beginner. Thanks in advance. - Altera_Forum
Honored Contributor
I don't have a Cyclone 3 board here. I'm not sure what is your interface between the FPGA board and the daughter board. Is it HSMC or GPIO? Can you upload the pictures or give me the web links of your boards?
First, use the FPGA board manual to obtain the pins for your interface. Make sure you can make a correct pins assignment. Second, try the program I wrote above. - Altera_Forum
Honored Contributor
--- Quote Start --- I don't have a Cyclone 3 board here. I'm not sure what is your interface between the FPGA board and the daughter board. Is it HSMC or GPIO? Can you upload the pictures or give me the web links of your boards? First, use the FPGA board manual to obtain the pins for your interface. Make sure you can make a correct pins assignment. Second, try the program I wrote above. --- Quote End --- Hi duytan , Ya sure , I am attaching the pics of the ADA borad . - Altera_Forum
Honored Contributor
--- Quote Start --- I don't have a Cyclone 3 board here. I'm not sure what is your interface between the FPGA board and the daughter board. Is it HSMC or GPIO? Can you upload the pictures or give me the web links of your boards? First, use the FPGA board manual to obtain the pins for your interface. Make sure you can make a correct pins assignment. Second, try the program I wrote above. --- Quote End --- Hi duytan , Ya sure , I am attaching the pics of the ADA borad . It is the HSMC board , the first one in the attached pdf. And ya, i'll refer to the pins and keep the assignments ready. Will you be able to verify them for me? Cyclone 3 Starter board link is here. http://www.altera.com/products/devkits/altera/kit-cyc3-starter.html Thanks ! - Altera_Forum
Honored Contributor
Pins assignment for Cyclone 3 Starter Board
Assign this and try my code above ADC_OEA Location PIN_T3 ADC_OEB Location PIN_R3 CLOCK_50 Location PIN_B9 DAC_MODE Location PIN_L1 DAC_WRTA Location PIN_T24 DAC_WRTB Location PIN_W25 PLL_OUT_ADC[0] Location PIN_V18 PLL_OUT_ADC[1] Location PIN_U18 PLL_OUT_DAC[0] Location PIN_C14 PLL_OUT_DAC[1] Location PIN_D14 RESET Location ==> Choose one of your switch XIN[0] Location PIN_N13 XIN[1] Location PIN_M13 XIN[2] Location PIN_N6 XIN[3] Location PIN_M6 XIN[4] Location PIN_R18 XIN[5] Location PIN_R17 XIN[6] Location PIN_M14 XIN[7] Location PIN_L13 XIN[8] Location PIN_M17 XIN[9] Location PIN_L16 XIN[10] Location PIN_L18 XIN[11] Location PIN_K18 XIN[12] Location PIN_G18 XIN[13] Location PIN_G17 XOUT[0] Location PIN_T1 XOUT[1] Location PIN_N7 XOUT[2] Location PIN_N8 XOUT[3] Location PIN_J13 XOUT[4] Location PIN_N10 XOUT[5] Location PIN_N11 XOUT[6] Location PIN_K17 XOUT[7] Location PIN_P11 XOUT[8] Location PIN_B2 XOUT[9] Location PIN_B1 XOUT[10] Location PIN_G2 XOUT[11] Location PIN_G1 XOUT[12] Location PIN_K2 XOUT[13] Location PIN_K1 YIN[0] Location PIN_T18 YIN[1] Location PIN_T17 YIN[2] Location PIN_R4 YIN[3] Location PIN_R5 YIN[4] Location PIN_P18 YIN[5] Location PIN_P17 YIN[6] Location PIN_L15 YIN[7] Location PIN_L14 YIN[8] Location PIN_M18 YIN[9] Location PIN_L17 YIN[10] Location PIN_H18 YIN[11] Location PIN_H17 YIN[12] Location PIN_E18 YIN[13] Location PIN_E17 YOUT[0] Location PIN_M3 YOUT[1] Location PIN_T2 YOUT[2] Location PIN_H15 YOUT[3] Location PIN_H16 YOUT[4] Location PIN_N16 YOUT[5] Location PIN_N15 YOUT[6] Location PIN_R16 YOUT[7] Location PIN_T16 YOUT[8] Location PIN_C2 YOUT[9] Location PIN_C1 YOUT[10] Location PIN_H2 YOUT[11] Location PIN_H1 YOUT[12] Location PIN_K5 YOUT[13] Location PIN_L5 - Altera_Forum
Honored Contributor
Hi tan,
I am currently creating a spread-sheet for the pin assignments. Well thanks a lot! i'll verify my assignments with what you have sent. I have another doubt, The ADA board feature list mentions the following: The feature set of the ADA is listed below: 1. Dual AD channels with 14-bit resolution and data rate up to 65 MSPS 2. Dual DA channels with 14-bit resolution and data rate up to 125 MSPS 3. Dual interfaces include HSMC and GPIO, which are fully compatible with Cyclone III Starter Kit and DE1/DE2/DE2_70/DE2_115/DE3/DE4, respectively 4. Clock sources include oscillator 100MHz, SMA for AD and DA each, and PLL from either HSMC or GPIO interface 5. AD converter analog input range 2V p-p range. 6. DA converter output voltage range 2V p-p range. 7. DA and AD converters do not support DC signaling The entire board operates on DC-signaling if am not wrong, as our board is powered by an adapter. So what does it exactly mean by DA and AD converters do not support DC signalling? Also i think there is a mistake in the pins wrt_a and wrt_b as there is no pin such as T24 and W25 available. Am attaching the schematics of Cyclone 3 Starter Board for your reference. thanks! ivads - Altera_Forum
Honored Contributor
If you are quite familiar with ADC and DAC, you will see that we need to adjust the gain value which is to adjust the converter into the amplitude of our signal. Well, don't mind if you don't understand what I've just said. I'm not a good explainer.
In other words, a signal source usually includes DC and AC component. It's like you have a sine wave but it is shifted up or down around the zero. It is because that sine wave is added to a DC component. That is very "annoying" in signal processing as it consumes power when processing, causing heat, reducing the accuracy of the represented binary, adding truncating noise to your signal when processing. Any way, that statement means, you can only put AC signal into you SMA cable (for ADC) and create an AC signal (DAC) Also, when you apply the signal onto your daughterboard, your DC component will be filtered out. And by they way, I dont think you broke your board, it's maybe because of the contact between your board and daughterboad was not tight. Try to push them toghther harder