I'm running I2C on high speed (1000 kbps) to update a TFT screen. But when I add a component (e.g. I2C LCD display) and start it by I2C_LCD_Start(), the whole thing stops working until I reduced the data rate of the master to 400 kbps.
When I remove the I2C_LCD_Start() statement it's again possible to run with a data rate of 1000 kbps.
B.t.w. I did not changed anything in the hardware configuration.
I don’t understand the reason of it. Somebody do...?
Have you looked at the buss while running 1000kbps ? What
is the C loading of the TFT ?
Phillips buss specs -
Sounds a bit as if you try running two I2C masters at the same time. There might be conflicts with the interrupt priority.
Can't you run both of your slaves on the same I2C-line?
Thanks both for replay but I think I'm not clear in my explanation... Try again:
In my test project I send data to my TFT screen via I2C. It is working great running on data rate 1000 kbps.
Now I add an other I2C slave (for example the I2C Character LCD) in my project.
When I only add the line I2C_LCD_1_Start(); in main.c, compilled and run it, the TFT screen is not updated anymore, until I changed the I2C master speed to 400 kbps and compile and run it again.
I also did not use the I2C_LCD in my project, I only start it up.
There isn’t any change in hardware, only in software. Below my project.
It seems that adding the software component reduced the data rate….but why?
Some additional info:
The TFT data is send by I2C to the TFT with the basis Start, Write and Stop functions.
@Dana: The TFT is running perfect on 1000 kbps. The second I2C slave is only attached in software, in hardware nothing changed. So I don’t think it has something to do with bus load.
@ Bob: As you can see on the schematic I have one master and two slaves. When I add in software the second slave, which is the I2C LCD, then the data rate should be reduced to 400 kbps. Maybe the I2C slave is configured for not higher than 400 kbps? I can’t find that in the specs.
Maybe this addition helps I hope…
I don't know if the LCD is reacting as master... I can't find in the datasheet if it's a slave or master. I should think that the master controlles the slave which is the LCD.
From the I2C definitions: Slave: the device addressed by the master. And that is what I'm doing.
Maybe I have to do some more test to see what realy happens.