Interfacing keypad and led patterns - PIC16F84A Assembly code

Discussion in 'Embedded Systems and Microcontrollers' started by DevTom, Apr 7, 2016.

  1. DevTom

    Thread Starter New Member

    Mar 20, 2014
    2
    0
    Hi, I'm doing a project where I have a keypad and when a specific key is pressed, a set of leds will continuously display a pattern until a different key is pressed. I can get the keypad to do the initial display but it won't repeat. I think this is due to scanning the keypad, I don't think I can repeat the led pattern and scan at the same time but I am not sure. I have attached my code to what I have so far. I'm thinking I need to do some sort of test on user input of the keypad, possibly test the number the keypad returns and if it is the same repeat the previous pattern but if it is different do the scanning?
     
  2. atferrari

    AAC Fanatic!

    Jan 6, 2004
    2,648
    764
    Hola Dev,

    Do this: test the keypad part of your code where each key will turn off ALL LEDs and then turn on a specific one, unique for that key. When you have it working, then, and not before, start testing whatever should happen at the press of a key.
    That way, you have less necessity of guessing who influences what.

    Divide and conquer is the name of that game.

    Mixing possible problems is a no-no.
     
    DevTom likes this.
  3. DevTom

    Thread Starter New Member

    Mar 20, 2014
    2
    0
    Okay! I will test it that way and see how it goes, thanks for the help.
     
Loading...