Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/27/10 19:29
Read: times


 
#176940 - Done !
Responding to: ???'s previous message
Dear all,

I have just successfully completed the text input scheme on LCD. Made a video of it (sorry for the bad quality though):
http://www.youtube.com/watch?v=Ba967CND7-U

The text written on the LCD is "multi-tap is 2 cool!!!"
I even implemented a static cursor inside timeout period & blinking otherwise.
And yes the final code is zipping through main() doing other stuff as well while inputting this :-)

I kept a global multitap_timeout initially as 0, and decremented by the 50ms timer interrupt when >0, whenever 1 sec delay is required set it to 20 & wait for it being 0:
/*--------------------------------------------
    This occurs every 50ms
---------------------------------------------*/
void timer_1_interr(void) interrupt 3
{
    static unsigned char data multiplier = 0;
    TR1 = 0;
    TF1 = 0;
    if(++multiplier == 20)
    {    multiplier = 0;
        soft_RTC_ticks++; 
    }
    TH1 = SOFT_RTC_TH1_RELAOD;    //relaod timer 1
    TL1 = SOFT_RTC_TL1_RELAOD;

    TR1 = 1;
    
    if(multitap_timeout)    //dec if not already 0
    multitap_timeout--;            
}

 
Note that I have put it after TR1=1; so the software RTC accuracy wont be affected since it wont ever take >50ms to execute the 2 line code after TR1=1; (in this case). Correct me if this has some downfall. I just now have to save the final alphanumeric string to RAM which should be easy.

Thanks and cheers to everyone who have given their precious time. I feel obliged.

-Regards,
Munish

List of 23 messages in thread
TopicAuthorDate
Ideas for Multi-tap keyboard routine            01/01/70 00:00      
   just follow            01/01/70 00:00      
   Multi-tap is not too difficult            01/01/70 00:00      
      Two-step operation. Keyboard input + post-processing            01/01/70 00:00      
         State Machine!            01/01/70 00:00      
            Agree 100%            01/01/70 00:00      
               Time to code            01/01/70 00:00      
                  Software Timers!            01/01/70 00:00      
                     Practical Limits            01/01/70 00:00      
                        Don't lock up in infinite loops everywhere            01/01/70 00:00      
                           In the pseudo code...            01/01/70 00:00      
                           State Machine            01/01/70 00:00      
                              Divide by 5            01/01/70 00:00      
                                 Timer resolution            01/01/70 00:00      
                              State Machine            01/01/70 00:00      
                              Looks not bad programming practice            01/01/70 00:00      
                  Using Timer May Still be Possible            01/01/70 00:00      
                     Done !            01/01/70 00:00      
                        Very Cool!!!            01/01/70 00:00      
                        Compare with zero is better            01/01/70 00:00      
                           Avoid ISR jitter using timer T1            01/01/70 00:00      
                           Code!            01/01/70 00:00      
                              Thanks Munish...            01/01/70 00:00      

Back to Subject List