CWallau_Final_Project_Presentation_ECE5330
Download
Report
Transcript CWallau_Final_Project_Presentation_ECE5330
Remote Thermometer and Display
Chris Wallau
ECE5330
November 17, 2008
Overview
Key Features
Two AVR units:
Thermometer controller
Display Controller
Thermometer
I2C Interface
BOM
Atmel Mega16 AVR/STK 500
DS1621 IC Thermometer
LTC-4627JR LED 7 Segment Display
DC327 PNP Tansistors
4.7Kohm Resistors
220 Ohm Resistors
10Kohm Reistors
Digital 9-bit readout
Display
Four digit seven segment LED display
2
Quantity
2
1
1
4
4
7
2
Block Diagram
SPI
Interface
AVR1
AVR Ports
External Display Control
Logic
Direct Connection
4 Digit LED
Display
3
AVR2
I2C Interface
DS1621
Thermometer
Hardware: Thermometer
4
DS1621 Digital Thermometer from Maxim IC
Connected as I2C interface to PD1 and PD0
Temperature range: -55˚C to +125˚C
Outputs 9-bit digital value
Open Drain Interface requires 10KOhm pullup resistors on SDA
and SCL
Hardware: Display
LTC-4627 Quadruple Seven Segment Display from Lite-On Electronics
Common Anode Design
Decimal points and clock colon will not be used in this application.
Requires each segment to be driven separately by time multiplexing
which will be controlled through PNP transistors at the common anode
points.
Current limiting resistors required at the cathode points and then
connected to I/O ports on the AVR.
5
Software: SPI Interface
Both AVRs will be tied together through the SPI port:
6
PB[7:4]
The AVR with the display attached will be defined as the
master. The AVR with the thermometer will be defined as the
slave.
The Master will shift All 1’s pattern to the Slave to indicate
that it is ready for updated information.
The Slave will place upper 8 bits of the thermometer output
in the outgoing register. The Master will then shift the data
in.
This loop will be continuous and be contained in interrupt
service routines.
Software: Thermometer
The thermometer IC that has been chosen utilizes Inter-Integrated
7
Circuit communication (I2C)
I2C is a protocol-based communications system.
CodeWizard provides specific library functions for the DS1621
thermometer IC. These functions will be utilized.
After initialization, a timer interrupt service routine will prompt
the DS1621 thermometer IC for the most current temperature.
An 8-bit code representing the temperature in whole degrees
Celsius will be received and written to the SPI outgoing data
register.
The ninth bit received from the DS1621 represents a ½ degree
Celsius and will be ignored for this application.
Software: Display
The AVR Ports must control the logic that drives the 7-
segment display.
Each segment of the display must be controlled individually
(time multiplexed) due to the cathode connection.
Timer interrupt service routines will control the time
multiplexing of the segment display.
The software will receive the 8-bit code read from
thermometer AVR and decode this to drive the proper
segments of each digit of the display.
8