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.

CCS: LMP91000:

Other Parts Discussed in Thread: LMP91000

Tool/software: Code Composer Studio

We are working in our project where we are trying to use you chip (LMP91000) to read the Oxygen concentration using Euro-Gas micro O2 sensor.

We changed the parameters to be compatible with the gas sensor and it's working perfcut with Arduino , but with - mikroc - it's dosn't work stop after checking ( 0x48 Device Address )

We are looking forward to your kind help and support ,,

  • Dear user6246305 - 

    Did you by chance also lower the MENB pin before attempting an I2C transaction? 

    See here below for what this looks like from logic capture (click on them to see larger)- 

    Overall: 

    Zooms on first I2C comms

    over I2C (on address 0x48 (7bit), 0x90 (8bit))

    do have you similar logic captures to show where it fails for you?

  • Dears,


    We have enabled the chip by the ground the MENB pin. In fact, we are trying the communicate with the chip but there is no acknowledgment from the chip itself.

    below our code:

    I2C1_Start(); // Start I2C
    I2C1_Wr(0x90); // Send 8 bits of chip address (0x90)
    I2C1_Wr(0x01); // Send Registor (0x01)
    I2C1_Wr(0x00); // Send Data value (0x00)
    I2C1_Stop(); // Stop I2C

    Could you please let us know what is the issue with our chip...

  • Dear user6246305 - 

    Just to be clear, you are using the MENB pin similar to a chip select, correct? (not just grounding it)

    I am assuming the mikroc is a PIC MCU device, correct? Perhaps sending over your schematic and the logic capture of what is actually occurring on your I2C lines + MENB behavior would be helpful to us. 

  • Just to be clear, you are using the MENB pin similar to a chip select, correct? (not just grounding it)

    Note : R3 = 1K

    I am assuming the mikroc is a PIC MCU device, correct?

    Yes,,

  • thanks -

    so you have MENB always pulled down and the MCU is keeping GPIO high to disable comms to the part? I think I would instead have pulled it high and had MCU go low - may want to look at the power savings difference between those if it matters to you - this way looks like 3.3mA system current draw for periods of time you could otherwise be low on MCU GPIO.

    Do you have pull-up resistors on the I2C lines? 

    in looking here, http://download.mikroe.com/documents/compilers/mikroc/dspic/help/i2c_library.htm

    you may want to also check: 

    void I2Cx_Init(unsigned long scl);

    is setup the way you expect here and that sending 8 bit address is expected too - it seems that their driver might expect 7 bit by default

    also, capture what is happening on I2C and make sure what is being sent :)