Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
11 years ago

ADC with FPGA

Hi all,

I am currently working on an FPGA DE0-NANO.

In my project, i have to convert 4 analog input in the same time. So, i have to use an ADC that can convert these input simultaneously.

This ADC is interfaced with an FPGA. This one is interfaced with a micro-controller using SPI protocol.

The FPGA is acting as a slave and the micro-controller as master.

My question is : someone has some references to the ADC(or ADCs) that i can use ?

The configuration needed is:

1)Sample rate : 200 Khz minimum for each analog input

2) Input analog level is : 0 to 5v

I also would like to know if anyone has a code sample how to interface an ADC with FPGA in VHDL.

Best regards,

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Did you have any luck to interface an ADC with FPGA in VHDL? I am struggling for this issue too, the ADC controller core come along with the University program is written in verilog instead of VHDL, I have problem to convert the two files to VHDL, adv_adc.v and nios)systems_ADC.v.

    Any idea please?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    ok i don't have DE NANO and forgive me if i am making some foolish assumptions but if you already have a 4 channel ADC on your board, then go ahead fire up quartus, create input pins. if your ADC has 8 bit resolution each pin will have 8 bits in it so write a pin name My_channel_A[7..0] then create second pin name it My_channel_B[7..0] so on. create VHDL module place it on your main bsf project and connect wiring connections from your pin to your module. send a clock into your module and clock your input registers. now compile a project once, and go into pin planner assign pin locations to your pins. you will find locations on de nano reference manual pdf. recompile project. thats all. i don't believe that ADC needs some configurations, by default they start up, and instantly generate digital equivalent of anything that comes into their analog input pins. as i understand it, microcontroller simply helps to boot fpga from your pc. or helps it to execute software processes. it has nothing to do with ADC to FPGA pins. on all development boards FPGA is an independent processor. it can never be a slave of someone. -it enslaves everyone around :D it's a boss that's why it is THE HIGH SPEED FPGA and not some lazy microcontroller.