PDA

View Full Version : Matrix keyboard problem



MegaADY
- 7th May 2005, 13:27
Hello all. I have a little simple problem but I can't figure it out. I have a system with a 4x4 matrix keyboard, LCD, and a Siemens processor. All system functions are processed inside that microcontroller.I want that system running, and in parallel with it to process by myself its keypad in a PICin parallel with the Siemens micro. I can't change the keys to put a double switch key. I tried to process the keypad with 4 rows and 4 columns connected directly to my pic, and, of course, it didn't worked. The bad thing is that I don't have time to figure out how does the Siemens micro process the keypad, I want an universal sollution for this kind of job. Any ideea woud be great.Thank you very much,

NavMicroSystems
- 7th May 2005, 16:22
The bad thing is that I don't have time to figure out how does the Siemens micro process the keypad, I want an universal solution for this kind of job.

You must be kidding

mister_e
- 7th May 2005, 16:42
i probably miss somehing on that one.. Do you want to add an external circuit to this already functionnal keypad and do according stuff with another PIC controller? IF so... that's not impossible but remind tha the first one already send scan signal to that keypad so... how to deal with it??? can need some hardware modifications.

MegaADY
- 7th May 2005, 18:41
I know that the first circuit sends scan signals to the keypad.I have to put some external circuirty. But I don't know what to put there. I didn't meant by

' The bad thing is that I don't have time to figure out how does the Siemens micro process the keypad '
to say that I can't deal with it . I can, but this takes time. I have enough time to do this on that device I have, but I'll have to do this in a place where I will have 30 minutes to capture the keypad and there will be no time for signal measuting . That's why I said I need a quite 'universal' sollution. I can connect over the rows and columns. and I have to process the keypad in parallel with the original processor from the pcb

mister_e
- 7th May 2005, 19:27
Set PORTB to input, place all 8 wires of the PORTB in parrallel with the actual design, and read all 16 keys results to PORTB, write your results to internal EEPROM, LCD or else. That's the only thing i can see. BUT i'm really not 100% sure that the reading of the keys will always be the same... worth to try.

Something like


TRISB=255
a var byte

start:
a=PORTB
LCDOUT $FE,1,"PORTB= ",HEX2 a
pause 200
goto start

MegaADY
- 7th May 2005, 21:35
Hmmm.... Interesting ideea. It might work . I'll test this in two days and I'll post reply here. But I feel like something is missing me . Not sure what exactly , but ... if the main system scans lines, and at the time t0 it scans line 3 and I am shorting line 1 column 1 , the result will be different than if the system scans other line and I am shorting line 1 column 1. right ? Not sure but ... I'll try this. Thank you very much.

mister_e
- 7th May 2005, 22:19
My assumption was good. it's working fine. i just finish to test it. Have fun.

MegaADY
- 9th May 2005, 16:44
Thank you very much ... it works fine !

mister_e
- 9th May 2005, 18:50
hi MegaADY,

nice to know it's working for you!