Im currently working on a school project involving the control of 2 stepper motors using a PIC microcontroller.
I want add buttons for each stepper motor to contrôl directions (left right) and another one for the contrôl mode (half and full stepping mode )
where can I put these buttons on my schématic ?
Thank you!
Without sufficient pins left to connect 8 buttons, you obviously need some kind of expansion logic. There are many options, don't know which is easiest to you:
- a serial shift register to read the buttons. Advantage: can be easily expanded to more inputs. Uses shift clock, serial data in and load output. e.g. 74HC165 or CD4021
- an I2C interfaced IO expander
- a 3 to 8 decoder selecting a key and one uP pin to read it back
- an 8-to-1 multiplexer