Microchip PIC Room Thermostat
During spring and summer of 1998 I developed my second project utilizing a Microchip PIC processor. The primary purpose was to explore character LCD displays and 2-wire bus (I2C) devices with a Microchip PIC microcontroller. The project was a digital room thermostat with multiple setpoints at different times of the day.
The hardware consisted of a Microchip PIC16F84 microcontroller, a Dallas DS1621 temperature sensor, a Dallas DS1307 realtime clock, a Linear LT1173 switched mode voltage regulator and a surplus LCD display. The schematic diagram and pictures provide information on the design and assembly on a prototyping board. The realtime clock chip was powered by a lithium cell for timekeeping and storing of settings in non-volatile memory. The switched mode voltage regulator was selected over a linear regulator to minimize heating of the circuit. Because the temperature sensor was located on the board, power consumption and heat production of the circuit needed to be kept to a minimum.
The software was written in MPLAB assembler. Although familiar with 2-wire devices, this was my first opportunity to explore the I2C bus on a PIC microcontroller. Since the PIC16F84 contained no I2C serial hardware the I2C bus was bit-banged on general purpose I/O pins. To save on I/O line requirements the LCD display was connected in 4-bit mode and the input keys were multiplexed with the LCD signal lines.
All relevant files for the project are provided here. Keep in mind that this is an educational project rather then a finished product. So some things may not work as advertised or not work at all. The project has been placed here for historic purposes. I sincerely doubt I will ever get back to finishing it.
Files: