MM74c922 without BS2 is useless??
Bronson
Posts: 44
Hi guys,
I have built a lot of projects using BS2 and matrix keypad + keypad-encoder (MM74c922).
I don't know if my topic is appropriate in this forum or no, but I am so curious for the solution.
So I built a test project to encode my 4x4 matrix keypad to 4-bit binary value (range: 0000 = 0 upto 1111 = 15).
I use MM74c922 to do the encoding task.
The bottleneck is the order of keypad buttons are not compatible with binary value after encoded.
Here is my keypad buttons order:
1 | 2 | 3 | A
4 | 5 | 6 | B
7 | 8 | 9 | C
* | 0 | # | D
If I press button '1' (coordinate 1,1), MM74c922 will output binary 0000 or decimal 0, not decimal 1
If I press button '2' (coordinate 1,2), MM74c922 will output binary 0001 or decimal 1, not decimal 2
and so on..........
and if button '0' (coordinate 4,2) is pressed, it will produce binary 1101 decimal 13, not decimal 0.
MM74c922 is working according to the datasheet, but it just doesn't compatible with the button's order of my keypad (general model in market today). It only work with:
0 | 1 | 2 | 3
4 | 5 | 6 | 7
8 | 9 | A | B
C | D | E | F
which can't be found in any stores.
Of course I can use BS2 or other microcontroller to 'cheat' the output value, but doesn't it mean that MM74c922 is useless without microcontroller?
Let's say if I want to attach a keypad to 7-segment LED (using HCF4511) to display the numeric value according to pressed button (button '1' displays '1', button '2' displays '2', and so on...), do I have to use microcontroller for such simple task?
Pls help me to cure my curiousity.
Regards,
Bronson Alex
I have built a lot of projects using BS2 and matrix keypad + keypad-encoder (MM74c922).
I don't know if my topic is appropriate in this forum or no, but I am so curious for the solution.
So I built a test project to encode my 4x4 matrix keypad to 4-bit binary value (range: 0000 = 0 upto 1111 = 15).
I use MM74c922 to do the encoding task.
The bottleneck is the order of keypad buttons are not compatible with binary value after encoded.
Here is my keypad buttons order:
1 | 2 | 3 | A
4 | 5 | 6 | B
7 | 8 | 9 | C
* | 0 | # | D
If I press button '1' (coordinate 1,1), MM74c922 will output binary 0000 or decimal 0, not decimal 1
If I press button '2' (coordinate 1,2), MM74c922 will output binary 0001 or decimal 1, not decimal 2
and so on..........
and if button '0' (coordinate 4,2) is pressed, it will produce binary 1101 decimal 13, not decimal 0.
MM74c922 is working according to the datasheet, but it just doesn't compatible with the button's order of my keypad (general model in market today). It only work with:
0 | 1 | 2 | 3
4 | 5 | 6 | 7
8 | 9 | A | B
C | D | E | F
which can't be found in any stores.
Of course I can use BS2 or other microcontroller to 'cheat' the output value, but doesn't it mean that MM74c922 is useless without microcontroller?
Let's say if I want to attach a keypad to 7-segment LED (using HCF4511) to display the numeric value according to pressed button (button '1' displays '1', button '2' displays '2', and so on...), do I have to use microcontroller for such simple task?
Pls help me to cure my curiousity.
Regards,
Bronson Alex
Comments
·· Please see the attached code for an example of how to convert the incoming values from the keypad decoder into the values you want. This example is written for the EDE1144 but the concepts are the same. The LOOKUP command is what you need. I hope this helps. Take care.
Specifically the routine above takes the value returned from the keypad decoder, in this case inKey, and finds the corresponding element number.· This keypad decoder returns a number from 0 through 15, so you have 16 elements.· The element in the list is placed into outKey.· So a keypad such as the one laid out below works with the table above.· You simply substitute the return values you want.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Post Edited (Chris Savage (Parallax)) : 1/19/2007 6:04:29 AM GMT
Thx for the input, guys. So are you saying that if I want to attach a keypad to 7-segment LED to display the numeric value according to pressed button, I have to use microcontroller (BS2 or SX or others)?
You could do it by using a small EPROM.
Just burn the correct codes into the lowest 16 locations, and hook the outputs of the MM74c922 to the lowest address inputs on the EPROM.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Don't visit my new website...
http://focus.ti.com/lit/ds/symlink/sn74283.pdf
The only two pitfalls I can see is the last key on you keypad, you'd like it to be 15, but using this method it would be 16 in binary.· You'll need to decide how to handle this one.· IE, you press "D" on your keypad, expecting "15"(binary %1111), but because everything is off by one, it's binary %10000, notice that this is 5 binary digits.· You just crossed from a nibble to a byte.· I'm not sure what the adder chip's output would be in this case, I think it would be all zeros, with the carry output set.· If you only use the zero thru 9 keys, this shouldn't be a problem anyway.
The other problem is the zero key.· I'm don't know how to fix that.··
Stupid question, but can you simply re-label your keypad to correspond with the keypad encoder's output?
I hope this helps!
Post Edited (Desy2820) : 1/19/2007 3:05:27 PM GMT