k262CP4sp10

k262CP4sp10 - disp!!y~!.he maximum temperature the...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Last Computer Problem ECE 265 Sp 2010 MaxiMin Thennometer In this problem you will program the 68HCl1 to act as a thermometer that can display the current temperature, the minimum temperature, or the maximum temperature. There is also a reset option which changes the stored max and min temperatures to the current temperature. You will use the first channel of the AID (number 0) to read the temperature as an 8 bit unsigned number and you will display temperatures as an unsigned 8 bit binary number on the Port B LEDs. You won't use the 7-Segment display in this problem. You will use Port C in the synchronized mode to select what mode the thermometer is in. When the program first starts, the system is in regular mode where port B displays the current value on the channel 0 slider. By moving the slider one should be able to changes the lights from all off to all one. To go into Max temperature mode the user sets bit 0 of Port C and raises the Str A line. From that point one, Port B
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: disp!!y~!.he maximum temperature the thermometer has ?een since the thermometer has been reset. For example,~ifyou movethe 'slider so tha.f aIr the Port-B lights go on, then they won'tgo off again because the thermometer has seen the highest possible temperature. To go into Min temperature mode, the users sets bit 1 and clears bit O.and raises Str A. From that point on Port B displays the minimum temperature the thermometer has seen since a reset. To reset the max and min settings, the user clears both bits 0 and I of Port C and raises Str A. The stored max and min temperatures change to the current temperature and thermometer goes back into regular mode. The LCD display should show the mode the thermometer is in. It should show "REG:" in regular mode, "MAX" in maximum mode, and "MIN" in minimum mode. Be sure to clear the LCD as needed so that only 3 letters show at one time. Due 11 :59 PM the last day of class....
View Full Document

Ask a homework question - tutors are online