Replies: 4 comments 1 reply
-
I've never heard of that structure before, but apparently it's valid. However, esphome doesn't support that. |
Beta Was this translation helpful? Give feedback.
-
the mcp23s17 does not support daisy-chaining. The mcp23s17 component initializes the device(s) to use the hardcoded (A2-0 pins) device address, so using the device adresses should allow to drive up to 8 mcp23s17 with one CS-line. Haven't figured out the neccessary yaml though 8-) |
Beta Was this translation helpful? Give feedback.
-
Thank you for this letter.
I overcame this problem by doing it in Arduino, where I control 8 MCP23S17 with a CS line. It works flawlessly.
From: ll3141 ***@***.***
Sent: Sunday, September 1, 2024 5:05 PM
To: esphome/esphome
Cc: Surmi2; Author
Subject: Re: [esphome/esphome] ESP32 gpio port expansion on SPI interface (Discussion #6170)
the mcp23s17 does not support daisy-chaining.
Data is not shifted through and evaluated when CS goes inactive.
Instead the device uses a protocol similar to I2C, where the first byte contains a device address (use is optional and must be enabled), followed by a register adresse. Subsequent bytes are read from/written to the addressed and the following registers.
Using the device adresses should allow to drive up to 8 mcp23s17 with one CS-line
Haven't figured out the neccessary yaml though 8-)
—
Reply to this email directly, view it on GitHub <#6170 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/A2GH5Q6JWUGAFNBMPCBZW2DZUMUKVAVCNFSM6AAAAABCZA5RYWVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTANJRGI4DANI> .
You are receiving this because you authored the thread. <https://github.com/notifications/beacon/A2GH5QY4GWA6F2XSDIUCLDLZUMUKVA5CNFSM6AAAAABCZA5RYWWGG33NNVSW45C7OR4XAZNRIRUXGY3VONZWS33OINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAUBU2K.gif> Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Thank you very much. I will be able to use it in my next project.
From: ll3141 ***@***.***
Sent: Monday, September 2, 2024 9:21 PM
To: esphome/esphome
Cc: Surmi2; Author
Subject: Re: [esphome/esphome] ESP32 gpio port expansion on SPI interface (Discussion #6170)
ok, figured it out (digging around in github logs)
mcp23s17:
- id: mcp23s17_H1
deviceaddress: 0
cs_pin:
number: GPIO15 # D8
allow_other_uses: true
- id: mcp23s17_H2
deviceaddress: 1
cs_pin:
number: GPIO15 # D8
allow_other_uses: true
—
Reply to this email directly, view it on GitHub <#6170 (reply in thread)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/A2GH5Q4U6VX6MZ7MS5YNZK3ZUS3CHAVCNFSM6AAAAABCZA5RYWVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTANJSGQYTSOI> .
You are receiving this because you authored the thread. <https://github.com/notifications/beacon/A2GH5Q6RDBWKY6V2TJJNKB3ZUS3CHA5CNFSM6AAAAABCZA5RYWWGG33NNVSW45C7OR4XAZNRIRUXGY3VONZWS33OINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAUCLCO.gif> Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I want to use 8 MCP23S17 chips on the SPI interface. (128 gpio ports) The easiest way to do this is in a Daisy chain configuration. The ESPHome editor displays an error if I set the same CS for the chips. The chip address (deviceaddress) is set between 0 and 7. How to configure the yaml file?
Beta Was this translation helpful? Give feedback.
All reactions