You are here

i2c_eeprom | Cypress Semiconductor

i2c_eeprom

Summary: 9 Replies, Latest post by viji on 21 Jun 2011 06:39 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
viji's picture
User
19 posts

hi,

 

i have downloaded a example i2c_eeprom project from cypress website, which is not working i directly burn it to the psoc3, whereas it is working when i run it step by step with the use of miniprog3 debugger, i am working with the psoc3 development kit  , CY8CKIT-001, CY8CKIT-009 PROCESSOR MODULE, i am attaching the example project , here. pls solve this issue..

 

REGARDS,

VIJAY S.

yliu's picture
Cypress Employee
48 posts

Hello, maybe your attachment failed, could you try again or provide the link you download it?

Regards,

Roy

viji's picture
User
19 posts

hi,

here is that attachement...

U2
uday's picture
Cypress Employee
569 posts

How are making sure that it is working in debug mode. 

viji's picture
User
19 posts

hi,

while running the program in debug mode, step by step, according to the program, all the write and read functions are passing and it goes to the display function also, and displaying  all the read data from the I2C_EEPROM, to the LCD, thus confirmed it is working in debug mode. if the program is flashed to the psoc3, i think it is stucking some where, means it is not successfully, reading or writing, so please find the exact and solve this issue..

regards,

vijay s

U2
uday's picture
Cypress Employee
569 posts

Could you tell us more about the I2C EEPROM used. Could also give us some information about the hardware setup. How is the I2C EEPROM connected to PSoC. Are you using any of the Cypress kits?

viji's picture
User
19 posts

hi,

I2C EEPROM used-- AT24C04

IO CONNECTED-P0[1]--SDA, P0[0]--SCL

A 2.2K is pulled up on P0[1].P0[0] Pins.

 

The same connectivity details are available in the main.c file in the example project, which is attached in the previous posts..

 

regards,

vijay s

viji's picture
User
19 posts

hi,

as per your reply earlier, there is no attachement, pls send me that attachement also.

vijay s

viji's picture
User
19 posts

hi,

as per your suggestions, i tried, it is working fine now.

thanks for ur suggestions.

regards,

vijay s

U2
uday's picture
Cypress Employee
569 posts

Hi Vijay,

  • There are two thngs which needs to be looked at.
  • The pin configuration in your project is as follows, P4[5]--SDA, P4[4]--SCL. Ensure that these are the pins you are using for I2C communication
  • From the I2C EEPROM datasheet, when you perform a read operation, the sequence is as Shown
  • After giving the device address and word address are sent to the EEPROM chip, there needs to be a Repeat Start before providing a read command, as shown in the picture above.
  • Hence i have modified the APIS calls on line 153 to I2C_MasterWriteBuf(SLAVE_ADDR, cMessage, 1, I2C_MODE_NO_STOP) and that on line 164 to I2C_MasterReadBuf(SLAVE_ADDR, cRx_Buffer,cLength-1, I2C_MODE_REPEAT_START ).
  • I have attached the same project. I hope this helps.
Log in to post new comments.