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.

Control of LMH6882 Programmable Differential Amplifier

Other Parts Discussed in Thread: LMH6882, USB2ANY

We are prototyping the LMH6882 programmable amplifier and are attempting to change the gain but without success so far. We are trying to determine if the commands we are sending to the device are not correct. This is what we do at present to try to set maximum gain.

We write 80d to register 3 (channel A) by sending:

0000 0011 0101 0000

{Write [0 0 0] Reg3 [0] 80d}


We write 0d to register 3 by sending:

0000 0011 0000 0000

{Write [0 0 0] Reg3 [0] 0d}

Are there other bits in registers we should be asserting/deasserting? We assume that nothing else is required given the default state of other registers: Reg2 set to 0 (all channels turned on), Reg5 set to 3 (the attenuation value set in Reg3 is applied to channel A).

  • Hi Eoin,

    I think you are sending the commands in the right way for controlling the attenuation of register 3 (channel A). However, I wanted to askhow are you able to read the values in Reg2 and Reg5? Please make sure the pin 27 (SPI) is connected to digital logic 1. 

    Also, Is it possible for you to capture SPI digital logic on an oscilloscope to determine whether the chip select and input address and data are being transmitted correctly? Are you guys testing the LMH6882 EVM and controlling the SPI with USB2ANY?

    Best Regards,

    Rohit

  • Hi Rohit,

    We have implemented the LMH6882 on one of our prototype PCBs.

    We found the root of the problem. We first have to reset the 'Load A' bit prior to setting the required gain. Then when 'Load A' is set afterwards, the gain value is read in. 

    It seemed to me that this procedure was not evident from looking at the datasheet, or was too vague. Perhaps having an example sequence of writes would make this clearer?

    -Eoin

  • Hi Eoin,

    There is no need to reset the 'Load A' bit prior to setting the required gain for channel A (reg 0x03 hex) on power up. On power ON of LMH6882, the Control reg 0x05 hex should read the value 0x03 hex which means that Load A and Load B bits should be set to logic value 1. Could you please provide the sequence of writes which you are doing to the LMH6882?

    Best Regards,

    Rohit

  • Hi Rohit,

    When we initially tried to set the gain of channel A to maximum, we did the following:

    0000 0011 0000 0000

    This did not work.

    Then we tried resetting the 'Load A' bit :

    0000 0101 0000 0000

    0000 0011 0000 0000

    0000 0101 0000 0011

    This did work.

    -Eoin

  • Hi Eoin,

    When you initially tried to write register 3 with 0x00 hex value to set channel A to maximum value, the failed gain state scenario, what values did you read back for register 5?

    I think that the values in register 5 somehow in your code execution have been written as 0x00 hex, upon PowerON, which means the Load A and Load B bits are set to zero. In this case, no matter what value you write to register 3, the gain of channel A will not be set to the corresponding value of register 3. Later when you write  register 5 with value 0x03 hex, the gain of channel A will be set corresponding to the value of register 3 which is explained in the datasheet.

    I am pretty sure if you could write register 3 with 0x00 hex upon normal Power ON, assuming the default state fo register 5 is set to 0x03 hex, the gain of Channel A will change to maximum gain.

    Best Regards,

    Rohit