Logic circuit in logisim (Matrix keyboard)

in #technology5 years ago

   I’m a student of electronic engineering at the Simon Bolivar University of Venezuela, a few months ago I was in the course of "Digital Circuits" where we were evaluating the design of logic circuits through different simulators including the simulator "Logisim" . One of our evaluations was the design of a logic circuit that determine the selected button on a matrix keyboard. I want to share the report of this activity that make me continue improving my knowledge in the development of digital circuits.

  Objective

  Design a circuit that shows in the display 7 segments the value of the button pressed on a matrix keyboard.

  Designing and results:

  We received the design of a 3x3 matrix keyboard excited by pins connected to each column of the keyboard respectively, once the column is activated, you can select one of the three buttons available in that column, since more than one column is on at the same time the output of the circuit will be invalid. The circuit originally delivered was:


Own Image

  Design of the logic circuit that excites the matrix keyboard:

  The three columns were connected to the output of three Flips Flops, so that they served as a future state of the same, an additional flip flop was added (which will be referred to as a zero column (C0)) and the columns being numbered 1 to 3 from left to right to start the state machine when each flip flop marks zero. In this way the three columns will be lit one by one. These 4 outputs of the flip flops work as a future state, enter the integrated circuit: "Excite columns" which throws in the output the next state of the columns.

  The circuit obeys the following table of truth:


Own Image

  The resulting circuit is:


Own Image

  In this way the columns are enabled one by one without ever agreeing.

  Design of the logic circuit that determines which of the keys has been activated:

  The rows activated by pressing a button on the keyboard are the following:

  F1: Corresponding to the row activated by buttons 1,2 and 3.

  F2: Corresponding to the row activated by buttons 4,5 and 6.

  F3: Corresponding to the row activated by buttons 7,8 and 9.

  The columns that activate the keyboard (C1, C2 and C3) and the rows activated by it (F1, F2 and F3) when a button is pressed will be connected to an integrated circuit "Selected key" that receives these parameters as input, to the output is a number in binary coding, represented by the terms: B3, B2, B1 and B0, being B3 the most significant bit, this in order to create column-row combinations that represent the number of the selected button.

  The circuit is governed by the following truth table:

  The resulting circuit is:

Own Image

  In this way, when you press a button, it will coincide with the columns excited by the keyboard that will vary and display the selected number in binary coding.

  The three outputs of the matrix keyboard were connected to a NOR gate, whose output is connected to the "Enabled" button of the Flips Flops, when any button on the keyboard is pressed at the output of the NOR gate, a zero will be obtained. which will turn off the Flip Flops while its entry to the "Enabled" remains zero, and therefore, the current state will be preserved and the selected number will continue to be observed while this button is held down.

  Design of the logic circuit that shows in the "7 segment display" the button pressed on the keyboard:

  The output of the second integrated circuit corresponds to the inputs of the third integrated circuit, which will receive the number selected on the keyboard but in binary configuration and will output the configuration to turn on the segments of the "7 segment display" corresponding to the button pressed for show the required number

  In the circuit, the outputs (S1, S2, S3, S4, S5, S6, S7 and S8) correspond to each segment of the "Display" in the following way:


Spartan-3 FPGA Starter Kit Board User Guide, UG130 (v1.2) June 20, 2008.

  S1 = a

  S2 = b

  S3 = c

  S4 = d

  S5 = e

  S6 = f

  S7 = g

  S8 = dp

  The circuit is governed by the following truth table:


Own Image

  In this way, when the input is a number in binary configuration, the circuit behaves in such a way that it will output the configuration that will turn on the "Display" segments corresponding to the number according to the guide image of the display. In general, the complete circuit looks like this:


Own Image

  Results:

  It was possible to design the circuit so that it can fulfill its specified function, when pressing any of the buttons it will be shown in the "Display 7 segments" the selected number between 1 and 9 as long as the button is pressed, if it is released the "Display" will return to its initial state and nothing will be displayed on the screen.

  Here we have some of the results of the circuit:


Own Images

  The block diagram of the circuit is shown below:


Own Image (In Spanish because it is its original language)

  Following the state diagram of the state machine:


Own Image

  Where the numbers represent the current state of each column of the matrix and the extra flip flop that I have called C0. Which govern the behavior of the circuit.

  References:

  Angel Terrones, "Circuito Q1" received on December first 2018.

  Spartan-3 FPGA Starter Kit Board User Guide, UG130 (v1.2) June 20, 2008.

  Taub, Herbert. Circuitos Digitales y Microprocesadores. Editorial Calypso. Mexico DF. (1998)

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.034
BTC 64231.88
ETH 3128.59
USDT 1.00
SBD 3.95