EmbDev.net

Forum: FPGA, VHDL & Verilog Interfacing ADC with FPGA


Author: Varun C. (Company: IIT Delhi) (varun_chitransh)
Posted on:
Attached files:

Rate this post
0 useful
not useful
Hi,
I have connected MCP3202 spi based 12-bit ADC with Spartan-6 FPGA. The 
analog voltage is sensed and displayed on LCD. It is showing following 
issues.

(1) ADC's input 0 V is displayed as 0000 on LCD, which is fine. But, 
ADC's input 2.5 V is displayed as 1024 on LCD, but it should be 2048 for 
12-bit ADC. Similarly, ADC's input 5 V is displayed as 2047 on LCD, but 
it should be 4095 for 12-bit ADC.

(2) Even for constant DC input at ADC, the corresponding value on LCD 
display is fluctuating.

(3) I am not sure with hardware connection of MCP3202 with Spartan-6. If 
anyone is having hands-on experience, please help me.


Please help me in fixing these issues.

: Edited by User
Author: Lothar M. (lkmiller) (Moderator)
Posted on:

Rate this post
0 useful
not useful
Varun C. wrote:
> Please help me in fixing these issues.
The simulator is the primary debugger in FPGA design. Does the 
simulation of your design look ok?

> But, ADC's input 2.5 V is displayed as 1024 on LCD, but it should be
> 2048 for 12-bit ADC. Similarly, ADC's input 5 V is displayed as 2047 on
> LCD, but it should be 4095 for 12-bit ADC.
Do you use the correct timing for the ADC? What data can you measure on 
the Dout line of the ADC? Does it match the value you get inside the 
FPGA, or is there an offset by 1 bit? Does the measured timing match the 
timing in the datasheet?

> I am not sure with hardware connection
Do the serial IO voltages of the ADC match the IO voltage of the FPGA? 
do you see good signals? Or is there some ringing or even glitches on 
the signals?

: Edited by Moderator
Author: Varun C. (Company: IIT Delhi) (varun_chitransh)
Posted on:

Rate this post
0 useful
not useful
> Do you use the correct timing for the ADC?

Please help me in understanding its meaning more clearly, what it mean?

Author: Lothar M. (lkmiller) (Moderator)
Posted on:

Rate this post
0 useful
not useful
Do your generated signals match the specification in the data sheet of 
the ADC?

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [vhdl]VHDL code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig