Wrapping my head around shift registers

Hey all,

First and foremost, this forum rocks!

I’ve been reading in the forums for a little while now while searching for a non ghosting method for the joystick I am planning to build. The grip will have a total of 24 tactile switches. Does that mean I need 3 shift registers to solve this method? Ive read about members having pcb’s or knowing where to get them but haven’t found a link.

This will be my first HID build so bare with me. Also I saw a recent post about the stm32’s being the new standard in here. Freejoy does look pretty robust with features. I have a micro, but the stm32 looks enticing. Would the stm32 be a better option?

Welcome to Mudspike!

It has been a looong time since I used those.
These days I prefer IO extensions via i2c or SPI like the MCP23017.

As for your question: it depends a bit. How many (and which) buttons do you need at the same time? You could use a matrix to reduce the number of inputs you need.
But for a joystick… you would probably want to be on the safe side, so yes, you will need separate IOs for them.

1 Like

Hey there, @Thermal! Welcome to Mudspike :mudspike:

I’ve been making some controllers using shift registers, a teensy2 microcontroller and MMJoy2 firmware and software.
I have some hardware in my stash that I can share with you if you like.

In short, one of these shift registers can handle 8 input, so for 24 buttons you’ll need 3 of them.

Thanks @Aginor for the MCP23017 suggestion, it looks to really simplify the I/O dilemma I got myself into. lol The next issue would be if this would work with mmjoy or would i need to look at the stm32/freejoy route?

I could not find any mention of compatibility of the MCP23017 used with mmjoy or freejoy. As my first build, I’d like to stick with mmjoy/freejoy just to stay in a documentation comfort zone lol.

Thanks for the kind offer @Troll I am definitely interested in this as well. The grip has 24 switches total. How much space would 3 shift registers need?

This whole project is somewhat scratch build. Currently printing and building Olukelo’s gimbal and JFlyer81’s F16 grip from thingiverse.

Here’s the stick that I designed my PCBs for. As you can see, there are two shift regs in the handle. Now, it’s a small handle. If your handle has more volume, there shouldn’t be a problem fitting three in there. You will need the base PCB with the teensy controller in the base though.