i2c_eeprom

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

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.

0 Likes
9 Replies
Roy_Liu
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 10 questions asked

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

   

Regards,

   

Roy

Roy Liu
0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

hi,

   

here is that attachement...

0 Likes
Anonymous
Not applicable

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

0 Likes
Anonymous
Not applicable

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

0 Likes
Anonymous
Not applicable

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?

0 Likes
Anonymous
Not applicable

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

0 Likes
Anonymous
Not applicable

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.
  •    
0 Likes
Anonymous
Not applicable

hi,

   

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

   

vijay s

0 Likes
Anonymous
Not applicable

hi,

   

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

   

thanks for ur suggestions.

   

regards,

   

vijay s

0 Likes