Searching \ for '[PIC]: keypress' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'keypress'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: keypress'
2000\11\23@230327 by yansong gu

flavicon
face
Hi,

Has any one ever tested how long does a human key press lasts ? I thought I
saw a 10ms but was not quite sure. Any help is appreciated. It would be more
helpful is someone can point me to a web source about keypad intfacing to
pic.



Yansong


{Original Message removed}

2000\11\23@233456 by David Huisman

flavicon
face
Yansong,

It would suggest it may be better to write the software such that it is
independent of time key is pressed. ie. act on keypress but don't respond to
further key presses until original key is released.

You also normally debounce the key with a small delay (30-50ms maybe).

ie. If keypress detected wait 30ms
   if key still being pressed, act
   wait till key released
   small delay

Regards

David Huisman

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2000\11\24@003808 by Robert A. LaBudde

flavicon
face
At 10:59 PM 11/23/00 -0800, Yansong wrote:
>Has any one ever tested how long does a human key press lasts ? I thought I
>saw a 10ms but was not quite sure. Any help is appreciated. It would be more
>helpful is someone can point me to a web source about keypad intfacing to
>pic.

A keypress is pressed to last much longer than 10 ms.

What 10 ms corresponds to is the time period after which the key has
stopped bouncing. Most keys are specified to reach steady state in 5 ms, so
10 ms is safe. If you have poor quality switches, you may want to allow 20
ms to make sure.

================================================================
Robert A. LaBudde, PhD, PAS, Dpl. ACAFS  e-mail: spam_OUTralTakeThisOuTspamlcfltd.com
Least Cost Formulations, Ltd.            URL: http://lcfltd.com/
824 Timberlake Drive                     Tel: 757-467-0954
Virginia Beach, VA 23464-3239            Fax: 757-467-2947

"Vere scire est per causas scire"
================================================================

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2000\11\24@032643 by Vasile Surducan

flavicon
face
On 23 Nov 00, at 22:59, yansong gu wrote:

> Hi,
>
> Has any one ever tested how long does a human key press lasts ? I thought I
> saw a 10ms but was not quite sure. Any help is appreciated. It would be more
> helpful is someone can point me to a web source about keypad intfacing to
> pic.
>
  In Jal ( http://come.to/jal):

-- some pin's and variable definition
pin_c3_direction = input -- one button active low
pin_c2_direction = input -- second button active low
var bit curent_push, next_push

-- routine for tmr_0 rollover at 20 or 50 ms
tmr0_rollover

--main program
forever loop

next_push = ! pin_c3

if ( next_push ^ curent_push ) & next_push then
-- after first push button is inactive until...
  curent_push = next_push
 -- do job for this push
  curent_push = low     -- ... until this reset

-- or polling button in conjunction with t0if
elsif (! pin_c2) & intcon_t0if  then
 intcon_t0if = low
-- do job for this push
end if
end loop

****************************************
Surducan Vasile
email:.....vasileKILLspamspam@spam@l30.itim-cj.ro
URL:http://www.geocities.com/vsurducan
****************************************

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2000\11\24@235152 by yansong gu

flavicon
face
This is really helping me for my project. Thanks all for the help.

Yansong


-----Original Message-----
From: David Huisman <david.huismanspamKILLspamADVMININGTECH.COM.AU>
To: .....PICLISTKILLspamspam.....MITVMA.MIT.EDU <EraseMEPICLISTspam_OUTspamTakeThisOuTMITVMA.MIT.EDU>
Date: Thursday, November 23, 2000 8:39 PM
Subject: Re: [PIC]: keypress


>Yansong,
>
>It would suggest it may be better to write the software such that it is
>independent of time key is pressed. ie. act on keypress but don't respond
to
{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


More... (looser matching)
- Last day of these posts
- In 2000 , 2001 only
- Today
- New search...