Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > confusion with ADC/DAC interface implementation

Reply
Thread Tools

confusion with ADC/DAC interface implementation

 
 
alkosd@yahoo.co.uk
Guest
Posts: n/a
 
      04-23-2010
Hi,
i am confused regarding the ADC/DAC interface implementation on FPGA.
I have read a code where after serialising the input data of 16 bits
in 16 clock cycles, the interface logic loops (in vain?) for another
16 cyles before serialising the next data. can#t understand why? why
the serialisation of the next data is not done immediately. moreover,
should the serialisation clock rate be 16 higher than the data stream
clock rate? Sorry but i could not find a documentation detailing all
the synchronization mechanism.

cheers
 
Reply With Quote
 
 
 
 
KJ
Guest
Posts: n/a
 
      04-23-2010
On Apr 22, 8:41*pm, alk...@yahoo.co.uk wrote:
> Hi,
> i am confused regarding the ADC/DAC interface implementation on FPGA.
> I have read a code where after serialising the input data of 16 bits
> in 16 clock cycles, the interface logic loops (in vain?) for another
> 16 cyles *before serialising the next data. can#t understand why?


Because things work as they are designed...not as they are intended.

Do you have a specific question or are you trolling and asking the
group to fathom why some unlisted code that is implemented in an FPGA
either keeps reading from an ADC or keeps writing to a DAC or perhaps
both?

> why
> the serialisation of the next data is not done immediately. moreover,


Thought you just said it tried again, as you say "in vain?"...sounds
immediate to me

> should the serialisation clock rate be 16 higher than the data stream
> clock rate?


If the ADC shifts out 16 bits of data, then yes it would need to be at
least 16 times as fast as you'd like to sample the analog data.

> Sorry but i could not find a documentation detailing all
> the synchronization mechanism.
>


Are you asking the group to find the documentation for you?

What you need is the datasheet for whatever ADC or DAC that you're
talking about.

Try a more informed posting after you've put some though into your
question and provide some actual details of what you don't understand
and you'll likely get better responses.

KJ
 
Reply With Quote
 
 
 
 
Tricky
Guest
Posts: n/a
 
      04-23-2010
On 23 Apr, 02:42, KJ <kkjenni...@sbcglobal.net> wrote:
> On Apr 22, 8:41*pm, alk...@yahoo.co.uk wrote:
>
> > Hi,
> > i am confused regarding the ADC/DAC interface implementation on FPGA.
> > I have read a code where after serialising the input data of 16 bits
> > in 16 clock cycles, the interface logic loops (in vain?) for another
> > 16 cyles *before serialising the next data. can#t understand why?

>
> Because things work as they are designed...not as they are intended.
>
> Do you have a specific question or are you trolling and asking the
> group to fathom why some unlisted code that is implemented in an FPGA
> either keeps reading from an ADC or keeps writing to a DAC or perhaps
> both?
>
> > why
> > the serialisation of the next data is not done immediately. moreover,

>
> Thought you just said it tried again, as you say "in vain?"...sounds
> immediate to me
>
> > should the serialisation clock rate be 16 higher than the data stream
> > clock rate?

>
> If the ADC shifts out 16 bits of data, then yes it would need to be at
> least 16 times as fast as you'd like to sample the analog data.
>
> > Sorry but i could not find a documentation detailing all
> > the synchronization mechanism.

>
> Are you asking the group to find the documentation for you?
>
> What you need is the datasheet for whatever ADC or DAC that you're
> talking about.
>
> Try a more informed posting after you've put some though into your
> question and provide some actual details of what you don't understand
> and you'll likely get better responses.
>
> KJ


Wow - grouchy this morning. Did someone **** on your cocoa-pops?
 
Reply With Quote
 
Górski Adam
Guest
Posts: n/a
 
      04-23-2010
pisze:
> Hi,
> i am confused regarding the ADC/DAC interface implementation on FPGA.
> I have read a code where after serialising the input data of 16 bits
> in 16 clock cycles, the interface logic loops (in vain?) for another
> 16 cyles before serialising the next data. can#t understand why? why
> the serialisation of the next data is not done immediately. moreover,
> should the serialisation clock rate be 16 higher than the data stream
> clock rate? Sorry but i could not find a documentation detailing all
> the synchronization mechanism.
>
> cheers


Hi,

Please specify your ADC DAC type.

BR

Adam
 
Reply With Quote
 
HT-Lab
Guest
Posts: n/a
 
      04-23-2010

<> wrote in message
news:3bf71478-a08c-4165-9af5-...
> Hi,
> i am confused regarding the ADC/DAC interface implementation on FPGA.
> I have read a code where after serialising the input data of 16 bits
> in 16 clock cycles, the interface logic loops (in vain?) for another
> 16 cyles before serialising the next data. can#t understand why?


As suggested by others your question is very vague, however, some SPI ADC have
the option to stream out the LSB first. In order to do this you first need to
stream out the MSB_first word and then you can read the LSB_first word (this
makes perfect sense for a successive approximation ADC). Thus in the LSB case
you need 2 sets of n-bit clock cycles.

Find the datasheets and (hopefully) all should become clear,

Hans
www.ht-lab.com


> why
> the serialisation of the next data is not done immediately. moreover,
> should the serialisation clock rate be 16 higher than the data stream
> clock rate? Sorry but i could not find a documentation detailing all
> the synchronization mechanism.
>
> cheers



 
Reply With Quote
 
alkosd@yahoo.co.uk
Guest
Posts: n/a
 
      04-23-2010

> Find the datasheets and (hopefully) all should become clear,


thank you for the advice. I got the datasheet at last! i'll work on
the details now. thank you again
 
Reply With Quote
 
JimLewis
Guest
Posts: n/a
 
      04-27-2010
On Apr 22, 5:41*pm, alk...@yahoo.co.uk wrote:
> Hi,
> i am confused regarding the ADC/DAC interface implementation on FPGA.
> I have read a code where after serialising the input data of 16 bits
> in 16 clock cycles, the interface logic loops (in vain?) for another
> 16 cyles *before serialising the next data. can#t understand why? why
> the serialisation of the next data is not done immediately. moreover,
> should the serialisation clock rate be 16 higher than the data stream
> clock rate? Sorry but i could not find a documentation detailing all
> the synchronization mechanism.
>
> cheers




For details of this, look up a UART in a text book.

Here is a hint in the right direction.
Assume that data (digital or analog) is transmitted between two
devices
at a certain rate, but asynchronously ie: no clock in the interface.
Can the receive clock be the same frequency of the transmit clock?
Assume there is no way to guarantee any relationship between the
two clocks. In fact, it is common for them to be slightly
different in frequency.

If the sample clock is 16X faster than the transmit, the middle
of a cycle is found when a start indication is found 8 times.
Then capturethe data values once every 16 times (because the
receive clockis 16X faster). With this slight differences in
frequency
can be tolerated - depending how many samples are taken between
realigning with a start bit.

Good Luck,
Jim
SynthWorks VHDL
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Insertion Sort : C++ implementation 100 times slower than C implementation sanket C++ 7 11-03-2011 05:00 AM
Knowing the implementation, are all undefined behaviours become implementation-defined behaviours? Michael Tsang C Programming 54 03-30-2010 07:46 AM
Knowing the implementation, are all undefined behaviours become implementation-defined behaviours? Michael Tsang C++ 32 03-01-2010 09:15 PM
confusion about header and implementation files Roman Töngi C++ 8 05-07-2005 04:25 PM
Confusion on an Array based stack implementation. Chris Mabee C++ 4 12-26-2004 03:08 PM



Advertisments