Laboratory 9 Parallel Input and Output Ports

advertisement
Laboratory 7
Parallel Input and Output Ports
1. Objective: This project focuses on the use of the 68HC11 parallel input and output ports.
An external interrupt input will be used to signal the presence of a valid input and start the
microcontroller processing of the input data.
2. Task: Write a main program and interrupt service routine for a program that will recognize
an 8-bit input which represents two BCD numbers, translate those numbers to a 7-segment
display format, and then display those numbers on two 7-segment displays. The interrupt
service routine should recognize that valid data is available for processing and subsequent
transmission to the 7-segment displays. Specific requirements are
a. Use the 8 position DIP switch to provide the input for the two BCD digits.
b. Use the same techniques as in Lab 6 (External Interrupt) to recognize the external
interrupt signal and eliminate any extraneous inputs due to switch bounce.
c. Use the multiplexing routine demonstrated in the text (Example 7.7, page 304) to
illuminate the individual 7-segment displays.
d. Provide a capability that recognizes when either BCD input from the DIP switch is not
in BCD format. Create a unique output of your own creation to identify an
unacceptable BCD input and display it on the associated 7-segment display.
e. Demonstrate your implementation to your instructor.
3. Suggested Approach: This project, while not especially difficult, can be a source of
frustration if you attempt to complete the task all at one time. The best approach is to break the
task into three separate groups: input, processing of inputs, and output display.
4. Teams composed of 2 Each team should turn in one report for this lab.
Download