I2c frame

06 Dec 2010

Hello

Im trying to see the I2C frame of the mbed but i've got some trouble.

 

#include "mbed.h"

I2C i2c(p28, p27);        // sda, scl


const int addr = 0x72; 

int main() 
{
    char data[] = {0x00, 0x17, 0x3F, 0x06, 0x5B, 0x4F}; 
    
    while(1)
    i2c.write(addr, data, 6); 
  
    
    
}
When I plug a scopemeter ont the pins I would see the frame?

But even on the SCL I had nothing.

Somebody knows why?

07 Dec 2010

Hi Sadiman,

Do you have the I2C pull-up resistors connected to the I2C bus? Without these, you are unlikely to see anything.

Simon

07 Dec 2010

Hi

I've put the pull-up resistor but I have something weird.

On the SCL it is ok I have the correct frame with peak voltage of nearly 3V.

But on the SDA I have a frame but it is below 1V.

I've chosen resistor of 2.2K.

07 Dec 2010

Dear,

I use 2k7 resistors. So that should work. But are you using a 3V-Device or is it a 5V-Device.

Br

T.

07 Dec 2010

I want to connect the Saa1064 which is a 5V device.

I've heard that there will be a problem and I should use a level converter.

When I look at the SAA1064 datasheet, I thought maybe this will not be useful

PARAMETER                      CONDITIONS SYMBOL   MIN.      TYP.      MAX. UNIT


Logic input voltage LOW                          VIL(L) −                   − 1,5        V
Logic input voltage HIGH                         VIH(L) 3,0            −              − V

But the problem is that I just wan't to see the frame without any connected devices and I have a weird result for the SDA.

I've tried when the SAA1064 is connected, it gives the same results.

08 Dec 2010

Ok it works.

 

I change for pins 27 and 28.