10x4 matrix keyboard using only portB


Closed Thread
Results 1 to 20 of 20

Hybrid View

  1. #1
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    Thank you Darel to have pointed out the problem, which I did noticed! I will modify the software to have only one output pin at the time on portB. The updated version will be posted tomorrow.

    Thank againg for your promp notification.

    Kind regards

    Al.
    All progress began with an idea

  2. #2
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    Here the updated version of software and hardware.

    It was necessary to pulldown the rows as well (4x5K resistors) in order to avoid floating inputs. It has been tested and it works.

    If you have downloaded the file from the previuos post please discard them and download the updated file from this post.

    Thank you again to Darel, and sorry for the inconvenience to all the members of the forum that have visited my post.

    Al.
    Attached Images Attached Images
    Last edited by aratti; - 18th November 2008 at 14:16.
    All progress began with an idea

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    I like the concept, good job!
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  4. #4
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Awwwwww! No RBC Interrupts. :(

    Such a nice little keypad scheme.
    If only it would ....
    <br>
    DT

  5. #5
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    Darel be patient next release will be with "PORTB change interrupts". For that I need to build a new hardware prototype and it will take few days.
    I had to fix the bug you pointed out quickly, otherwise I could not sleep!

    Regards

    Al.
    All progress began with an idea

  6. #6


    Did you find this post helpful? Yes | No

    Default

    If I am looking at this correctly, the one drawback to this design is that you can't detect multiple keypresses in the sam row, right? In fact, holding two keys down in the same row could cause the wrong character code to be generated. Like holding down 1,1,and 1,8 gives you the code for 1,9, right? Not trying to nitpick. Just wanted to make sure I understood the advantages and disadvantages to the design.
    Tim Barr

  7. #7
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    Yes Tim, this is the price you have to pay for the extra keys!

    If the spacing of the keypad is done properly than chances to press two contiguous keys at the same time are really rare, but since number of keys available is no more an issue, you can dedicate one key to delate the possible unwanted input.

    Al.
    All progress began with an idea

  8. #8
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Default

    I believe that a protocol is possible to detect simultaneous key presses, BUT it would fail if both keys were pressed at exactly the same time (incredibly unlikely though). However, if it did occur -- the procedure would return the key that equated to the binary sum of the two keys held down.

    You would only need microseconds of a difference between the keys being pressed to come up with something that works.

    Trent Jackson
    Last edited by T.Jackson; - 19th November 2008 at 07:48.

  9. #9
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,170


    Did you find this post helpful? Yes | No

    Default

    Since we are talking about mechanical switch, that micro seconds might be to short time in my opinion. Debouncing is needed to read the switch correctly.

    Ioannis

  10. #10
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Default

    Moreover ...

    I think if the columns were each given a unique, physical delay, say using an RC circuit -- you'd eliminate the possibility of two keys ever being processed as one.

Similar Threads

  1. PICs can do more if use others than delays instructions
    By hardcore in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 24th February 2010, 20:52
  2. AT/PS2 Keybord - PIC Interface?
    By Kamikaze47 in forum Code Examples
    Replies: 73
    Last Post: - 9th August 2009, 17:10
  3. shifting problem
    By helmut in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 31st August 2007, 07:11
  4. Output PIC module
    By freelancebee in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th September 2005, 21:10
  5. Can anyone help a beginner in a struggle?
    By douglasjam in forum mel PIC BASIC
    Replies: 1
    Last Post: - 6th May 2005, 00:29

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts