I have 128 inputs (push buttons) in a single row in a project and I want to read them using a single atmega32. Of course there is not enough pins in an atmega 32 for this purpose and I know the solution would be using some kind of multiplexer but I don't know which one suits the best.
What I'm thinking is to have some kind of multiplexer that have 128 pins as input and have 7 pins for output that represents the result of inputs into binary (as an example if all inputs were 1 (UP) and output pins will be 1111111 (all UP)). But I'm not sure if there is any multiplexer doing this ?
I have to mention that I need a cost effective solution. Becasue I have to extend this solution to maybe 1000 or even 10,000 inputs in the future (which we have to use several multiplexers to read all of them)
Any help would be appreciated. I need to know which multiplexer I need to use ? (probably part no. or any other suggestion)
Update:
Only one single button will be pushed at the one given time AND it update rate won't be fast. maybe 10-30 times per second or much less.