The code contained in the following links was written in order to program the Atmel AT89C55 to interface with the keypad and 2-line LCD display found in the lab. This code is incomplete and was not implemented due to difficulties with both the LCD and the keypad. After spending a vast majority of the time attempting to get the high level user-interface working, we had to decide to "dumb" down the interface in order to have the robot complete by the deadline. As Javin would tell you, "I do not recommend using either the display or the keypad unless you already have a major in electrical engineering -- otherwise you will find yourself in the lab in the wee hours of the night with a scope probe in one hand and an oscilloscope in the other."
The goal of the code was to display a menu on the LCD. The menu selections would scroll up when the user presses 'A' on the keypad and scroll down when the user presses 'B'. Pressing 1 through 6 would change the current mode of the robot. This code is not optimized, and was written in order to test functionality. The functionality wasn't obtained so we cut the user I/O from the project.
Header File: lcd_keypad.h
Source File: lcd_keypad.c
The initial method was to have one 8051 that handled the LCD exclusively, that is it would listen to receive characters from the other processor, wake-up handle these characters, and then go back to sleep. This code never seemed to work right, perhaps someone can inform me as to why (or perhaps the circuit was wired incorrectly).
ASM Source File: main.asm