Electronic – Properly connecting Shift-Registers to microcontroller

esp32shift-registerspistm32

While working on a circuit, I am confused on connecting daisy chained 74HCT595 and 74HCT165 to microcontroller.

I am developing the circuit so that microcontroller can be connected as separate add-on module. I am planning to use:

  1. ESP32
  2. STM32

The confusion is that the Shift-Registers refer to SPI communication on some internet sources while others say it is not an SPI device. I did refer to the datasheets which makes no reference to SPI, but I have been able to make these work over SPI.

Question:

Do I need to connect the Shift Registers to SPI (MISO/MOSI/CLK) pins, or can it be connected to any general purpose GPIO on both the above micro controller?

Best Answer

You can always bit-bang the shift registers using general purpose I/Os. However, it may be more efficient (less processor overhead) to use the SPI interface. This assumes that the SPI interface is versatile enough to create the waveforms that you require.

The SPI interface on a typical MCU is fairly versatile. For example, many people drive WS2812 LED strips with an SPI interface.