multiple devices - limited i/o

I have a plan for a project that it seems I might not have room for!

I'm connecting an RFID reader, keypad, and LCD to my Arduino. With limited pins on the Arduino, what's the most efficient way of doing this?

I have multiple atmega's that I've already loaded the bootloader on - so I suppose I could use multiple chips if necessary... but I'm thinking surely there's a way to integrate the devices even with limited pins.

Any suggestions?

Start with counting how many pins you need

There is 19 pins available as ios in total. You might not need to offload anything.

Thanks for your reply :slight_smile:

Ultimately, I need a minimum of 22 not including Vcc + GND.

Search the board for "multiplex".

You can have some pins do double duty, for example use the data lines for the LCD to scan the keypad when you're not writing to the LCD.

And of course there is always the Mega boards:

http://www.seeedstudio.com/depot/arduino-mega-assembled-p-311.html?cPath=27&zenid=9f6118c193cee9f8b7337d4df91a2eca

http://www.seeedstudio.com/depot/seeeduino-mega-fully-assembled-p-438.html?cPath=27&zenid=9f6118c193cee9f8b7337d4df91a2eca

Lefty

If you search the forum, you'll find postings from people who have done "Arduino-on-a-perfboard" projects, and "Arduino-as-I2C-slave" projects.

Since you have some ATMegas on hand, my suggestion is to combine the two, and build a custom Arduino that acts as an I2C keypad+LCD slave. If you find yourself short of pins, you could cheat by using the LCD data pins as outputs for scanning the keypad. You'll need to use separate pins for the scanner inputs, because pressing a key shorts input and output pins together, and you don't want shorted pins when you're trying to write to the LCD.

LCD can be done with 4 pins though I think you can do it with less
8 key keypad needs 3 i/o

RFID needs 2

9 pins total

And one poster had the idea of reusing the LCD i/o pins. Neat. You can probably do it with 6 pins then. :slight_smile: