9 Replies Latest reply on Jun 21, 2011 6:39 AM by userc_42267

    i2c_eeprom

      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.

        • 1. Re: i2c_eeprom
          YuxianL_01

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

             

          Regards,

             

          Roy

          • 2. Re: i2c_eeprom

            hi,

               

            here is that attachement...

            • 3. Re: i2c_eeprom

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

              • 4. Re: i2c_eeprom

                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

                • 5. Re: i2c_eeprom

                  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?

                  • 6. Re: i2c_eeprom

                    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

                    • 7. Re: i2c_eeprom

                      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.
                      •    
                      • 8. Re: i2c_eeprom

                        hi,

                           

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

                           

                        vijay s

                        • 9. Re: i2c_eeprom

                          hi,

                             

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

                             

                          thanks for ur suggestions.

                             

                          regards,

                             

                          vijay s