Create a GCC project in AVR Studio with one source file called lab2.c.
Add the LCD library file to the project (see the Lab 1 instructions if you need help with this). Your lab2.c source file must consist of (at a minimum) two functions: read_keypad and main. A third function, such as init_keypad might prove useful in terms of making your functions shorter.
The read_keypad function should wait until a key is pressed on the keypad and then return an integer value corresponding to the switch number on the keypad.
Your main function should loop continually calling read_keypad. The value returned by read_keypad should then be displayed on the LCD.
In order to read individual switches on the keypad, you'll need to energize each column individually. For each column you should then check each row to see if any of the buttons in the column are depressed. For example, if C3 is energized and R2 indicates a button is depressed, then SW7 must be depressed and 7 should be returned by the read_keypad. The schematic for the keypad is found on the fourth page of the SunRom Board Schematics.
Each student must demonstrate the successful execution of their program on their SunRom hardware by the end of the laboratory session.
You should indicate how much time (in minutes) you spend on this assignment in the FAST database. You are encouraged to log your activity as you work on the project. At a minimum, you should log all of the time spent on this assignment before the due date given above. All time spent on this assignment should be entered into the week 2 column (even if you worked on it in week 1 or 3).