Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 1 > ezI2c module in CY8c24994

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



ezI2c module in CY8c24994
Moderator:
ARVI

Post Reply
Follow this topic



ezI2c module in CY8c24994

robertseczkowski posted on 22 Jun 2010 8:42 AM PST
Top Contributor
89 Forum Posts

I have used sucessfully miniprog3 for I2C data exchange with PC as Master.

BUt when it came to PSOC1 The miniprog3 reads or writes wrong data!

for example :

write 04 01 (addres 4 first byte of 1) is sucessfully acknowledged up to 0B (data) (w 04+ 01+ p) and (w 04+ 0C- p)

write 04 0C up to FF doesn't get acknowledged

speed 100k on both sides, no external pullups resitors(as it was not required with psoc 3)

What is wrong?

I played with P10 and P11 pin configuration from res-pullup to open-drain-low but no success




Re: ezI2c module in CY8c24994

robertseczkowski posted on 22 Jun 2010 08:50 AM PST
Top Contributor
89 Forum Posts

One mor thing:

although I have only one device connected The miniprog shows the list of  devices(for me it looks to be two of them):

Devices list:  8bit  7bit
     address:  08    04

following is funny thing

w 08- 01- p
s 08+ 01+ p
r 04+ 0F+ 0F+ 0F+ 01+ 00+ 00+ 00+ p
s 08+ 01+ p
r 04+ 0F+ 0F+ 0F+ 01+ 00+ 00+ 00+ p
w 04+ 08+ 01- p
 



Re: ezI2c module in CY8c24994

robertseczkowski posted on 22 Jun 2010 09:09 AM PST
Top Contributor
89 Forum Posts

another issue:

miniprog3 shows 3920mV against measured on VTARG pin 4820mV

Why is that?



Re: ezI2c module in CY8c24994

robertseczkowski posted on 22 Jun 2010 09:24 AM PST
Top Contributor
89 Forum Posts

There is no communication either in 50K speed not 400k speed



Re: ezI2c module in CY8c24994

graaja posted on 22 Jun 2010 07:28 PM PST
Top Contributor
41 Forum Posts

The first problem that you have described (where 0x0C to 0xFF are not acknowledged) is strange.  I am not able to comment on this without having a look at the PSoC1 project.

Regarding the address:
The 7 bit address is the address value without the Read / Write bit.  This is the address that you would have set in the I2C user module parameter in the PSoC1 project.  When a Master wants to read or write to the I2C slave, it left shifts the 7 bit address by one bit and adds the Read / Write bit.  A 0 in the R/W bit means a write operation and a "1" means read operation.  So, when Master wants to write to the slave, it will use address 0x08 and to read 0x09.

Now coming to the "w" and "s" commands.  The "w" command is a write command where you pass the 7 bit address.  The bridge application will left shift the address add the R/W bit and send to the slave.  So, when you use 0x04 in the "w" command, the slave will respond.  When you use "0x08" in the "w" command, the Master will actuall be sending "0x10" as the address and hence the slave will not respond.

The "s" command is to generate a start condition and hence has to be followed by the 8 bit address.  So, if you want to write to the slave, you will use "s 0x08" followed by the data.  This is why you see the slave "ACK" the 0x08 address when "s" command is used.

The "r" command is similar to "w" command, where you provide the 7 bit address and hence the "r" command with 0x04 is working fine.

Best Regards,
Ganesh



Re: ezI2c module in CY8c24994

robertseczkowski posted on 23 Jun 2010 10:41 PM PST
Top Contributor
89 Forum Posts

Thanks for Your feedback. It clarifies addressing issue.

But still I'm not able to understand why:

w 04+ 02+ p
w 04+ 0A+ p
w 04+ 0C- p
 

The only explanation seems to me as a chip failure (PC, miniprog3,cables are the same as with PSOC3).

Above communication is only related to psoc1 hardware . The is no software API which can interfere with above comunication

EzI2C_GetActivity() returns 1 at the end of W 04 0C p I guess not after every byte (I hope)

Regards

Robert

 



Re: ezI2c module in CY8c24994

robertseczkowski posted on 23 Jun 2010 12:09 AM PST
Top Contributor
89 Forum Posts

The issue seems to be solved.

The innocent line seems to be the cause:

E2PROM_E2Read(255,(unsigned char*)&configData,64);

255 is offset from preconfig value and normally should be set to 0;

If not things like above happen

regards

robert






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: KXP; Secondary Owner: VWA; Sunset Date: 01/01/20