Help Required in Understanding a topic

Discussion in 'Homework Help' started by telecomicon, Jun 18, 2011.

  1. telecomicon

    Thread Starter New Member

    Jun 18, 2011
    Hi every one

    I need some help. I am currently a student and I was reading floyed Digital fundamentals in chapter 9 there is an application of the shift registers as keyboard encoder. I read all the topic but I didnt understand how ring counter scans the input key while placing 0 on every row turn by turn. Can any one help me ? Please its urgent :(
  2. Georacer


    Nov 25, 2009
    I don't have the textbook you are referring to. We could help you more if you scanned and posted the passage on the book that talks about that application.
  3. MrChips


    Oct 2, 2009
    Keyboard scanning is an efficient way of detecting if a key is depressed when there is a large number of keys. For example, if you had 100 keys you would need 100 inputs in order to read each key.

    However, if you rewire the keys into a 10 x 10 matrix, you can design a system that uses only 10 input lines and 10 output lines, reducing the total number of I/O lines to 20.

    Here is how it works. (Might be easier if I had the time to show you a schematic diagram). Imagine 10 rows of wires connected to an output port (or outputs of a 10-bit shift register) and 10 columns of wires connected to an input port (or inputs to a 10-bit latch).

    Now wire each of the 100 switches at the intersection of the rows and columns.
    We will also add 10 pullup resistors on the 10 columns of wires. When no key is pressed the input register will record ten 1's.

    Now on the output register (rows) we send all 0's. If any key is pressed we can read back the inputs and we would know which column the pressed key is attached to but we would not know which row.

    So this is where we use the ring counter (or equivalent code on a micro) to scan through the 10 rows. We do this by sending all 1's except one row which we set to 0. When we scan through all the rows we will be able to tell on which row the pressed key is located.

    Hope this helps.
    Last edited: Jun 18, 2011