Views: 0
Game, exercise machine – Logic Gates.
A game, a simulator, a gift – the development of logical thinking.
The game is designed to develop logical thinking in children, and can also be used as a Kit – as a board for learning to program in C and working with microcontrollers from Microchip Corporation.
The game can be a gift for a child, for teaching logical thinking, and a gift for a development engineer, electronics engineer, programmer, on the desktop, for a moment of rest and training logical thinking.
The game is a touch panel with a light indication of the status and mode of operation. The game can be controlled directly from the panel by touching the touch buttons, or using the computer’s serial port with a simple command system. See the description for setting up and describing control codes.
The game has 6 difficulty levels. There are 27 user ratings in each level.
User rating.
Correct answer to the tested logic element, indicates an increase in the user’s rating, incorrect or decreases the rating by 1 or resets the user’s level to zero (depending on the current level of difficulty).
The user rating is divided into three colors: blue, green and red (each color has 9 ratings). Red is the highest and its execution automatically moves the user to a more difficult level of the game. To automatically move to the next level, you need to give 27 correct answers.
Level of difficulty.
0 – level (the level indicator is off), this is the level of learning when the user chooses a logic element for himself and gives an answer to the input states of the logic element offered by the game.
1 – level (the level indicator is blue), this is also the user training mode. The difference from mode 0 is that if the answer is positive, the user’s level increases by 1, and if the answer is negative, it is reset to zero. You can pass this level only if you give 100% correct answers.
2 – level (the level indicator is green), at this level the game randomly selects a logical one for the user and waits for an answer about it. A correct answer increases the user’s rating, a negative one decreases it. When the maximum rating is reached, the game moves to the next level.
3 – level (the level indicator is lit turquoise), at this level the game itself randomly selects a logical level for the user and waits for an answer about it. If the answer is positive, the user’s level increases by 1, and if it is negative, it is reset to zero. You can pass this level only if you give 100% correct answers. When the maximum rating is reached, the game moves to the next level.
4 – level (the level indicator is red), at this level the game randomly selects a logical level for the user and waits for a response from it for 10 seconds. A correct answer increases the user’s rating, a negative one decreases it. When the maximum rating is reached, the game moves to the next level. But if the user does not respond within 10 seconds of the allotted time, the game resets all user ratings and returns him to level 0.
5 – level (the level indicator is lit purple), at this level the game is similar to level 4 except that the answer is expected within only 5 seconds. You can complete this level only by giving answers within seconds and all answers must be 100% correct! At this level, you cannot pause the game with the power button to continue after a while.
The game comes with a USB connector that can be connected to a PC or a 5 volt power adapter.
Note: When connected to a PC, it is possible to control the game via the serial port.
When turned on, the indication is tested, and the game goes into standby mode, the On/Off indicator is blue (standby mode).
To start the game, turn it on by lightly touching the On/Off touch button (blue – standby mode, green game mode).
When you first turn on Logic Gates , you’re provided with an initial level of training.
To start a workout, turn on the game. To do this, touch the On/Off sensor, it will light up green. Then touch the logic element of interest, the simulator will automatically suggest a state at the input of the element, you need to touch the sensors 0 or 1 to select the correct answer.
Note: High level – LED indication in red. Low logical level – LED indication in blue.
After touching the sensor of the logic element, the LED indicators located above the sensors of buttons 0 and 1 and the LED response indicator will start flashing. After the user gives an answer, the answer LED will light up with the color of the selected solution.
After the correct answer, the user’s level increases by one. If the answer is incorrect, the user’s level decreases by one.
When manually changing the level of the game, the user’s current rating is reset to zero.
When the sensor disables the game with the On/Off button, the game remembers the user’s current level and rating and stores it in non-volatile memory (in a de-energized state). When you turn it on later, you can continue playing from your current state.
At the last level, it is impossible to pause the game, the last level is intended for professionals and you can complete it only in “one breath”!
Description of the game interface.
Logical elements.
The element is “NOT”.
Logic – negations, inversion, refers to the unary operation.
Two logical inputs and one output.
| Input | Output |
| A | Q |
| 0 | 0 |
| 1 | 1 |
If the input is high (red), the output should be low (blue). If there is a low level (blue) at the input, there should be a high level (red) at the output.
The element is “AND”.
Logic is logical multiplication, conjunction, refers to binary operations.
Two logical inputs and one output.
| Input | Output | |
| A | B | Q |
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
If there is a low level (blue) at any of the inputs (or both), there should be a low level (blue) at the output. Only if there is a high level (red) at both inputs, there will be a high level (red) at the output. For the logical element “AND”, the low level is dominant.
The element is – “OR”.
Logic is a logical addition, disjunction, refers to binary operations.
Two logical inputs and one output.
| Input | Output | |
| A | B | Q |
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
If there is a high level (red) at any of the inputs (or both), there should be a high level (red) at the output. Only if there is a low level (blue) at both inputs, there will be a low level (blue) at the output. For the logic element “OR”, the high level is dominant.
The element is “exclusive OR”.
Logic is equivalence (equivalence, identity), refers to binary operations.
Two logical inputs and one output.
| Input | Output | |
| A | B | Q |
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
If there are different levels at the inputs (high on one and low on the other), then the output will be a high level (red). If both inputs have the same levels, the output will be low (blue).
Control via the serial port of the PC.
Any terminal program can be used for control. When connected, you will see a new serial port
The game uses a Microsoft certified driver and there will be no connection problems.
Set the connection parameters as in the picture.
Activate the connection
after powering the game or turning it on using the On/Off touch button, a message will be sent to the serial port.
All user actions and responses are sent to the serial port.
Control commands.
Control commands consist of a single character.
| Symbol | Description |
| 1 | Selecting the NOT Logic Element |
| 2 | Selecting an AND Logic Element |
| 3 | Selecting an OR Logic Element |
| 4 | Select the EXCLUSIVE OR logic |
| L(L) | User response – “Low level output” |
| H(h) | User response – “High level output” |
| m | Changing the level of play. |
| o | Turn the game on or off. |
Using the Game to learn programming on Microchip microcontrollers.
On the back panel there is a connector for debugging, to which you can connect a debugger – programmer. The PIC18F27Q84 microcontroller is used in the project.
For those who are interested, for more detailed information on using the game board as a demoboard to learn programming, write to catcatcat.electronics@gmail.com. You will be provided with the original project of the game for training.












Комментарии