Project1

advertisement
Fall 2001
CSE 207
K.Y.
Project 2
This project extends project 1 in several ways. First, we will use registers to store the current temperature, the
desired temperature for each period and the current desired temperature. For each register, a display is required to
display its contents; Next, an input data unit is used to enter all the necessary data. The data unit consists of one
pair of hex key pads. Finally, you must design a controller to control the operation of the systems. An updated
description of the components of the system (including the new controller) is given below.
The heating/cooling system can operate in three modes: heat, cool and off. It provides three non overlapping
periods that can be used to set desired temperature levels: wake, leave, night. Wake represents the morning
periods, leave represents the periods when the house is expected to be empty and the occupants are at work.
Finally night represents the periods when the occupants are back from work and need a comfortable "ambiance"
in which to relax, eat and do homework. A desired temperature value is associated with each period. The
heating/cooling system includes two sub-units: 1) an indoor thermometer used to display the house temperature
and to control system operations, and 2) a clock used to determine the periods (wake, leave, night). The
thermometer output is a temperature value represented as a 2-digit decimal while the clock output is 0,1 or 2 for
wake, leave or night respectively. The input, output specifications and the operation of the unit are as follows:
Input:
 Control unit input keys:
 HEAT, COOL, OFF
 WAKE, LEAVE, NIGHT
 WARMER (heat up), COOLER (cool down)
 SKIP
 DISPLAY
 SET
Components of the control unit:

Thermometer sub-unit: The thermometer is a modular component of the control unit. It represents
temperature values encoded as 2-digit BCD decimals. In BCD representation, each decimal digit (0-9) is
represented by a 4-bit binary [b3b2b1b0]2 with respective weights 8, 4, 2, and 1. Thus, a 2-digit decimal
is represented by two 4-bit binary numbers. For example the decimal 45 is encoded by the binary 0100
0101. The thermometer contains an 8 bits data register F =[F1F0] that represents BCD temperature
values between 00 and 99.
1. Clock sub-unit: The clock sub-unit provides hour values from 0 (midnight) to 23 (11 p.m.). Minutes and
seconds are not represented. The output of the clock unit is 0 for wake (6-9), 1 for leave (10-17) and 2 for
night (18-23, 0-5). The clock sub-unit is a synchronous counter that generates the following decimal
sequence over and over again. One hour of the clock sub-unit equals 32 (logic works) system clock
pulses. You must provide a state diagram description of the clock. Use JK flip flops to design the
counters.
Controller: The controller is a sequential logic network. It is used to control the operation of the system. It is
state machine that enables or disables part of the system depending on its current state. The following table
gives examples of states and the corresponding actions. You can add states as needed by your design. Note
that in each state some sub-units are disabled. The clock sub-unit is never by the controller.
State
Init
Actions
Normal operation mode. Allows operation of the clock sub-unit and comparator sub-unit.
The BCD calculator and the input unit are disabled.
Input
Allows data to be entered in Temperature or period
(Wake, Leave, Night ) registers.
Update
Allow update of a desired temperature (Wake, Leave, Night). All subunits are disabled.
except the BCD computations
Display
Enables all displays. Disable the Input and BCD units.
Error
Disables all units except the clock. To resume normal operation hit display
etc….
n-to-2n
Controller
m
n
Signals to enable various
system components
Decoder
You must carefully identify the inputs and outputs of the controller. You must also provide a state diagram to
describe the operations and the state transition of the controller. You must follow the sequential network design
steps described in the book and use JK flip flop to design the controller.
Output:






TC:
7- segment display that shows the current temperature
TP:
7-segement display of the desired temperature setting of the current period
C:
7-segment display of the clock.
S:
7-segment display of system status. S is 1 if the system is on and is 0 otherwise.
E:
7-segment display error status: this display is 0 if there is no (input or computation) error.
Otherwise the value of the error display is a code from 1 to 9. You are free to assign appropriate meanings
to the different codes. Make sure you identify all possible errors.
Initially (mode=OFF), the display error is 0, the current temperature is displayed and the temperature of
the current period is set to [00].
Operation:

Basic operations:
 the system can only be one operation mode at any time
 the system can only be in one operation period at any time
 the display unit of the controller shows the current temperature (thermometer output)
 temperature is controlled by turning the system on or off. When the desired temperature of a
period is reached, the system is turned off. To increase or lower the temperature, the system is
turned on.
 if operation mode is "heat" and the current temperature is lower than the desired temperature of
the current period, the heating system is turned on to increase the temperature.
 if operation mode is "cool" and the current temperature is higher than the desired temperature of
the current period, the cooling system is turned on to lower the temperature.

Other operations:
 To set the temperature of a period, press wake, leave, or night; then press SET and input a two
digit decimal for the desired temperature
 To check the temperature setting of all periods, press display.
 To raise or lower the desired temperature setting of a period, press the corresponding key (wake,
leave, night) on the control panel, then press WARMER (to increase temperature by 5 degrees) or
COOLT(to decrease temperature by 5 degrees).
 To preserve the current desired temperature throughout subsequent periods, press SKIP. Pressing
SKIP again resumes normal operation of the system.

Data in the control unit are stored by 2-digit data registers. Each data register consists of two BCD
decimal digits. The control unit includes the following:
 C=[C1C0]:
clock data register
 F =[F1F0]:
current temperature
 T =[T1T0]:
temperature setting of the current period
 W=[W1W0]: temperature for wake period
 L=[L1L0]:
temperature for leave period
 N=[N1N0]:
temperature for night period
 …..
Deliverables and due dates:
The design will be carried out in two phases. The deadline for each phase will be communicated to you in the lab
sessions:
 Phase 1: you should hand in a preliminary report that gives a top-level functional description of your
solution (see documentation standards of your textbook and discuss this with the lab instructor).
 Phase 2: Your final report should contain the description of the problem, objective, description of the
methods and the tools used to do this project, and the complete technical report of the process used in
achieving your objective and conclusions. You must hand in the final report and a disk containing your
logic works circuits. Also you must show different data used to test your circuit.
Notes
.

Do not wait until the last minute to work on the project. It requires that you break down your design in
functional units that can be easily designed using the materials and concepts discussed in class. The final
design must use MSI components (decoders, MUX, BCD adders, BCD comparators etc …). This project
will be extended in project 2 to include sequential networks (flip-flops) and registers, thus a modular
design is extremely important for what will follow.
Download