Forum Discussion

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

Urgent! hardware interface between FPGA DE2 board(3.3V) and ADC(5V)

HI, may i ask your guys a favor.

I am using DE2 board for my project and i need to interchange signals(SPI) to an ADC. The ADC is 5V for logic high but the max output signal for DE2 board is only 3.3V.

I have tried to use the level/voltage translator(SN7417/SN7407) but it seen like not applicable for my design as i am using 1MHz sample frequency. The SN7417 can convert from 3.3V to 5V till frequency around 5kHz only.

I want to ask those have done the implementation before which ic or translator you are using for high frequency signal like my case?

I am very appreciated your help. Thank you in advanced.

P/s: Even for the 5V to 3.3V conversion, i used voltage divider but it also limited to 200kHz. Those more than that will be distorted or gone.

10 Replies

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

    Yre you sure, that the ADC actually needs 5V input level? Many devices have TTL-compatible inputs, that can be controlled by 3.3V LVTTL as well.

    If you actually need a level conversion, any 74HCT or AHCT logic with 5V supply can do. DE2 GPIO pins have RD networks and can work with 5V logic level. The current load to the driving logic may be too high. Adding a 470 ohm to 1k series resistor near the DE2 board should give good waveforms without overloading the driver. A 5V tolerant 3.3V logic gate, e.g. from 74LVC family would be the optimal solution for 5V to 3.3V level translation.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Yre you sure, that the ADC actually needs 5V input level? Many devices have TTL-compatible inputs, that can be controlled by 3.3V LVTTL as well.

    If you actually need a level conversion, any 74HCT or AHCT logic with 5V supply can do. DE2 GPIO pins have RD networks and can work with 5V logic level. The current load to the driving logic may be too high. Adding a 470 ohm to 1k series resistor near the DE2 board should give good waveforms without overloading the driver. A 5V tolerant 3.3V logic gate, e.g. from 74LVC family would be the optimal solution for 5V to 3.3V level translation.

    --- Quote End ---

    Well, if you ask me why i so sure that ADC need 5V input level, because i tested the interface without the translator but i fail to obtain any result. Well, of course i asked my lecturer for this matter and he told me the need to use the translator.I am using ADC: ADS7861. I tried to use TXS0108E level translator from texas instrument but it is so sensitive and attached lot of noise. Then i realised by reading other post that the TXS is for short trance and without cable while i use jumpers for the connection.

    Well, i have ordered the SN74LVC244A from texas Instrument thru farnell. It take few days for my order arrival. Is this translator apply to my design, for the 1MHz?

    I tried to use op amp as comparator to form this translator but it fail. It should work theoretically.

    Actually i am quite rush as i need to submit this before 10/4. After confirming functionality of this hardware, i still need to test my software. I hope you can reply me as soon as you read this. Thanks a lot.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    74LVC is a "3.3V node" logic, so it's not suited for 3.3V to 5V translation, but it's good for the 5V to 3.3V direction, as I previously stated. It surely works for the 8 MHz speed required with ADS7861 (and a lot more).

    I verified, that ADS7861 has a 5V CMOS level specification (VIH > 3.5V) so it can't be reliably driven by DE2 3.3V logic outputs. A 5V logic IC with TTL level specification (VIH > 2.0 V) can perform the conversion. 74HCT244 would be suitable 3.3 to 5V translator (or 74HCT04 for inverted signals).
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thanks FvM!

    I will try that once my online order is available. i need to order online through the Farnell Company. Maybe 3 days i should wait.:mad:
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    74LVC is a "3.3V node" logic, so it's not suited for 3.3V to 5V translation, but it's good for the 5V to 3.3V direction, as I previously stated. It surely works for the 8 MHz speed required with ADS7861 (and a lot more).

    I verified, that ADS7861 has a 5V CMOS level specification (VIH > 3.5V) so it can't be reliably driven by DE2 3.3V logic outputs. A 5V logic IC with TTL level specification (VIH > 2.0 V) can perform the conversion. 74HCT244 would be suitable 3.3 to 5V translator (or 74HCT04 for inverted signals).

    --- Quote End ---

    Good morning,Fvm.

    I still facing problem in voltage level conversion. When i separated ADC and DE2 board. The output of voltage translator can be converted from 3.3V to 5V. However, after i combine the input of ADC(clk and conversion start control signal) to the output of voltage translator, the signal is distorted and it cant reached 5V(De2(3.3V) --> input (3.3V)voltage translator output (5V--- measure here after combine with ADC) --> ADC).

    This even worse for my conversion start signal. There is nothing extra along the transmission of signal between this two ports expect a pull up resistor connector at the output of translator(i connect according to datasheet, the conversion of 3.3V to 5V would not work if i remove this resistor ).

    I just wondered that u stated ADS7861 has a 5V CMOS level specification (VIH > 3.5V). I have no idea what is the problem. Is it because of the internal voltage of ADC ?(it has some when i measure the output of ADC when it connect nothing).

    One more thing is about the Vih. Of course when i refer to my lecturer, he told me the Vih is high than 3.3V and i need to use a translator. However, the Vih is only 3V to Vdd+0.3 when i refer to page 3 of datasheet. You mention before it is a 5V CMOS and Vih is more than 3.3V, may i know where you verify that?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Sorry, i don't understand why a pull-up resistor is involved in your level translation circuit. If so, there may be a problem of the resistance value. I made a clear suggestion, but I don't know, which circuit you actually implemented. You may want to show a schematic.

    Apart from level translator circuit details, there may be a problem of inadequate wiring.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Sorry, i don't understand why a pull-up resistor is involved in your level translation circuit. If so, there may be a problem of the resistance value. I made a clear suggestion, but I don't know, which circuit you actually implemented. You may want to show a schematic.

    Apart from level translator circuit details, there may be a problem of inadequate wiring.

    --- Quote End ---

    Hi, thanks again for your reply.

    While waiting to the HCT, i tried another translator, it work but no up to 1MHz, it is only up to 2ooKHz for the squrewave without turning into sawtooth wave. The HCT f my order haven't reach me yet:mad:

    http://rapidshare.com/files/371907323/sn7407.pdf.html

    May you refer to the the pdf above, page 4 the 1st circuit connection? I constructed according to this but i didn't put the capacitor as i don't need a filter.Thus, i only use the pull up resistor. The Vcc is 5V.

    Then there is no problem after output of translator is fine. Problem occurred when i connected to ADC( i supply 2 control signals).The waveform distorted when i combine this translator and ADC.

    Please refer to :

    http://rapidshare.com/files/371894736/upload.rar.html

    I doubt if it is the internal structure of ADC that makes the waveform distorted when 2 signals are transferred. No distortion if only 1 connection is made between ADC and translator but there will be if more than 1 lines are connected.

    One more thing, can you let me know about the Vih?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi, thanks again for your reply.

    While waiting to the HCT, i tried another translator, it work but no up to 1MHz, it is only up to 2ooKHz for the squrewave without turning into sawtooth wave. The HCT f my order haven't reach me yethttp://www.alteraforum.com/images/smilies/mad.gif

    http://rapidshare.com/files/371907323/sn7407.pdf.html

    May you refer to the the pdf above, page 4 the 1st circuit connection? I constructed according to this but i didn't put the capacitor as i don't need a filter.Thus, i only use the pull up resistor. The Vcc is 5V.

    Then there is no problem after output of translator is fine. Problem occurred when i connected to ADC( i supply 2 control signals).The waveform distorted when i combine this translator and ADC.

    Please refer to :

    http://rapidshare.com/files/371894736/upload.rar.html

    I doubt if it is the internal structure of ADC that makes the waveform distorted when 2 signals are transferred. No distortion if only 1 connection is made between ADC and translator but there will be if more than 1 lines are connected.

    One more thing, can you let me know about the Vih?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    I doubt if it is the internal structure of ADC that makes the waveform distorted when 2 signals are transferred.

    --- Quote End ---

    Sounds really unlikely. The clock waveform looks very much like something's connected incorrectly in your circuit.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Sounds really unlikely. The clock waveform looks very much like something's connected incorrectly in your circuit.

    --- Quote End ---

    HI,FvM.

    I checked the connection already. Actually there is not much to check. The signal to input of ADS7861 is expected sinusoidal waveform. Then the connection after ADC is only direct to the voltage translator without any component added in between. I checked before ADC and output of voltage translator as i mentioned last thread. They are no problem. Then, the distorted waveform arise after i combined these two part.