Part 1: Understanding the keypad
Using your battery pack, the keypad and an led prove to yourself that you understand how the keypad works and is wired internally. Submit a schematic representation of how the keypad is wired internally; show the numbered pinouts in your diagram and write a short paragraph on how it works.
Part 2: Input and Output on the same Port
Write a short program that uses four bits of PortD as output lines and four lines as input lines. Connect four of the switches of the 8 position DIP switch (in your lab pack) from the input lines to ground and 4 leds to the output lines. The program should read the switches and write their value to the leds. Demonstrate the program to the lab supervisor;
Part 3: Keypad scanning
Write a program that will scan the keypad (as described in class). When a key press is detected display the value of the key using the 7-segment display from your lab kit. This part of the lab should be done two ways (i.e. make two seperate versions of the program); first by polling the keyboard for key presses and second by using INT0 to detect the key press. Submit a schematic diagram of your circuit(s), the source code of the software and a short explanation of how both circuits work.
Last updated 09/18/2008 - rvs