How to connect ESP32C6 to SN74HC165N

I have been looking all over the place but there is not that many posts regarding ESP32C6. I have managed to get some inputs but it looks like the clock is pulsing. This could mean I am using an incorrect pinout. Can someone share a pin connection to the ESP32C6 to/from SN74HC165N. A brief bit of code would be very helpful.

Let us know your current connection between C6 and HC165 and what you would like to do. We may be able to help.

Currently, 3V. I could not get it to work at 5V.

Let us know your current connection between C6 and HC165 and what you would like to do.
Without information, we don’t know what you are struggling with.

The C6 port is 3.3V logic, so the HC165 must also run on a 3.3V supply.

Yes. That is what I meant. 3V3

Let us know your current connection between C6 and HC165 and what you would like to do.
Without information, we don’t know what you are struggling with.

1 Like

I don’t know what you are asking. I only want to connect the shift register to esp32c6. Any configuration you can come up with will work for me.

Hi there,

SO, post a picture of how it’s currently connected… Post any code you have tried or an example, using the code tags above "</> " we can get you sorted out. WHat is the End Goal here? The Xiao has pulse generator capabilities, so is the shift register needed?
Give more info, to get better help! :+1:

HTH
GL :slight_smile: PJ :v:

Here is a G image of about 30 possible configs, you don’t indicat input or output? 30 pictures

Thank you for your reply. The question that I would like answered is:

Can I connect an SN74HC165N chip to a XAIO ESP32C6 module?

If the answer is yes, I would like pinout details of how this connection can be made. Any instructions or schematic to start me off. If you can further provide the setup() code, I can take it from there.

The HC165 has 12 input pins and 2 output pins, except for the power supply pins; the C6 has 11 input/output ports.
The HC165 and C6 can be connected, but not all pins can be connected.
If you tell us what you want to do, we can suggest the appropriate connection.
As I have said many times, we need information from you.

Example of the simplest connection

HC165                  ESP32C6
-------------------------------
SH/LD      <--------    D0
CLK        <--------    D1
E          <-------->   GND
F          <-------->   GND
G          <-------->   GND
H          <-------->   GND
Qh*        --------->   D2 
GND        <-------->   GND
Qh         --------->   D3
SER        <---------   D4
A          <-------->   GND
B          <-------->   GND
C          <-------->   GND
D          <-------->   GND
CLK INH    <---------   D5
Vcc        <-------->   3V3
1 Like

I would like to connect 8 push buttons to the SN74HC165N. I would like to read when a button is pushed and which button is push. I would like to see this on the Serial monitor.

I am referencing https://www.youtube.com/watch?v=Ys2fu4NINrA&t=35s

It doesn’t work for esp32c6 board.

At last, at last, we know what you want to do.
However, we still lack information. Please show me your wiring connections and a sketch of what you mean by it not working.

1 Like

You could try this sketch…
Just add more Inputs.

That worked!!! Thank you all.

For others, the only thing I changed was the pin definitions:
#define LOAD_PIN D4
#define CLOCK_PIN D5
#define DATA_PIN D3

1 Like