i want to design a electronic log book which would record the in and out time of different persons in a memory card and i wanna use a keypad for enry id of diffferent people but i cant use rtc and keypad at a time becuse there are only 6 anolog pins and a5 and a4 needed to be used by rtc, i want to use that by keypad needs from a0 to a5,and also i cannot use lcd and memory card both at a time as both re SPi communication how can i manage this please help me out.
SPI allows multiple devices on the bus. You only talk to one at a time but that is usually the correct solution.
Why does the keypad use so many analog pins? Can you give us a link to the keypad you want to use? Most keypads only need digital pins, and you can use analog pins as digital inputs when you run out of digital pins.
There may be another keypad solution that uses SPI, I2C or only a small number of digital pins.
SravanKumar:
i want to design a electronic log book which would record the in and out time of different persons in a memory card and i wanna use a keypad for enry id of diffferent people but i cant use rtc and keypad at a time becuse there are only 6 anolog pins and a5 and a4 needed to be used by rtc, i want to use that by keypad needs from a0 to a5,and also i cannot use lcd and memory card both at a time as both re SPi communication how can i manage this please help me out.
An Arduino UNO provides 20 pins (14 digital, 6 analog), and if you want to have serial debugging in your sketch pin-0/pin-1 are occupied for Serial, remaining 18 pins.
A 3x3 numerical matrix keypad uses 6 pins, remaining 18-6= 12 pins.
SPI for using SD card needs three pins plus 1 select pin , remaining 12-4= 8 pins.
I2C for using RTC needs two pins (A4, A5), remaining 8-2 = 6 pins
Each additional SPI device would use 1 select pin extra.
Each additional I2C device would use no pin extra.
SPI and I2C are busses and can handle many devices by addressing each device individually.
So what?