First, I'd like to thank the community here for your wonderful tutorials--they especially helped me as I learned about using interrupts on my ATmega. I'm nearing completion on a project I've been working on but I've hit a snag that I'm hoping someone here can help me with.
The project is converting an alarm clock with a standard 7 segment display to use a 16x2 character display interfaced to an ATmega168. The new clock shows the full date and time, has a backlight that adjusts itself based on the ambient light, and uses both the 9V battery backup and 120V->12V transformer from the original clock (regulated to 5V DC).
What I can't figure out is how to interface the original clock's buttons to my ATmega. There are four buttons and one switch on their own small PCB. Pressing the buttons shorts two of seven output pins like so:
- Alarm button: pins 4 & 5
- Time button: pins 1 & 5
- Hour button: pins 1 & 2
- Minute button: pins 1 & 3
- Alarm switch, on position: pins 5 & 7
- Alarm switch, off position: pins 5 & 6