Hardware Reference
In-Depth Information
±
1°F. By comparing
T
room
to
T
ref
and taking into account the hysteresis, the machine will
be able to produce the proper values for
h
and
c
.
Finally, note that the inputs from the pushbuttons are asynchronous with respect
to the system clock, which could, in principle, cause metastability (see section 2.3).
This, however, is prevented here by the debouncer (section 8.11.3).
parameter. For example, if
Δ
T
= 1°F, the room temperature will be kept within
T
ref
5.4.5 Garage Door Controller
This example presents a garage door controller that operates as follows. If the door is
completely closed or completely open and the remote is activated, the motor is turned
on in the direction to open or close it, respectively. If the door is opening or closing
and the remote is activated, the door stops. If the remote is activated again, the motor
is turned on to move the door in the opposite direction.
The circuit ports are depicted in i gure 5.9a, where
remt
(command from the remote
control),
sen1
(door-open sensor), and
sen2
(door-closed sensor) are the inputs (plus
the conventional
clk
and
rst
signals), and
ctr
(control) is the output. Note that
ctr
has
two bits;
ctr
(1) turns the motor on ('1') or off ('0'), whereas
ctr
(0) dei nes its direction,
opening ('0') or closing ('1') the door (thus the value of the latter does not matter
when the former is '0').
A preliminary state diagram is shown in
i gure 5.9b. The transition control signals
are
remt
,
sen1
, and
sen2
. Note that this machine complies with all three requisites of
Figure 5.9
Garage door controller. (a) Circuit ports. (b) Bad solution (with state-bypass). (c) Good
solution.