Home Forums MikroC Pro for PIC Project Discussions keypad input problem.

This topic contains 19 replies, has 3 voices, and was last updated by  Bitahwa Bindu 2 months, 2 weeks ago.

  • Author
    Posts
  • #2710

    bethel
    Participant

     

     

    After building the temperatures control project everything worked fine except the keypad that inputs ‘3’ on its own without being pressed while other keys dosnt work, after several process of trouble shooting which includes detaching the keypad which would cause it to stop inputting  ‘3’ but if I touch any of the terminals on the pic18f…where the keypad is connected to with my finger it continues inputting ‘3’. Please help my project defence is just few day away.

  • #2714

    Bitahwa Bindu
    Keymaster

    Can  you post the circuit diagram, screenshot of your hardware and the source code of your project we can have a look at it.

  • #2715

    bethel
    Participant

    The simulation on Proteus is working fine but on my practical work am having challenges sir.

  • #2716

    bethel
    Participant

    Here are the files

    Attachments:
    You must be logged in to view attached files.
  • #2719

    bethel
    Participant

    Sorry  plz this is the correct schematic

    Attachments:
    You must be logged in to view attached files.
    • #2721

      Bitahwa Bindu
      Keymaster

      Where is the picture of your physical hardware?

      Please post the full code, not just the c file. You must zip all your files together.

  • #2728

    bethel
    Participant

    Here is the zipped file sir

  • #2729

    bethel
    Participant

    File

    Attachments:
    You must be logged in to view attached files.
  • #2732

    Bitahwa Bindu
    Keymaster

    You said you are experiencing your problem after you built your project. How are we going to guess what could be wrong if the simulation works fine? We need at least to look close at your construction. That is why we asked you a photo of your project.

    Can you upload it?

  • #2733

    bethel
    Participant

    Sorry for the delay, the pics was actually bigger the the required size of upload, I was figuring a way of minimizing it. Thanks

    Attachments:
    You must be logged in to view attached files.
  • #2736

    bethel
    Participant

    Please am still very expectant of a solution to this issue as I have been working hard to find a solution but haven’t gotten any yet. Please help

  • #2747

    Bitahwa Bindu
    Keymaster

    In your code below ANSELD = 1; write these code:

    LATB=0;

    Check all your connections on the keypad and make sure your keypad is not making any contact if not pressed. Check continuity between column 3 and all the rows line. If you don’t press 3, they must not be any continuity.

    If possible, try to test with a different keypad.

  • #2749

    bethel
    Participant

    Thank you sir,  I have resolved the issue, in simulation resistors are only required in the colums while in real hard ware resistors are required in both rows and columns of the keypad.

  • #2750

    Bitahwa Bindu
    Keymaster

    Hi Thanks for your feedback, it will assist others as well if they come across the same problem as you.

  • #2780

    katlego
    Participant

    Sir am having the same problem as him I tried to put resistors on both columns and rows but still doesn’t work please help

    No

  • #2781

    Bitahwa Bindu
    Keymaster

    What problem exactly you are facing?

    The other guy had problem with a key being displayed without being pressed.  Are you facing the same problem?

  • #2782

    katlego
    Participant

    Yes, it keeps in putting 3 even when I didn’t press 3

  • #2783

    Bitahwa Bindu
    Keymaster

    Are you doing this same project or a different one? Can you give us the details of your project like the PIC and if possible upload your code and schematic diagram we will have a look and see what could be wrong.

  • #2784

    katlego
    Participant

    Same project and I didn’t change the code just took the 1 u gave us, everything is the same and on proteus it works fine

  • #2785

    Bitahwa Bindu
    Keymaster

    Hi. Try these:

    1. Set the unused pins as output pin to ground with a 10k resistor to avoid floating, like the unused RB3:

    TRISB.B3 =0;  //Set as Output

    LATB.B3 =0; // Set Output low.

You must be logged in to reply to this topic.