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.

Read data from LMH0030

Other Parts Discussed in Thread: LMH0030

Hello,

I am trying to read a a register from the LMH0030. After writing the adress and toggle the ACLK PIN the LMH0030 should drive 0b10 in pins 9:8. However, I get always 0b00. Maybe the problem is in the initialization of the bus.

Could you write for me the code to initialize the port?

My code is:

// Initialization

output_toggle(ACLK_LMH0030);
output_toggle(ACLK_LMH0030);
output_toggle(ACLK_LMH0030);
output_low(ACLK_LMH0030);

// Read operation
output_low(ANC_CTRL_LMH0030);
output_high(RD_WR_LMH0030);

// Address
output_low(AD9_LMH0030);
output_low(AD8_LMH0030);
output_low(AD7_LMH0030);
output_low(AD6_LMH0030);
output_low(AD5_LMH0030);
output_low(AD4_LMH0030);
output_low(AD3_LMH0030);
output_low(AD2_LMH0030);
output_low(AD1_LMH0030);
output_high(AD0_LMH0030);

// Toggle the ACLK
output_high(ACLK_LMH0030);

// Now I should get a '1'

control_9 = input( AD9_LMH0030 );

Thanks and regards,

Félix.

  • Please follow the example described on pages 11-12 of the LMH0030 datasheet (CONTROL DATA READ FUNCTIONS section).  Essentially, first (following power on) toggle ACLK 3 times to initialize the port, then:

    1. Set ANC/CTRLb low.
    2. Set RD/WRb high.
    3. Present 0XXh to AD[9:0] as the register address (to read).
    4. Toggle ACLK.
    5. Release the bus driving the AD port.
    6. Read the data present on the AD port.
    7. Toggle ACLK to release the AD port.

    Please note step 5.  Data from the selected register is driven to the port within a few nanoseconds immediately following the rising edge of ACLK.  To avoid contention with the port, the address driver should be turned off or tri-stated immediately after the address is clocked into the device.  (If you are still driving logic low to AD[9:8], then you will always get back 0b00.)

    Gary Melchior

  • Thank you Gary for your fast reply!

    I am using a microcontroller, so maybe times are not as  fast as needed in this application. How much time should I turn-off of tri-estated the bus in?

    I have tried to tri-estated it, but I already get 0b00 in AD9-AD8.

    Regards,

    Félix.