Forum Discussion
Altera_Forum
Honored Contributor
11 years agoDE2-115 and Terasic High Speed AD/DA daughter card
Hi everyone,
I am going to use the terasIC High Speed AD/DA daughter card (http://www.terasic.com.tw/cgi-bin/pa...english&no=278 (http://www.terasic.com.tw/cgi-bin/page/archive.pl?language=english&no=278)) in combination with the DE2-115 board. Unfortunately i have no idea how i can get the values from the selected AD-Channel read out. I wonder how i can get the converted value (14 bit) of an analog signal on the led of DE2? Has anyone a code-example (written in vhdl) which uses the terasic ada card? so perhaps i can get a hint how i can implement the daughter card in my future experiments? Would be very helpful. Thanks12 Replies
- Altera_Forum
Honored Contributor
Hi rebk,
The 2V DC signal you're applying isn't going to get through the transformer. AC only I'm afraid. So, don't expect any exciting results from your initial tests. As already stated there is a 49R9 resistor to ground on the input. So, it's not shorted to ground but it is intended to be driven by something with a 50R source impedance. As for what input signal is appropriate - you'll need to refer to the Reference Manual for the Data Conversion card. See the 'A/D Converter' section under 'Component Interfaces' on page 2-8. --- Quote Start --- I have an input signal as 2V amplitude, 80 ns, 100 Hz... --- Quote End --- Do you mean an 80ns pulse every 10ms? That might work. However, you need to be aware that the shape of the signal going into the ADC is going to be somewhat different to the signal you drive in thanks to that transformer. Cheers, Alex - Altera_Forum
Honored Contributor
Thanks Alex,
Now there is a question about type of input signal. As there is a RF transformer after the input of AD card, What kind of input can I have? Currently I am trying to input a 2V DC input. but the input (SMA input terminal) is shorted. I mean there is no place for ground. My final goal is to input 100 Hz square waveform with duty cycle of only 80 ns. I have attached the AD card input schematic and my desired project with AD and FPGA. I have an input signal as 2V amplitude, 80 ns, 100 Hz and want to convert it by ADC to digital then I can limit/modify the bites (the input). Please have a quick look at it and let me know your instructions. Regardshttps://www.alteraforum.com/forum/attachment.php?attachmentid=10727 - Altera_Forum
Honored Contributor
You should be driving ADA_OE LOW and ADA_SPI_CS HIGH.
If you've nothing connected it's possibly the noise you're seeing. Try connecting the ADC input signal (ADC_A_IN) to ground. Having said that, the board has 49R to ground anyway. That's not likely to be generating much noise across it. So, I think it's more likely that the data output signals on the AD9254 are tri-stated and it's those lines that (may) have the noise on. Driving ADA_OE low (and ensuring the ADC has a clock) should be enough to get something sensible out of it. Cheers, Alex - Altera_Forum
Honored Contributor
Alex,
Thanks for reply and a big apologize for wrong link. This is the card which I am using http://www.terasic.com.tw/cgi-bin/page/archive.pl?language=english&categoryno=67&no=360. I think they are following same principle and structure. In my case finally I could somehow manage the pin assignment by using the terasic example project and now I can see toggling of bits with logic analyzer. I have attached the picture. - BUT I have not attached any input signal? What is this toggling for? - There are some signals which do not toggle/change like as ADA_OE and ADA_SPI_CS! Is one of them my input signal? - What signal is your input when using THDBA_ADA card? Regards P.S: I have attached the code. It is simple code which transfer input to leds. I used a frequency divider to slow down the clock speed to see the LEDs lighting. The question is why I can see toggling of bits/LED blinking without any input? - Altera_Forum
Honored Contributor
Rebk,
--- Quote Start --- I am using the AD/DA conversion card and it is different with THDB-ADA --- Quote End --- Are you concerned they are different boards? The link you posted in your first post is for the THDB-ADA card. Is that the board you're using? Assuming so... I've also had a (better) look through the data on the support CD that comes with the board. It looks like the answers were there all along - sorry. So, to answer your questions: 1) Yes, the sample Terasic project, for the DE2-115 board, looks fine - albeit in verilog. Refer to the 'DE2_115_ADDA_TOP.v' example for the following signal names. 2) It doesn't look like you need many of them. Drive 'ADA_OE_A' & 'ADA_OE_B' LOW and you should get some data out. It'll also need a clock - see point 3). 3) I suggest you start by using the oscillator on the THDB-ADA card. Fit jumper JP6 and jumpers on pins 3-4 of JP1 & JP2. This same clock is fed to and can be used inside the FPGA via 'OSC_SMA_ADC4'. Happy coding... Cheers, Alex - Altera_Forum
Honored Contributor
--- Quote Start --- Hi David, I take your point. Having had another look at the schematics it appears that AD/DA board schematic has flipped the pin order of the HSMC connector vertically. I find this pretty poor given the lack of support Terasic offer in the documentation for the board. Various connector manufacturers omit pin numbering on their connectors and leave it to the user to identify something convenient for them. However, Samtec specify a pin order for this particular connector, a pin order that Terasic have used for the DE2-115 board (and others). So, why flip the pin order for the connector on this board? The problem is made worse still since the orientation of the connector in the schematic appears to be the same as to the DE2-115 board. Combined with the pin order issue and I'd forgive anyone making the same mistake. Keeping in mind that the DE2-115 board uses a 172 pin version of the connector rather than the 192 pin version on the D/B - the pin mapping for the connectors on this particular board combination appears to be: ad/da - de2-115 1 - 159 2 - 160 3 - 157 4 - 158 etc. So, rebk - it looks like I and Terasic have sent you on a bit of a wild-goose chase. I suspect the boards are compatible. Perhaps David (or someone else) from Terasic can provide you with a Quartus project template for the DE2-115 board fitted with the AD/DA board... Cheers, Alex --- Quote End --- Hi Alex, Good point taken. I don't quite remember why it was done this way, but the good news is when I check our recent daughter cards with HSMC interface, it seems we've been following the straightforward naming/mapping instead of flipping the pin order around. Furthermore, we've been offering a tool named system builder for boards such as DE2-115. Users can generate a QII project directly with our daughter cards including the AD/DA boards directly without mapping the pins by themselves. We'll keep it in mind to make sure we don't make the same mistake twice. Thanks, David from Terasic - Altera_Forum
Honored Contributor
--- Quote Start --- Hi, I'm "someone else", I already sent Rebk a spreadsheet. It was made for the Cyclone III Starter Kit and the AD/DA board, but it should have been useful. Here's the PDF and a zipped Excel file. Cheers, Dave --- Quote End --- Hi Dave, Thanks a lot for the files ! I must put them up in our FAQ section :0 David from Terasic - Altera_Forum
Honored Contributor
Hi Guys, Thank you all for clarifications and your time. I have worked with DE0-Nano and its ADC and because of its perfect User Guide there were not big problems and it was more simpler because of having NO HSMC connection.
One more point, I am using the AD/DA conversion card and it is different with THDB-ADA. What I have done so far, I have used pin assignment of sample project of terasic for DE2-115 board and AD/DA conversion card. Why I can not use the example project structure for my design because it is totally different with my purpose. In the terasic example they produce 1 Mhz and 10 Mhz sinusoidal signal and then transfer it through AD input to DA input. So far I only need to use AD input for my project to convert Analog signal to Digital and limit it somehow with FPGA. With thanks to Dave for many instructions I have below questions: 1- I have used Terasic example pin assignment for my design, Is it OK? I suppose it is ok because AD input pins are same? Isnt it? 2- There are many other signals which I do not know which one is necessary for a simple AD project like as clk : in std_logic; ADA_DCO : in std_logic; ADA_OE : out std_logic; ADA_OR : in std_logic; ADA_SPI_CS: out std_logic; AD_SCLK : inout std_logic; AD_SDIO : inout std_logic; FPGA_CLK_A_N: inout std_logic; FPGA_CLK_A_P: inout std_logic; but anyway I have assigned them as terasic sample project. 3- Which clock signal should I use? There are many clock signals like as clk, AD_SCLK, FPGA_CLK_A_N, FPGA_CLK_A_P, CLKIN1, CLKOUT0 Some questions maybe seem simple and funny for you guys but it is difficult for me. I am here to learn and hope you help me with your knowledge. Regards - Altera_Forum
Honored Contributor
Hi David,
I take your point. Having had another look at the schematics it appears that AD/DA board schematic has flipped the pin order of the HSMC connector vertically. I find this pretty poor given the lack of support Terasic offer in the documentation for the board. Various connector manufacturers omit pin numbering on their connectors and leave it to the user to identify something convenient for them. However, Samtec specify a pin order for this particular connector, a pin order that Terasic have used for the DE2-115 board (and others). So, why flip the pin order for the connector on this board? The problem is made worse still since the orientation of the connector in the schematic appears to be the same as to the DE2-115 board. Combined with the pin order issue and I'd forgive anyone making the same mistake. Keeping in mind that the DE2-115 board uses a 172 pin version of the connector rather than the 192 pin version on the D/B - the pin mapping for the connectors on this particular board combination appears to be: ad/da - de2-115 1 - 159 2 - 160 3 - 157 4 - 158 etc. So, rebk - it looks like I and Terasic have sent you on a bit of a wild-goose chase. I suspect the boards are compatible. Perhaps David (or someone else) from Terasic can provide you with a Quartus project template for the DE2-115 board fitted with the AD/DA board... Cheers, Alex - Altera_Forum
Honored Contributor
--- Quote Start --- OK - there isn't anything wrong with your code. However, there is a problem if you're trying to do what I think you are - I'm assuming you're trying to connect to the DE2-115 board via the HSMC connector. Right? The ADC connections from the THDB-ADA board aren't connected up to the FPGA on that development board. Perhaps that sounds odd - but they aren't. The pins from the top 'third' of the HSMC connector - where the ADC signals are broken out from the ADA board - aren't taken to the FPGA (with the exception of a few intended for I2C, clock and JTAG related functions - not relevant to the ADA). I note that reference is made to use of the DE2-115 board in the manual for the ADA board but no mention of this limitation. I think that's a little poor. I attach the relevant pages of the schematic for each board for you to consider yourself. However, the ADC signals are also taken to J7, one of the GPIO connectors on the ADA. You may be able to connect it to the DE2-115 board via that. You'll probably need to remove the DE2-115 board's protective perspex cover to do so. Cheers, Alex --- Quote End --- Hi Alex, Could you be more specific on which ADC signals aren't taken to the FPGA ? We'd like to mention that in the user manual, if there's any. When I look at how the HSMC pins from ADA-HSMC are named and oriented, I have to admit it is easy to get confused and lost for them being completely upside down. I guess that's the reason why we change the number order afterwards, so the pins on both ends can be mapped directly. David from Terasic