4x3 keypad


Closed Thread
Results 1 to 10 of 10

Thread: 4x3 keypad

Hybrid View

  1. #1
    Join Date
    Jan 2006
    Posts
    76


    Did you find this post helpful? Yes | No

    Default

    Thanks very much steve.
    I have it running and the keys are being read. I tried using low value resistors on the columns but it didnt work, but low value resistors on the rows and it started reading.

    One problem though, The first two rows are working perfect, but the second two rows will change values every time I press the button.
    these columns.

    The two affected rows are connected to the VREF pins on PORTA, is there a disable config for VREF? or is it default disabled?



    one more question also while your peeking at this thread. is there a way to make the auto repeat work only on 2 buttons? Two buttons on my kepad are +- adjustments and all the others are command buttons. It would be great to make the +- buttons autorepeat.
    Last edited by docwisdom; - 14th April 2006 at 22:52.

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


    Did you find this post helpful? Yes | No

    Default

    Did you modify your code and include those lines at the top?
    Code:
    ADCON1=$0F    ' Disable AD converters
    CMCON =7      ' Disable analog comparator
    Comparator voltage reference is suppose to be set to off by default if you refer to the CVRCON POR. AND when you set ADCON1 to 0F, you set VREF- to Vss, VREF+ to VDD... so i can't understand why it doesn't work.

    one more question also while your peeking at this thread. is there a way to make the auto repeat work only on 2 buttons? Two buttons on my kepad are +- adjustments and all the others are command buttons. It would be great to make the +- buttons autorepeat
    The first thing spring to mind is to set the AUTOREPEAT to ON then read the MyVar value and if it's not one of your two keys... redo the keypad scan until it change.

    PS: you're right, i did a mistake, low value resistor must be on ROWs, not colums... DOH!
    Last edited by mister_e; - 15th April 2006 at 11:21.
    Steve

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

  3. #3
    Join Date
    Jan 2006
    Posts
    76


    Did you find this post helpful? Yes | No

    Default

    we have operation. thanks very much steve.

    it was the ADCON1 register. Do you have any resources to better explain registers and their settings. when I read about them in datasheets is all just a totally different language to me.


    I have yet to implement the autorepeat. Ill post again with its results

  4. #4
    Join Date
    Jan 2006
    Posts
    76


    Did you find this post helpful? Yes | No

    Default

    I got my desired repeat with a simple loop comand.

    thanks for all your help steve, its been invaluable.

    If you feel so inclined, would you mind looking over my code and schematic to check for any changes that could be made for efficiency and design?

    thanks
    -brian

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


    Did you find this post helpful? Yes | No

    Default

    You're welcome! Great to know it's working fine now.

    No problem, post your stuff here. i'll post my own comments, i hope other will also do it too.

    Do you have any resources to better explain registers and their settings. when I read about them in datasheets is all just a totally different language to me.
    Sorry, i don't see any other reference. Sure sometimes datasheet are just Chinese to me (or greek depending of your local expression) but by using the trying/debuging/understanding method you'll never find any better reference. The first time is always the hardest... once you hit the wall and bang your head on your keyboard few times, you can't forget it. This is probably why i choosed this picture for my avatar <img src="http://www.picbasic.co.uk/forum/member.php?u=580">
    Last edited by mister_e; - 16th April 2006 at 11:18.
    Steve

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

Similar Threads

  1. 4x4 keypad Help
    By aaliyah1 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 5th October 2010, 17:34
  2. keypad 4x3
    By jonas2 in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 15th July 2009, 07:34
  3. 4x3 keypad and an LCD.. need help.
    By taisen83 in forum mel PIC BASIC Pro
    Replies: 22
    Last Post: - 6th January 2009, 10:34
  4. Keypad input test
    By Kalind in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 8th October 2008, 05:00
  5. Need help in matrix keypad coding
    By rano_zen06 in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 24th May 2008, 14:16

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