Programmable Timed Light Switch
You are required to design a programmable light switch that will turn a light on/off determined by a user’s programmed time. The time is maintained by the system, which can be altered via a user interface consisting of three switches and a LCD. The system will start by displaying the current system time along with the programmed on/off times and the status of the light.
The light’s illumination is simulated by the LED connected to P5_0 on the M16C target board. There needs to be a feature where the light status can be manually overridden and turned on or off by use of one of the three switches. The time is to be maintained by one of the onboard timers which need to be configured in a cascaded arrangement with another timer to give a 1 second interrupt interval. The 3 switches will need to be debounced and have an auto repeat feature. As the designer, it is entirely up you to determine how the user interacts with the system, for setting the system time, generating the on/off times and how the status of the light is changed manually. You should start by modelling the system’s functionality using a state transition diagram.
Using the software High Performance Embedded Workshop (HEW) (I have attached a dummy file with the code set up), complete the assignment.
I have added some extra code in a word document which needs should also be included.