- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 !!
Solved! Go to Solution.
- Labels:
-
PSoC 5 Device Programming
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You just need to send the data to the LCD with a single transaction using I2C_MasterWriteBuf() API.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.