Hardware Reference
In-Depth Information
This function receives the state of each parking slot and stores them in
car[1]
to
car[16]
variables. We use a 16×1 multiplexer between 16 signals from parking slots and
one pin of microcontroller. So for example, when the microcontroller want to update
car[16]
variable, it sets the four control inputs of multiplexer(
mux1
to
mux4
). Accord-
ingly, the multiplexer send its 16
th
input to its output and then microcontroller reads the
multiplexer output and stores it in
car[16]
variable.
mux1=1; mux2=1; mux3=1; mux4=1;
car[16]=!mux_out;
Search WWH ::
Custom Search