- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
ADC OF SPARTAN 3AN
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
08-30-2010 02:31 AM - edited 09-09-2010 09:28 PM
i hav written down the code for adc which generates the the required inputs such as spi_sck, AD_CONV, AMP_CS , SPI_MOSI etc.. but the output which i am getting is not same as the calculated and it also gives some output when there is no input at all. i just want to convert a dc voltage to digital format (bits). please do some help if you can..
thanks in advance..
Re: ADC OF SPARTAN 3AN
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-07-2010 10:01 AM
gauravkumar wrote:
i hav written down the code for adc which generates the the required inputs such as spi_sck, AD_CONV, AMP_CS , SPI_MOSI etc.. but the output which i am getting is not same as the calculated and it also gives some output when there is no input at all. i just want to convert a dc voltage to digital format (bits). please do some help if you can..
thanks in advance..
Have you simulated your code?
----------------------------------------------------------------
Yes, I do this for a living.
Re: ADC OF SPARTAN 3AN
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-07-2010 09:38 PM
yes i hav simulated the code
timings of the waveforms are fullfilling the criteria given in the manual..
Re: ADC OF SPARTAN 3AN
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-07-2010 10:06 PM
gauravkumar wrote:
i hav written down the code for adc which generates the the required inputs such as spi_sck, AD_CONV, AMP_CS , SPI_MOSI etc.. but the output which i am getting is not same as the calculated and it also gives some output when there is no input at all. i just want to convert a dc voltage to digital format (bits). please do some help if you can..
thanks in advance..
Are you asking about the SPI interface function, or are you asking about the values returned by the ADC ?
Is this an SPI interface question or an ADC question?
I don't understand your question about "gives some output ... when there is no input at all". There is *always* an input to an ADC, which can be measured by the ADC and reported over the SPI interface, as long as the ADC is powered up. A digital voltmeter (also an ADC) gives you a voltage reading even when the probes have slipped off the measurement point. The reading may not mean much, but it IS a reading of the voltage seen by the voltmeter.
- Bob Elkind
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369
Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
Re: ADC OF SPARTAN 3AN
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-07-2010 10:49 PM
thanks Bob Elkind for responding
my qs is abt the adc (spi should be included as to get the output from adc we have to program spi gain) may be i am wrong as i am new to this.... there is some exlanation wat i am doing....
input to the adc is a dc voltage which i am giving and that means the output whatever it comes out should repeat itself again and again until the input remains same but the output is changing and if i remove the input than also there is some output
Re: ADC OF SPARTAN 3AN
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-07-2010 11:42 PM - edited 09-07-2010 11:50 PM
From your postings, you come across as a software engineer trying to design hardware. You need to understand how A/D converters work, in general, and how to program the specific ADC on your board, specifically. You are more likely to find this information quickly and accurately in the ADC datasheet, or the ADC manufacturer's applications support facilities.
When you inquired your ADC vendor for support/guidance, were they able to help you? Did they tell you anything which suggests your problems were FPGA related? If they did mention FPGA or FPGA design concerns, it would be good to report them here, so the conversation can be as productive as possible.
So far nothing you've asked has much connection to either FPGAs or Xilinx. This is a Xilinx FPGA support forum, after all, and we are Xilinx' guests -- so to speak.
As for the output of your ADC constantly changing... well.... welcome to the analogue world. At some abstract level, you understand the input of your ADC to be a constant DC level. At a more fundamental level, the ADC input has both a DC component and an AC component. The ADC circuitry, itself, is sensitive to electrical noise which adds to the input's AC component. This is important to understand, so that you can ponder how to either accommodate and/or eliminate (well... reduce) this noise.
It could very well be that much of what you are seeing is the result of an incorrect gain setting, in which case you need to learn a bit more about the care and feeding of your ADC.
As for the notion that [no input] should translate to [no output], be aware that there are 16 state registers inside the ADC (assuming it's a 16bit converter). Each of these registers is capable of maintaining one of two states each: digital 0 and digital 1. This is true no matter how the ADC input is connected (or not connected). When you inquire of the ADC what the states of these 16 bits of registers are (at the moment), the ADC should do as you ask. At this level of (non-) abstraction, NaN (Not a Number) does not exist. You will get a series of 16 data bits which, together, represent a data value from 0 to 16,383d (inclusive). Any further abstraction/meaning you infer from this value (e.g. signed numbers, non-linear scale, a special value which signified NaN, etc.) is up to you, with the ADC datasheet as your guide.
I hope this helps. It could very well be that I've completely mis-interpreted your postings, in which case the fault is completely mine, and I apologise for any unintentional or inadvertent insult.
- Bob Elkind
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369
Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
Re: ADC OF SPARTAN 3AN
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-08-2010 02:32 AM
adc (14 bit)is already on the board of spartan 3an.
Re: ADC OF SPARTAN 3AN
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-08-2010 02:46 AM - edited 09-08-2010 03:06 AM
gauravkumar wrote:
adc (14 bit)is already on the board of spartan 3an.
Are you saying this is a Xilinx designed development board for the Spartan 3AN series? If so, then there is likely a wealth of support information and example code available from the Xilinx website, and I'm sure others will be able to help you.
In fact, there is a forum within the Xilinx website specifically devoted to the discussion and support of Xilinx development boards. You'll find it in the XILINX BOARDS AND KITS section of the user community forums. You are likely to find abundant knowledgeable help if you post to the appropriate forum. The answer to your questions may have already been discussed and answered in detail -- and possibly a search of the forum might turn up the information you seek.
Unfortunately, I'm a Spartan 6 devotee, and I am willfully ignorant of the S3AN development boards.
Whether or not Xilinx designed your S3AN board, you might find it helpful to study up a bit on how ADCs function, if they are important to your project.
Regards,
Bob Elkind
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369
Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
Re: ADC OF SPARTAN 3AN
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-08-2010 09:27 AM
gauravkumar wrote:
yes i hav simulated the code
timings of the waveforms are fullfilling the criteria given in the manual..
By "simulate," I do NOT mean, "write a simple test bench that instantiates the DUT and just displays the signals on the waveform display."
I mean -- and I am serious -- your testbench MUST include a bus-functional model of the ADC, so when your code talks to it, you get reasonable responses.
If your testbench does not have such a model, then it's not a test bench and you're not verifying anything at all.
----------------------------------------------------------------
Yes, I do this for a living.
Re: ADC OF SPARTAN 3AN
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-09-2010 09:26 PM
can you please elaborate it in mor e detail..
or send me any small example so that i can do that or if you can suggest me where to get all tht stuff..
at present i am selecting behavioral simulation from ise and simulating it using modelsim..











