Work with pushbuttons and 7 segment display.
Write assembly (ASM) and C programs for the HCS12, as well as to work with the pushbuttons and 7-segment display on the Dragon12-JR board. The programs find the largest and smallest numbers from an arbitrary list of eight 8-bit unsigned numbers and displays them on the 7-segment display as outlined in the following.
1. Write a program to do the following, in both ASM and C. Do not use MINA, MINM, MAXA, and MAXM instructions.
a. Load an array of eight 8-bit unsigned numbers into RAM.
b. Find the largest of these numbers and store it.
c. Find the smallest of these numbers and store it.
d. Wait for the pushbuttons (S1 or S2) to be pressed.
e. The first time S1 is pressed, display the high nibble of the largest number; the second time S1 is pressed, display the low nibble of the largest number.
For example, if the largest number is 0x3F, the 7-segment display should show “3” the first time S1 is pressed and “F” the second time it is pressed.
f. Do the same for S2, except use the smallest number.
2. Explain why debouncing is used with switches. Optional: Implement software debouncing for switch used above.
This document was generated from the following discussion: Professional Way to solve this HCS12 Dragon12-JR,Work with pushbottons and 7 segment display