Multisim and Ultiboard

cancel
Showing results for 
Search instead for 
Did you mean: 

Minesweeper Side Project

       Hello, I have some questions regarding a side project I am doing in my Digital Electronics class. I am re-creating the game Minesweeper. What I have done is created a sub-circuit that does the calculations for each tile and hooked a few tiles together to see if they work properly. A single tile on its own worked perfectly but once many were hooked together, problems started arising. But first, I will explain how each sub-circuit works. 

       The inputs on each sub-circuit includes 1-4, 6-9, killAdj 1-4, killAdj 6-9 and check. The inputs 1-4 and 6-9 are signals received from each adjacent tile assuming the tile you are looking at is the number 5 on a numpad. So a tile on the lower left is 1, top middle is 8, etc. Check is a signal sent to AND gates at the end of the sub-circuit that when activated, allow the binary value of how many adjacent mines there are to that tile to be sent to the hex display. All the killAdj inputs are signals sent from every adjacent tile if the adjacent tile is checked and is a binary 0 (this creates the effect where if a zero is clicked on, every tile adjacent is also cleared). All the killAdj are ORed with the check input.

       The series of adders within the circuit take the 1-4 and 6-9 inputs and add them together, each input worth a value of 1 to determine how many mines are adjacent. This signal (like stated above) is only sent to the display if the tile is checked or if a killAdj signal is sent to the tile.

      All of the outputs are a-d, bomb, boom, and killAdj. a-d represent the 4 bits necessary to show how many mines are adjacent. They are sent in a bus to the hex displays. Bomb is determined by a switch within each tile that is switched on if there is a bomb and off if there is no bomb. This is the signal sent to the corresponding 1-4, 6-9 input for each adjacent tile (bomb in tile 1A (top left) would be sent to 2 on the tile directly below, 3 on the tile diagonal to it, and 6 on the tile to the right of the 1A circuit). Boom is on if bomb is a 1 and check is activated. Despite the fact that killAdj is ORed with check, the killAdj inputs will never determine if boom is activated since no tile adjacent to a bomb tile will ever be a zero. The killAdj output is if all inputs 1-4, 6-9 are a logic zero. This signal is sent to all the corresponding killAdj inputs in the same fashion as bomb above.

      So whats the problem? Bomb switches within circuits would be set to ground and being checked from the switches outside the sub-circuit but boom would still be activated (0 AND 1 is not 1). This would not change until we manually went in and "refresed" the switch. The value on the AND gate would not change until we went in a clicked on the arm of the switch, updating the whole circuit. Also, binary values would not go into the hex display even though the bus wires are connected to the correct outputs and inputs of the display. My teacher and I think that it may just be an issue that Multisim does not have the capacity to do all the calculations I am requesting of it. That may explain the need to "refresh" switches and gates. Many hours have been put into this and I'm hoping that the project can be salvaged.

      Any help would be much appreciated, thanks!

 

 

 

 

Download All
0 Kudos
Message 1 of 9
(3,645 Views)

Have you tried isolating the problem? Like building separetly the parts of your project where you are finding issues and verify if they work independently? Which version of Multisim do you have? 14.0 Student version?

 

Regards,

0 Kudos
Message 2 of 9
(3,618 Views)

Each individual part of the project works exactly as it should, even when separated from each other. It's when multiple sub-circuits are linked is when problems start to occur. I have checked that each wire is connected where it should on the bus. And I have Multisim Version 14 Education Edition.

0 Kudos
Message 3 of 9
(3,608 Views)

Should I just open the project that you attached and start simulation in order to reproduce?

0 Kudos
Message 4 of 9
(3,604 Views)

After some more troubleshooting, I have determined that the inputs not being used are counted as "don't cares" if they are not grounded. So, in the updated circuit, any unused inputs are grounded. But, even with unused inputs grounded, things are not adding up. If you go into any sub-circuit and flick the switch within it to its VCC (this tells the circuit that it is a bomb) and then run the circuit, Multisim still says that the wire directly connected to the switch is a logic 0. Minesweeper1.PNGIt is the same story for the check switch itself.

Minesweeper2.PNGSo if anyone can figure out why this is like this, it would be a huge help. All the hierarchical connectors are only 1 way so this does not make any sense whatsoever. Thanks for your responses 🙂

 

(P.S. sorry for not posting pictures earlier, I just realized I could do this)

0 Kudos
Message 5 of 9
(3,581 Views)

Oops, forgot to link the files.

Download All
0 Kudos
Message 6 of 9
(3,580 Views)

I found the issue. The Vcc are not really connected, they seem connected, however they are not. If you move them you will see that they are not connected. You need to make sure about the "red dot" when making a connection

0 Kudos
Message 7 of 9
(3,577 Views)

Thanks so much for your continued help and for reading my walls of text. The circuit works perfectly now. Sorry such a simple fix required a whole forum post. I most certainly learned my lesson. 🙂

0 Kudos
Message 8 of 9
(3,548 Views)

That is fine, no problem at all! Smiley Wink

 

Regards,

0 Kudos
Message 9 of 9
(3,546 Views)