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
- Your device will sample the temperature every second,
storing it as a 8-bit unsigned value in the EEPROM.
- You must use the 8051 timer interrupt to indicate when
a sample should be taken.
- 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).
- While sampling, your device should output on a 16-character
LCD the following:
----------------
| Temp: 54F 128 |
----------------
Where 54F is the current temperature measured by the sensor
and 128 is the current number of samples stored in the EEPROM.
- The most recent 128 samplings should be stored
on the EEPROM.
- 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
- When the temperature download program wishes to download
data, it will first transmit the initiation control
word of 0xaa.
- Your device has to provide an acknowledge control word
of 0x73.
- You device will then transmit an 8-bit unsigned value
indicating the number of temperature samples it plans
to transmit.
- Your device should then transmit each of the temperature
samples read from the EEPROM.
- The temperature download program will respond with an
acknowledge control word of 0x49 after all samples have
been transmitted.
Notes:
- 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.
- While communication with the temperature download program
is in progress, your device should not sample the
temperature, as this will disrupt the serial communication.
- If any error in the communication occurs, your device
should temporarly display a message indicating what the
error was.
IV. Components Needed
- 8051
- AT24C01 EEPROM
(datasheet)
- LM75 Temperature Sensor
(datasheet)
- LCD
- Anything else you think you might need.
V. Provided Programs
- Temperature Download Program
temperature.exe
- Skeleton Code for the I2C EEPROM & LM75 Communication Protocol
i2c.h
i2c.c