thank u joe for ur effort.
i read it before , and it is not answer my question
thank u again.
thank u joe for ur effort.
i read it before , and it is not answer my question
thank u again.
OK then tell us more about the problem, If I misunderstood what you are doing, please straighten me out. There is a table of abundance here, please do not go away hungry. Have you written some code that does not work ? If so please post it so we can see what you are trying to do.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
I think what iham wants is the kind of keypad entry you get with Mobile phone texting...
ie.. Button '2' is also A B or C...
So you press it once you get '2', you press it again within say 1 second, you get 'A', press again and you get 'B', and again you get 'C'... then back to '2' again, and so on. If you leave it more than 1 second, it remains with whatever the last selection was and moves to the next character position.
This really means integrating the Keypad with a Display... because you will be changing the displayed value depending if the same key is pressed again within the timeout period, and having an Array for storing the resultant Alphanumeric Text 'string'.
There are many ways of doing this...
In the example appended (just to get you started), the Subroutine exits ONE SECOND after the Button has been pressed. If the Button is pressed within the one second period, a new value is assigned and the Counter is reset for one second again. Only when ONE Second has elapsed from the last Button press, will the subroutine exit with the key value.
This Subroutine assigns ASCII numeric 2, or alphabetic A, B or C to the Button.
You will have to expand this out across your entire keypad, and integrate LCD Display, but the principle remains the same. At the heart of this, we are simply counting 100 loops of 10mS each. 10mS is also a good debounce time, so it serves a dual purpose.
Code:ButtonA var PortB.0 CounterA var BYTE CounterB var BYTE ' ' Subroutine Assigns one of FOUR Characters 2,A,B,C when Button Pressed ' --------------------------------------------------------------------- ' CounterA = Number of Button Presses (0-4) ' CounterB = Number of 10mS Loops Executed ' also contains ASCII Character (or Zero) - on Exit ' GetKey2ABC: CounterA=0 CounterB=0 GetKey2ABCLoop: If ButtonA=0 then CounterA=CounterA+1 If CounterA>4 then CounterA=1 CounterB=0 While ButtonA=0 CounterB=CounterB+1 Pause 10 If CounterB>100 then goto GetKey2ABCExit Wend else CounterB=CounterB+1 Pause 10 endif If CounterB<100 then goto GetKey2ABCLoop GetKey2ABCExit: Lookup CounterA,[0,"2ABC"],CounterB Return
thank u very much Melanie
u give me the keys
i will try it and expand it inshallah
Bookmarks