selecting the simplest micro-controller for my project

I would like some help in selecting the simplest micro-controller for my project.

I will have 22 momentary SPST switches and 22 very small relays whenever a switch is pressed (regardless how long the button is held down for) a corresponding relay will fire for 3 seconds.

So I’m looking for something with a minimum of 44 general purpose io lines.

Any suggestions?

Thank you

Steven

You are obviously looking for something with 6x8-bit ports. Atmel or Microchip should have something in their ATmega or PIC ranges respectively.

Have you considered a non microcontroller approach? If the switches and relays have a 1:1 relationship you could put something together using discrete devices.

A much smaller device could be used if shift-registers (74HC164 and 74HC595) were used to interface switches and relays.

I believe the simplest solution would be an AVR Mega169 which has about 50 bits of I/O and a handful of ULN2803 drivers.

A cheaper, but slightly more complex solution would be a smaller CPU such as a Tiny2313 with 3 parallel-in, serial out shift registers such as the 74HC165 and 3 of the TI PowerLogic high current shift registers.

I think the cost is about the same.

leon_heller:
A much smaller device could be used if shift-registers (74HC164 and 74HC595) were used to interface switches and relays.

I don’t understand how to use shift registers to fire my relays for 3 seconds?

steven834:

leon_heller:
A much smaller device could be used if shift-registers (74HC164 and 74HC595) were used to interface switches and relays.

I don’t understand how to use shift registers to fire my relays for 3 seconds?
You use them to expand the I/O of a pin limited micro.

https://learn.sparkfun.com/tutorials/shift-registers

W/o a micro you could use 11 556 ICs. But that would cost more and take more space.