This is a maze running on hardware. 3 user inputs are used. user_input[0] is used to walk forward on low, and user_input[2:1] is used as direction select where 2'b00 = N, 2'b01= East, 2'b10 = South, and 2'b11 = West" bit 2 is the most significant bit
You will need to wire up qty 5 7-segment displays or led equivalent. seg 0 is the right most or least significant segment, and seg4 being the left most of Most significant segment. Hook up all the common pins. for example pin 1 from seg0 connects to all other pin1 on the other 4 segments, they are then connected to the corresponding output pins uo[7:0]
uo[0]: " a uo[0] = a "
uo[1]: " --- uo[1] = b "
uo[2]: " f | g | b uo[2] = c "
uo[3]: " | | uo[3] = d "
uo[4]: " --- uo[4] = e "
uo[5]: " | | uo[5] = f "
uo[6]: " e | d | c uo[6] = g "
uo[7]: " | | uo[7] = dp"
--- dp
uo([7:0] is the decoded segment signals to display the game output.
using 5 pnp transitors with Vcc (I used. 3.3V) at the emmiter, and the common anode (I used http://www.xlitx.com/datasheet/5161AS.pdf) connected to the collector, make a connection to uio[4:0] to represent seg4-seg0. example uio 5'b011111 would turn on seg 4 (low = on) each segment is mapped to uio[0]: "state LSB" uio[1]: "state MSB" uio[2]: "Direction LSB" uio[3]: "Direction MSB" uio[4]: "Top half of segment used for wall representation. 0-0, 1-1,...,5-5.
qty 5 7-segment display or LED equivalent to visualize the game qty 5 current limitting resistors for the 7 segments qty 5 current limitting resistors to manage current through the output pins. these are connected to the base breadboard and enough wiring to make all the connections
# | Input | Output | Bidirectional |
---|---|---|---|
0 | user_input[0] Move forward (move one step in selected direction | a segments[0] = a | state LSB |
1 | user_input[1] (considered least significant bit used in selection direction) Used to select facing direction where 2'b00 = N, 2'b01= East, 2'b10 = South, and 2'b11 = West | --- segments[1] = b | state MSB |
2 | user_input[2] (considered least most significant bit used in selection direction) Used to select facing direction where 2'b00 = N, 2'b01= East, 2'b10 = South, and 2'b11 = West | f | g | b segments[2] = c | Direction LSB |
3 | not used | | | segments[3] = d | Direction MSB |
4 | not used | --- segments[4] = e | Top half of segment used to display the walls of the room as seen from above (birds eye view). The top most segment(a) represents the wall directly in front of you in the chosen direction N,E,S, or West. |
5 | not used | | | segments[5] = f | not used |
6 | not used | e | d | c segments[6] = g | not used |
7 | not used | | | segments[7] = dp | not used |