- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Everyone,.
I want to use capsense chip as a slave with I2C comminication. There are five capsense button. If I pressed first button 1. led working .If I pressed second button 2. led working. How do I code for master and slave. I don't know I2C comminication. I should send 1 byte for every button. I would appreciate if you give an idea.Thanks
- Labels:
-
PSoC 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You would be better start with example design, for example, DelSig_I2Cs
You'd use one byte for a LED or one bit for a LED
That's depend on your design, Both OK.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- read on e.g. wikipedia on I2C (https://en.wikipedia.org/wiki/I2c ) to learn and understand this system
- read the datasheet of the device you want to talk to (you didn't even tell which one it is), to learn how it works
- the easy part: read the I2C component data sheet, and look up the examples for this component
- write the program you need 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aargh! This should have been a numbered list. And in the HTML it even is marked as such! Who had the idea to style numbered list without numbers?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oh, so you want to connect two PSoCs with each other? I think that, then, the Slave should read the data the master writes, shouldn't it?
No, I don't have an example handy, but maybe one of the examples for the I2C component may help?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi hli.
Yes I want to use two chip as a master and slave. I try to send 1 byte when pressed button and led will work . But when i send to data form master, all leds working side of slave. When i pressed button1, led1 will work. When I pressed button2, led2 two will work. I want to do this.When i pressed button,probably I should send to differents data side of master.But i can't do this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Since the code you posted has no receive part on the slave, it cannot be the one you used to get it work with one button. And since you got it working already (for a single button at least), what is your real question anyway? There is, AFAIK, no existing example for the exact requirements you have. So no-one here can point you to one...