Hi Folks!
I'm new in CCS compiler and I'm trying to do a program to count some quantities and my program does not work as I wish. I have an 74C922 (keypad 16 key encoder) with pin DA connected to my RB0/INT pin. It reconize that I pressed a button and gives me a correct value ( Tecla variable ) and set Tec_Press bit, that indicates me that a key was pressed. If I press "A" key in my keypad (value 10 decimal) my program switches to FuncaoA() and it can't leave that function until I press again a "A" key, because I have an infinite loop that tests every time if I had a key pressed (bit Tec_Press=1), but in fact it returns to my switch function at main() function (it is visible if I press "B" key it shows me the text "Function B" in my LCD). Any suggestion?
Another point is that i want to read 4 values from my keypad and store it in one variable (Qtde) - for example, I press 3 followed by 4 followed by 5 followed by 7 and my Qtde var must have 3457 stored (in order 1000's, 100's, 10's and 1's). How can I do that?
Thanks a lot,
Luis

Hi,
when you're pressing "A" key then an interrupt appears (74C922 to EXT Int), but what will happen when you're releasing the key ? I don't see where the key release is processed.
___________________________
This message was ported from CCS's old forum
Original Post ID: 10810