- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
I wrote a program in C to read/write an 24C64 external serial eeprom for CY7C64315-16 chip.
I used P1[5] as SDA and P1[7] as SCL and set both pins as I2C open drain low and connected external pull-up resistor (5.6 K ohms) on both pins.
My program works fine to write data to external eeprom. I checked it using an external read/write programmer device.
But when I try to read data from the eeprom it seems the SDA pin cannot be read by my program.
I'm assuming that P1[5] when set as I2C and open drain low it works as bidirectional, correct?
Which instruction in C should I use to check the SDA pin status (P1[5]) coming from external I2C eeprom?
Any additional advices are welcome.
Best regards,
Anne.
Solved! Go to Solution.
- Labels:
-
PSoC1 MCU
-
PSoC3 MCU
-
PSoC5 LP MCU
- Tags:
- i2c
- SDA pin read
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Since you can "write" data to the deivce, I hope that the SDA pin is OK.
But from my experience, read operation and/or some operations which requires the device some preparation,
you (or we) need insert delay after sending "start(I2C_READ_MODE)" or "restart(I2C_READ_MODE)."
So how about adding CyDelayUs(100) or CyDelay(1) if you are using PSoC Creator,
or add similar delay function before reading the value?
moto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Anne,
I believe you posted this question in the wrong forum section. This sub-forum supports the PsoC1, PSoC3 and PSoC5 CPUs.
I believe you want the "USB" forum with one of the sub-forums listed below.
In this forum, I don't think you'll get the "eyes" you need to solve your issue.
"Engineering is an Art. The Art of Compromise."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Since you can "write" data to the deivce, I hope that the SDA pin is OK.
But from my experience, read operation and/or some operations which requires the device some preparation,
you (or we) need insert delay after sending "start(I2C_READ_MODE)" or "restart(I2C_READ_MODE)."
So how about adding CyDelayUs(100) or CyDelay(1) if you are using PSoC Creator,
or add similar delay function before reading the value?
moto