How does a keyboard matrix work? Why is it used? And what are phantom keys? And how to avoid them

Поділитися
Вставка
  • Опубліковано 14 гру 2024

КОМЕНТАРІ • 5

  • @atharvavadeyar5157
    @atharvavadeyar5157 3 місяці тому

    So is the only way to get the intersection value to set each Y value to high and see which X values respond? Or is there any other way to do it other than polling?

    • @codemercenaries9715
      @codemercenaries9715  3 місяці тому +1

      Actually typically the X lines are pulled high by resistors and then the scanning process pulls down one of the Y lines and checks if there is a reaction on any X line.
      If you pull down more than one Y line at a time you can not identify the actual position that is pressed.

    • @atharvavadeyar5157
      @atharvavadeyar5157 3 місяці тому

      @@codemercenaries9715 also, why does the circuit use pull up resistors and not pull down? Why define a pressed key as a logical 0 instead of logical 1?

    • @codemercenaries9715
      @codemercenaries9715  3 місяці тому +1

      Drivers that pull to ground (open collector or open drain) are more efficient and simpler to implement in silicon than drivers that pull up. That is why many digital signals are active low and use pull ups for the non active state.
      And inverting the logical state afterwards is a no-brainer.

    • @atharvavadeyar5157
      @atharvavadeyar5157 3 місяці тому

      @@codemercenaries9715 thank you 😁