Temperature Sensor Acquisition Module


I. Introduction

The purpose of this lab is to utilize all the concepts covered this quarter. You will be given a specification and it is up to you the desginer(s) to build a working prototype and provide the corresponding documentation.

II. Specfication

  1. Your device will sample the temperature every second, storing it as a 8-bit unsigned value in the EEPROM.
  2. You must use the 8051 timer interrupt to indicate when a sample should be taken.
  3. The value stored should be encoded as the binary representation of the temperatue measured in degrees Fahrenheit without the fractional value (i.e. 98.7 - > 98).
  4. While sampling, your device should output on a 16-character LCD the following:
               ----------------
              | Temp: 54F  128 |
               ---------------- 
               
  5. Where 54F is the current temperature measured by the sensor and 128 is the current number of samples stored in the EEPROM.
  6. The most recent 128 samplings should be stored on the EEPROM.
  7. A program will be provided to download the temperatures from your device. You will need to implement communication with this program using the protocol described below.

III. Communication Protocol

  1. When the temperature download program wishes to download data, it will first transmit the initiation control word of 0xaa.
  2. Your device has to provide an acknowledge control word of 0x73.
  3. You device will then transmit an 8-bit unsigned value indicating the number of temperature samples it plans to transmit.
  4. Your device should then transmit each of the temperature samples read from the EEPROM.
  5. The temperature download program will respond with an acknowledge control word of 0x49 after all samples have been transmitted.
Notes:
  1. Your device should be able to continuously sample the temperature every second while also monitoring the serial port to detect the initiation control word from the temperature download program.
  2. While communication with the temperature download program is in progress, your device should not sample the temperature, as this will disrupt the serial communication.
  3. If any error in the communication occurs, your device should temporarly display a message indicating what the error was.

IV. Components Needed

  1. 8051
  2. AT24C01 EEPROM    (datasheet)
  3. LM75 Temperature Sensor    (datasheet)
  4. LCD
  5. Anything else you think you might need.

V. Provided Programs

  1. Temperature Download Program
    temperature.exe
  2. Skeleton Code for the I2C EEPROM & LM75 Communication Protocol
    i2c.h
    i2c.c