If the temperature values are equal then the PIC sends back a signal to the environment stating that no changes should be made, if the environment is too warm then a signal is sent back to say that the environment temperature should be cooled, and likewise for the environment being to cold. The PIC should also send back the desired temperature so that it may also be displayed along with the current temperature and state of the system.
The C program (environment) should raise, lower, or keep constant the enviroment temperature based on the output of the PIC. To simulate the time that it takes for the environemt to change temperature there should be a delay involved. The C program is also used to display the system variables to the terminal.
The C program was created using Borland Turbo C++, and tested via two terminals connected using PcPlus. PcPlus will display the ASCII value of the data being sent out. This was done to make sure that the environment was sending data as well as accepting data correctly.
The PIC program was created by MPASM and was also tested using PcPlus to make sure that the comparison and output signals were correct. To verify the PIC was outputting the correct desired temperature to the enviromnet the value was also displayed on the LEDs on the development board.
Problems Encountered:
Trying to make the C program and the PIC transmit and recieve the correct data
at the right times was a major problem. To fix the problem delay loops, as
well as transmit and recieve signals were used.
However, since this PIC was used, the re-spin time to fix or update the controller could be made in a two to three days, if not in a couple of hours.
There are already working thermostats on the market, and many of them are highly integrated. In one such example there are thermostats with a built in clock that will raise or lower the environemt temperature at some given time during the day. This type of product would be useful as an energy saving device. When you wake up in the morning your house could be already warmed up to a comfortable living temperature, but when you leave the house for work, the temperature of the house will drop down to a lower temperature in order to save energy. When you get home, the house will be warm again, and then when you go to bed for the night, the temperature will drop back down again.