Hi, I’m trying to set up a combination of HC595 and HC165 as port expanders on a D1-mini.
The HC595 Part was easy
spi:
clk_pin: GPIO14
mosi_pin: GPIO13
miso_pin: GPIO12
sn74hc595:
- id: 'sn74hc595_hub'
type: spi
latch_pin: GPIO04
sr_count: 2
switch:
- platform: gpio
name: "SN74HC595 Pin #0"
pin:
sn74hc595: sn74hc595_hub
number: 0
inverted: false
- ...
on to the questions:
-
the interface runs at 4MHz clock rate and I can’t find the config to reduce that. The high rate is not neccessary in my case and a lower rate would reduce the demands on the quality of the wiring
-
it looks like the sn74hc165 component can’t use HW SPI.
If that is correct, then why? -
if sn74hc165 component could be run using HW SPI too, would it be possible to share the SPI controler with the HC595s