Step 2How to Control 16 inputs and 32 outouts?
The first trick is multiplexing the the LEDs and arranging it in a matrix form, we connect the LEDs in a grid of 8X4 so now we need 12 outputs and not 32 but thats still a lot and we will need to find a way to get that number smaller. So I used a 74HC595 shift register which needs only 3 pins from the micro and gives you 8 outputs, the 74HC595 controls the columns and the micro scans the rows with the help of 4 transistors, and now we can control 32 LEDs with only 7 pins.
The second trick is to multiplex the switches as well and arrange them in a 4X4 matrix, and now we only need 8 pins to read the switches and not 16.
All the logic operations are being made in software so if you know your C you could use any micro-controller with 15 I/Os or more and adapt my code to work with it.
| « Previous Step | Download PDFView All Steps | Next Step » |
![]() |
Add Comment
|












































