ECE473 Lab3: Purpose: *Try another way to use push buttons as a user interface. *Using interrupts with counter/timer 0 *Learn how to use SPI I/O. Overview: *This lab will extend upon the work done in lab 2. There are two functions we are focusing on: interrupts and use of SPI. In this lab we will use interrupts to replace the loop+delay structure of last lab. Timer counter zero will be used to periodically interrupt the processor to scan the pushbutton switches and encoders. In later labs, we will find this to be a much easier way to keep track of time critical events. This lab will also introduce the SPI interface. This serial interface will be used to scan the values of the digital encoders and also to provide data to the bar graph display. Project Specifications: *The two digital encoders and bar graph will be connected to the SPI interface. *The buttons we used last time will be used again but in a different way. Before we incremented a count each time the button was pushed. Now we want the switches to operate as "mode" switches. The mode selected will remain in effect until the next time the button is pushed. This behavior is fundamentally different that the last time. The encoders will be used to increment or decrement the count. *Directly after reset, either encoder will increment or decrement, by one, a count displayed on the LED display. *One button (your choice) will choose a mode for incrementing or decrementing the count by two instead of one. *Another button (your choice) will choose a mode for incrementing or decrementing the count by four instead of one. *If both modes are selected, the count will not increment or decrement. *The count will roll over at 1023 as before but if decremented beyond zero, the next count will be 1023. *The status of the modes will be indicated on the bar graph display in a manner of your choice. Bonus Functionality: *Use the pushbuttons on either encoder (if so equipped) to allow the user to display the count in either base 10 or base 16 (hexadecimal). You can scan the encoder switch using the uncommitted inputs to the HC165 shift register. Use LED segment "L3" to indicate the count mode (base 10 or 16). Before Lab: *Determine the correct connection for the SPI interface for both the encoders and bar graph. You will need to become familiar with the operation of both the 74HC165 and 74HC595 to use them correctly. Draw that part of your schematic out _before_ you wire things up. *74HC165 shift/load_n should be connected to PORTE bit 6. *The output enable for the bar graph display will be from PORTB bit 7. *The clock for the HC595 output register can be PORTD bit 2. Software: *Write out pseudocode of your software (suggested). *Suggested 8-bit timer/counter 0 (TCNT0) initialization code is shown below: //timer counter 0 setup, running off i/o clock TIMSK |= (1<