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.


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?


1 Answer 1


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.

  • \$\begingroup\$ Assuming that processing overhead isnt a concern for me, since both MCU have a processing speed of over 100MHz. Would you still recommend SPI? And Is there anything I need to see when using general purpose I/Os rather than SPI? \$\endgroup\$ Feb 1, 2021 at 14:21
  • \$\begingroup\$ If the shift registers are driving a real-time device such as a display, then watch out for other processing interruptions causing jerkiness in your output. \$\endgroup\$
    – Mattman944
    Feb 1, 2021 at 14:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.