Computer System Design - Extra Credit Lab
Purpose
| Working with the Atmel EVK1100, write a suite of software to sample the on-board temperature sensor, the built-in joystick, and output to the LCD. |
Lab
Your task is to write a basic HVAC (Heating, Ventilation, Air Conditioning) controller complete with the thermostat, display, and temperature sensing. The components are described in more detail below:
| LCD |
The LCD should display the current states of the system with respect to the target temperature, the actual temperature (via the sensor), and the mode that the thermostat is in (Heat, Cool, Off). |
| Temperature Sensor |
You should periodically sample the temperature sensor for its value. You can change the actual value by placing your finger on the temperature sensor itself to warm it up. |
| Joystick |
The joystick control will encapsulate multiple buttons of functionality. The up or down motions will change the target temperature for the thermostat by plus or minus 1 degree. Motions to the left will toggle the behavior between Heat, Cool, or Off. Motions to the right will toggle the blower between the Always On mode and Auto mode. |
| LED |
You will use the bank of LEDs just under the LCD to simulate driving the actual HVAC system. LED1 will represent the furnace, LED2 will represent the blower, and LED3 will represent the air conditioner. |
| Program |
Your program should run in an infinite loop until terminated. |
Write your code in C. You are welcome to use the reference code available on the Atmel website to help you get started. As this lab is extra credit, there will not be significant assistance provided (i.e. you need to figure it out largely on your own). If you get significantly stuck, you may contact Dr. Striegel for assistance.
Facilities - DARTS Lab
There is a single EVK1100 reference board in the DARTS lab for testing your code. A 1 GB SD card is available for transferring code to the board. You should not remove the board from the lab.
Examples
Example - Heat
Target: 75 Actual: 70
Setting: Heat, Auto
In the above example representing what the LCD might show, the target temperature is 75 degrees while the actual temperature is 70 degrees. The setting is for Heat and Auto meaning that both the furnace (LED1) and blower motor (LED2) should be on.
Example - A/C
Target: 65 Actual: 70
Setting: A/C, Auto
In the above example representing what the LCD might show, the target temperature is 65 degrees while the actual temperature is 70 degrees. The setting is for A/C and Auto meaning that both the A/C (LED3) and blower motor (LED2) should be on.
Example - None
Target: 65 Actual: 70
Setting: None, Auto
In the above example representing what the LCD might show, the target temperature is 65 degrees while the actual temperature is 70 degrees. The setting is for None and Auto meaning that no LEDs should be on.
Submission
Submit a tar/gzip of your code to Dr. Striegel via e-mail by the due date prescribed on the homework listing. You may not work with a partner on this project.