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

PSoC™ 5, 3 & 1 Forum Discussions

Anonymous
Not applicable

Hello,

I am currently working with four PSoC 5LP (CY8C5888LTI-LP097) and with a 4x20 LCD (NHD-0420D3Z). I am using the I2C (multi-master) and the I2C_LCD components in PSoC Creator 4.2 to make them communicate between each other.

I am relatively new to I2C but I managed to make the LCD switch between the different PSoC but here is my actual question:

- How can I make the PSoCs send data to the LCD all at the same time (each PSoC has a designated line of the LCD) ?

I wanted the code to be the same for every PSoC, that's why I am currently using multi-master mode, but it's becoming evident that it will not be possible. I think the answer is having a master (buffer) and 3 slaves but I don't know how to handle it using multiple PSoC and the I2C_LCD component.

I would be very grateful for some guidance,

thank you !!

0 Likes
1 Solution
Yugandhar
Moderator
Moderator
Moderator
1000 replies posted 5 likes given First comment on blog

Hello,

Please refer the below attached project which give some information on how Multi_Master and slave communication takes place. In this project, Master1 is PSoC 4200 device , Master2 is PSoC 4200 ble device and Slave is PSoC 5LP device. Slave(PSoC 5LP) has LCD interface we can see the Master sent data on LCD. You will get some idea on what actually happens during Multi_Master communication.

When one master is communicating others will wait until completion and starts communicating when their turn comes.

Thanks,

PSYU.

View solution in original post

0 Likes
4 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

I would suggest you using Multi_Master I2C. Only the PSoC5 bearing the LCD is a slave. The arbitration will be solved by the masters as stated in the datasheet (I didn't try yet).

Bob

0 Likes
Anonymous
Not applicable

That would probably work if one PSoC was handeing the LCD but I forgot to specify that my current setup has the LCD connected with all the PSoCs through the I2C.

The problem is that they all try to send functions to the LCD at the same time. Is there a way to detect if the I2C is busy and make the PSoC wait before sending the functions ?

Thanks

0 Likes

You just need to send the data to the LCD with a single transaction using I2C_MasterWriteBuf() API.

Bob

0 Likes
Yugandhar
Moderator
Moderator
Moderator
1000 replies posted 5 likes given First comment on blog

Hello,

Please refer the below attached project which give some information on how Multi_Master and slave communication takes place. In this project, Master1 is PSoC 4200 device , Master2 is PSoC 4200 ble device and Slave is PSoC 5LP device. Slave(PSoC 5LP) has LCD interface we can see the Master sent data on LCD. You will get some idea on what actually happens during Multi_Master communication.

When one master is communicating others will wait until completion and starts communicating when their turn comes.

Thanks,

PSYU.

0 Likes