This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LMH6881

Other Parts Discussed in Thread: LMH6881

I downloaded the example circuit for Tina that uses the LMH6881 differential VGA. It displays numerous graphs, which lead one to believe that you can simulate the device at different gain setting. How do I use the SPI interface to do this, that is change the gain setting? I can’t correlate the data sheet to the spice model for the SPI interface  Do you have a phone number? If not please explain slowly and explicitly.

Thank you kindly,

Jim Carlini  585-330-7155

  • Jim,

    Thanks for the call back. I enjoyed speaking with you.

    As I said, we don't try to emulate the digital functionality like the SPI bus.

    The 7 parallel bits in the model are intended as a work-around that allows the same settings as the SPI bus.
    Set the voltage sources VB0 - VB6 per the instructions in the text box and the gain table in the data sheet and you can run through all the gain settings in 0.25dB steps.

    Please feel free to give me a call if you have any more questions.

    Regards,
    John

  • Hi John,

    Thank you for the correct answer. I can see how it would be difficult to simulate the dynamics of the SPI input with the clock, data and CSb lines in a spice simulation.

    However I tried the parallel inputs as suggested and the models behaves fully as expected.

    Thank you,

    Jim

     

  • Hi,John
    Could you tell me how to use SPI mode to change the gain.I want to use stm32 to cotrol it.

  • Is your question about using the SPI port in a real device?

    Regards,
    John

  • Yes,I want to use lmh6881 to magnify the signal of the sensor,and it need 0.25db step everytime.My most part of the circuit is designed by the example circuit for Tinathat uses the LMH6881 differential VGA.My SPI pin set high voltage.and now I want to control its gain ,but when the lmh6881 is power on,it will be very hot,and i don't know the circuit is right or not.May I have your email to ask more questions about my circuit ?My email :shenxingrong91@163.com

    Thank you kindly,

    Alice

  • Hi Alice,
    Can you provide more informatino like the supply voltage you are using and the temperature of the amplifier. Are you using an evaluation board or a board of your own design?
    Regards,Loren
  • I'm glad to recieve your reply.It's a borad I designed,the supply voltage is 5V,and the OCM pin is 1.1V with a cap to GND.I set SPI pin hign voltage and SD pin low voltage.The INMS and INPS pins are floating.and the INMD,INPD  connect the output of the sensor.The SDI,SDO,CLK,CS connect the GPIOs from stm32 respectively. the SDO pin connect one resister about 300Ω.It's all my  schematic .Please give me some advise to improve it.

    regards,Alice.

  • Hi,John
    Now,I designed a 2 layers board to test the spi mode of lmh6881,and i designed the circuit by lmh6881 evaluation board,i can use it in parallel mode ,but i cannot use it in spi mode .the questions are:
    1,the spi clock i use 10--18mhz,is it ok
    2,i use stm32 as the master,and send data to lmh6881,the cpol=0 and cpha=0,is it right?
    I`m looking forward your reply.Thank you very much.
  • Hi Alice,

     

    The clock speed is fine.  You can check the clock polarity and edge settings against the timing diagrams in the datasheet.  Different SPI controllers implement the CPOL and CPHA differently. 

     

    If you look at page 9 of the EVM datasheet it shows the SPI settings we use in the eval board GUI.  We set CPOL to inactive low and CPHA to the following edge (not sure if this is a 1 or 0). 

    Have you set the Pin5 to a logic high state in SPI mode? 

     

    Regards,

    Loren

     

  • yes ,i set the pin5 to a logic high state in SPI mode.but it also cannot work.when i read the lmh6881 ID,it recieve nothing just 0.i think if the problem is the circuit ,but the parallel mode is ok ,so i want you give me some advice to improve the design.thank you .
  • Hi Alice,

    Are you using a resistor between 250 and 400 Ohms from teh SDO pin to ground?  Are the other SPI pins not connected to ground with resistors? 

    When you send SPI commands does the device cahange gain? 

    Regards,

    Loren

     

  • Yes,I use a resistor 300 Ohms from the SDO pin to ground.But the other SPI pins(CLK,CS,SDO,SDI) are not connected to ground with resistors.According to the lmh66881EVM ,the SPI pins(CLK,CS,SDI) are connected to VCC with 1.5kohm resistors.And the pin5(spi),pin17(sd) and pin14(dcoc) are connected to VCC with 5k ohm resistors.and now i have a new question in parallel mode ,when i set the SW6(the cs pin) to the ground,the power current will up to 150mA.and the wave is very bad .when it is in logic high state, the wave is ok ,but have a loss in gain.
  • Hi,Now,I can read the ID, when the spi pins are floating. yes ,the pin3,pin15,pin16 are not connect to 5v with resisters.but another board (the pin3,pin15,pin16 connect to 5v with resisters) are not read the ID ,i don`t know why.
  • Hi,Loren,

    I`m sorry that I cannot use the lmh6881 very well.One board I make is seems ok to work ,but still have some questions,when the spi  pins connect to vcc(5v) with 1.5k ohm resisters,the ID I cannot read.when the spi pins are all floating ,the voltage on them are 3.3v,and the usbtospi can read the id,(when i send 0x80,0x81,0x82,0x83,I can recieve the default hex 01,20,00,50).but it cannot write data into register3.

    but when the voltage on them are 2.2v ,the lmh6881 put out nothing but 0x00.

    I`m looking forword to your reply.Thank you very much.

    yours

    Alice.