- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a DS1307 RTC connected to I2C and an PC8574 connected to a 16x02 LCD connected to the same I2C lines in parallel.
The issue is that each of the devices work in isolation but when I try to use both, they don't work. I am using the CharLCD by Michael Bey CharLCD_I2C Component interface for PCF8574AT / HD44780 Combo .
The program is attached for your reference. Any advice is much appreciated.
PS: There are 2 no's of 4.7k pull-up resistors on the DS1307 component.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are 2 I2C master components in the project, and 1 pair of I2C bus pins. Seems this is not standard way to control 2 slaves.
Could you try watching I2C bus waveform to double-check if I2C bus waveform is OK or not?
Thanks,
Ryan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I agree with rzzh.
You need ONE master-i2c component on CY8CKIT-059 software. the PCF8574 and DS1307 are SLAVES so you have two of them.
Using this Master i2c component you select which component to use by the i2c adress.
I would suggest to write a small routine which shows you which i2c adresses are present.
Hint : Use the Bridge Control Panel software (installed together with PSOC Creator) . For using this with your CY8CKIT-059, it might be needed to use specific i2c pins (or hardware-connect them from the programmer-part to the pins you use. The Bridge Control Panel also shows the list if available i2c adresses by clicking "LIST". If connected correctly this should directly show you 2 available adresses.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is only one I2C master in the Topdesign schematic.
Sorry if the names were confusing, but the CharLCD is not an I2C master. Only the I2C_CharLCD is the master. The CharLCD uses the I2C connection from the I2C_CharLCD to run the LCD.
Hope the below images makes things more clear. The custom component file is also attached here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So I got the program to work by stopping I2C and then Starting I2C again. It is a crude system but it works for now.
The interesting thing is that when I send I2C_CharLCD_MasterSendStop(); I get the result of "2" which should be I2C_MSTR_NOT_READY and goes into an infinite loop if I wait for I2C_MSTR_NO_ERROR (0).
Any ideas what is going on?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
the error code "2" means which status?