Skip to main content
added 83 characters in body
Source Link
Justme
  • 171.5k
  • 6
  • 135
  • 348

It's very simple, and the circuit works exactly as drawn. You only expect it to work differently.

The buttons in the button matrix short certain pins of the matrix decoder chip, and the decoder simply outputs a number (key code) for each button that happens to be pressed in the matrix.

The buttons in the keyboard just have labels printed on them that don't match the keycodes the matrix outputs, no matter how you wire it, due to the way the buttons are arranged in the matrix and connected to decoder chip.

As the decoder chip has four columns and four rows, each row must have 4 codes. But you have only 3 buttons per row, so you can't output all codes in a row, only three of them.

So the keycodes output will be in range of 0 to 15, and you will be skipping every fourth number. Therefore, by the time you reach your button which reads "9" on it, the output code is not within range of printable numbers 0..9 any more.

It's very simple, the buttons in the button matrix short certain pins of the matrix decoder chip, and the decoder simply outputs a number (key code) for each button that happens to be pressed in the matrix.

The buttons in the keyboard just have labels printed on them that don't match the keycodes the matrix outputs, no matter how you wire it, due to the way the buttons are arranged in the matrix and connected to decoder chip.

As the decoder chip has four columns and four rows, each row must have 4 codes. But you have only 3 buttons per row, so you can't output all codes in a row, only three of them.

So the keycodes output will be in range of 0 to 15, and you will be skipping every fourth number. Therefore, by the time you reach your button which reads "9" on it, the output code is not within range of printable numbers 0..9 any more.

It's very simple, and the circuit works exactly as drawn. You only expect it to work differently.

The buttons in the button matrix short certain pins of the matrix decoder chip, and the decoder simply outputs a number (key code) for each button that happens to be pressed in the matrix.

The buttons in the keyboard just have labels printed on them that don't match the keycodes the matrix outputs, no matter how you wire it, due to the way the buttons are arranged in the matrix and connected to decoder chip.

As the decoder chip has four columns and four rows, each row must have 4 codes. But you have only 3 buttons per row, so you can't output all codes in a row, only three of them.

So the keycodes output will be in range of 0 to 15, and you will be skipping every fourth number. Therefore, by the time you reach your button which reads "9" on it, the output code is not within range of printable numbers 0..9 any more.

Source Link
Justme
  • 171.5k
  • 6
  • 135
  • 348

It's very simple, the buttons in the button matrix short certain pins of the matrix decoder chip, and the decoder simply outputs a number (key code) for each button that happens to be pressed in the matrix.

The buttons in the keyboard just have labels printed on them that don't match the keycodes the matrix outputs, no matter how you wire it, due to the way the buttons are arranged in the matrix and connected to decoder chip.

As the decoder chip has four columns and four rows, each row must have 4 codes. But you have only 3 buttons per row, so you can't output all codes in a row, only three of them.

So the keycodes output will be in range of 0 to 15, and you will be skipping every fourth number. Therefore, by the time you reach your button which reads "9" on it, the output code is not within range of printable numbers 0..9 any more.