Keypad encoder

Discussion in 'The Projects Forum' started by MoonRidge, Jul 6, 2011.

  1. MoonRidge

    Thread Starter New Member

    Jul 6, 2011
    2
    0
    I need to fabricate a 0-9 keypad encoder that will accept 2-digit button presses and output 8-bit binary. I have looked at typical encoders such as the M74C922 and understand their operation, but I'm getting hung up on how to handle the second input digit and add the extra 4 output lines. I know this must be relatively simple. Can anyone help? Thanks.
     
  2. Zod

    New Member

    Jul 3, 2011
    12
    0
    I was doing something similar with DTMF decoders, and came up with the idea of decoding with a shift register, inverters, and gates.

    Invert the lines that should be low, leaving the remainder as is. This could be done with either jumpers with two possible positions, or a SPDT DIP switch, if they exist to ease "programming". Clock the shift register with any line that indicates keypress, or release.

    74xx04 has 6 inverters in one package. 74xx00 has four two input NAND gates. Depending on how they stack out, the final output may need to be inverted for a high.

    The principal is keys can be hit one after the other, but until two "valid" numbers are in the register, there is no output.

    CMOS equivalents exist, I don't have the numbers offhand. The shift register, I don't recall the part number.

    This was conceptual, but worked well on paper.

    Hope that's of some help in some way..
     
    Last edited: Jul 6, 2011
  3. lightingman

    Senior Member

    Apr 19, 2007
    374
    22
    There are a few other ways of doing this. First using a Microcontroler. Second, use 2, 4 bit latches (4042) a dual monostable (4538), a few gates and an EPROM (27C32 or 64) to decode the two 4 bit numbers to one 8 bit number. Basicaly, you feed the outputs from the 74C922 into the first latch and the outputs of that latch into the inputs of the second. The two sets of 4 output lines are the outputs of the latches. these go to the first 8 sddress lines of the EPROM. You will need to use the "Data available" output from the 74C922, to triger the monostables.

    It is getting a bit complex to explain. If you wish, I could post a schematic for you. I would also be willing to program supply you a couple of EPROMS (FOC) if it helps.

    If you wish to use a Microcontroler, I could program you a PIC16F876A to do it. This is by far the easiest way, and you could also incorporate an LCD or (with a couple of extra chips), add some 7 seg displays to show the number.


    Daniel.
     
  4. MoonRidge

    Thread Starter New Member

    Jul 6, 2011
    2
    0
    The microcontroller does sound like the best option, depending on cost (this is a small project where only two encoders will be needed and may not happen at all depending on the client). What would be the cost to provide the microcontrollers and programming?
     
  5. someonesdad

    Senior Member

    Jul 7, 2009
    1,585
    141
    The microcontroller costs on the order of $0.5 to $5. The programming is probably straightforward -- however, if you're going to do it and don't know anything about it, you're going to have to invest some money and time into the tools and learning. It's not too severe though. If you want to pay someone to do it, it will probably cost $50 to $150 per hour for a programmer to do the work for you.
     
  6. lightingman

    Senior Member

    Apr 19, 2007
    374
    22
    The programming would take me about 20 mins. It is such a simple routine. The 16F676A Micro is around 3 GBP here.

    For the LED version you would need a couple of NPN transistors, a CD4511 and a few resistors to drive them.


    Daniel.
     
Loading...