You are here

i2c communication master and slave | Cypress Semiconductor

i2c communication master and slave

Summary: 3 Replies, Latest post by Bob Marlowe on 13 Jan 2012 03:30 AM PST
Verified Answers: 0
Last post
Log in to post new comments.
nitinkumarkokane's picture
1 post

i received code from dtata sheet .to transmit data from master to slave and again receive data rom slave.

but when i trans mit data to slave . slave receive data.

but master have next instruction to check whether write is complete. there is while loop to check staus of write. and my master controller stuck in that loop.

user_11685479's picture
41 posts

There is a mistake in the I2CHW code, which misses a pair of parentheses. The code to check if the write is complete is:

while(!(I2CHW_1_bReadI2CStatus() & I2CHW_WR_COMPLETE));

Check with this modified code and see if it works.

mamta's picture
3 posts

I am new user of PSOC 5,Trying example codes of Psoc creator.I am not getting O/P of EZI2C example.

I have just connected P0(1) to sw1 and P1(2) to sw2, according to instruction.(Refer EZi2c Design Example)

On LCD display the result shown as "sw1 to write","Sw2 to read",But if i press any switch its not reading or writing any data.

Do i need to make any more connections?any changes has to be made in code?

Thank you

user_1377889's picture
9241 posts

It is always easier for us to check what you have done when you post your complete project here.

Do do so,

1st. Clean Project

2nd. Create minimal archive

3rd. Attach the archive to your post right here.


We'll have a look at it.



Log in to post new comments.