Keyboard delay
2005-02-19 by Valerij Avrealij
Yahoo Groups archive
Index last updated: 2026-04-28 22:41 UTC
Thread
2005-02-19 by Valerij Avrealij
Hello 2AVR-Chat members. I have interrupt based keyboard inquiry. How much time I need wait after interrupt occurs and keyboard inquiry? Thanks. -- Valerij Avrealij
2005-02-20 by brewski922
--- In AVR-Chat@yahoogroups.com, Valerij Avrealij <avrealij@m...> wrote: > Hello 2AVR-Chat members. > > I have interrupt based keyboard inquiry. How much time I need wait > after interrupt occurs and keyboard inquiry? > Thanks. > > -- > Valerij Avrealij It depends on the bounce time of the switches. Sometimes the manufacture datasheet has the specs for the bounce, settling, time. Most don't. Probably needless to say, but I'll say it anyway in case there is folks that are not awhere of it. From the time that a switch makes initial contact and a valid read is made of what switch created the closure, the contact needs to settle to a continuous closure. Anyway, for your case if you feel you are having problems with contact bounce or something else and feel a time-delay is need go ahead a insert a delay. Start with something big that WILL correct the problem, say a 0.001 or may be 0.01 or even 0.1 and see what happens. When the problem is corrected say between 0.001 and 0.01, split the difference and try 0.05. If that worked split the difference again. You will eventually get to a point where one delay works and just a bit faster fails. Using the number that works increase the delay a little, I usually use 10% slower. This gives you a little insurance. Mike
2005-02-20 by Valerij Avrealij
Çäðàâñòâóéòå, brewski922. Âû ïèñàëè 20 ôåâðàëÿ 2005 ã., 19:20:56: > --- In AVR-Chat@yahoogroups.com, Valerij Avrealij <avrealij@m...> > wrote: >> Hello 2AVR-Chat members. >> >> I have interrupt based keyboard inquiry. How much time I need wait >> after interrupt occurs and keyboard inquiry? >> Thanks. >> >> -- >> Valerij Avrealij > Anyway, for your case if you feel you are having problems with > contact bounce or something else and feel a time-delay is need go > ahead a insert a delay. Start with something big that WILL correct > the problem, say a 0.001 or may be 0.01 or even 0.1 and see what > happens. When the problem is corrected say between 0.001 and 0.01, > split the difference and try 0.05. If that worked split the > difference again. You will eventually get to a point where one delay > works and just a bit faster fails. Using the number that works > increase the delay a little, I usually use 10% slower. This gives you > a little insurance. > Mike You mean 0.01 sec or 0.01 mS or 0.01uS delay? Thanks -- Valerij
2005-02-20 by Stefan Trethan
<http://www.ganssle.com/debouncing.pdf> ST >> Anyway, for your case if you feel you are having problems with >> contact bounce
2005-02-20 by Kathy Quinlan
Valerij Avrealij wrote: > Çäðàâñòâóéòå, brewski922. > > Âû ïèñàëè 20 ôåâðàëÿ 2005 ã., 19:20:56: > > > > >>--- In AVR-Chat@yahoogroups.com, Valerij Avrealij <avrealij@m...> >>wrote: >> >>>Hello 2AVR-Chat members. >>> >>>I have interrupt based keyboard inquiry. How much time I need wait >>>after interrupt occurs and keyboard inquiry? >>>Thanks. >>> >>>-- >>> Valerij Avrealij > > > >>Anyway, for your case if you feel you are having problems with >>contact bounce or something else and feel a time-delay is need go >>ahead a insert a delay. Start with something big that WILL correct >>the problem, say a 0.001 or may be 0.01 or even 0.1 and see what >>happens. When the problem is corrected say between 0.001 and 0.01, >>split the difference and try 0.05. If that worked split the >>difference again. You will eventually get to a point where one delay >>works and just a bit faster fails. Using the number that works >>increase the delay a little, I usually use 10% slower. This gives you >>a little insurance. > > >>Mike > > > You mean 0.01 sec or 0.01 mS or 0.01uS delay? > Thanks > I would say mike is talking about whole seconds, as most bounce is over in 100ms or less, depending on the switch (some like power switches can be worse than others (like PCB mount reset switchies (the ones on the STK500 etc)) Regards, Kat. -- --------------------------------------------------------------- K.A.Q. Electronics Website: www.kaqelectronics.dyndns.org IM: Yahoo: PinkyDwaggy MSN: katinka@kaqelectronics.dyndns.org For Everything Electronics Phone: 0419 923 731 --------------------------------------------------------------- -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 266.1.0 - Release Date: 18/02/2005
2005-02-20 by brewski922
--- In AVR-Chat@yahoogroups.com, "brewski922" <brewski@i...> wrote: > > --- In AVR-Chat@yahoogroups.com, Valerij Avrealij <avrealij@m...> > wrote: > > Hello 2AVR-Chat members. > > > > I have interrupt based keyboard inquiry. How much time I need wait > > after interrupt occurs and keyboard inquiry? > > Thanks. > > > > -- > > Valerij Avrealij > > It depends on the bounce time of the switches. Sometimes the > manufacture datasheet has the specs for the bounce, settling, time. > Most don't. Probably needless to say, but I'll say it anyway in case > there is folks that are not awhere of it. From the time that a switch > makes initial contact and a valid read is made of what switch created > the closure, the contact needs to settle to a continuous closure. > > Anyway, for your case if you feel you are having problems with > contact bounce or something else and feel a time-delay is need go > ahead a insert a delay. Start with something big that WILL correct > the problem, say a 0.001 or may be 0.01 or even 0.1 and see what > happens. When the problem is corrected say between 0.001 and 0.01, > split the difference and try 0.05. If that worked split the > difference again. You will eventually get to a point where one delay > works and just a bit faster fails. Using the number that works > increase the delay a little, I usually use 10% slower. This gives you > a little insurance. > > Mike 0.001 sec or 1/1000 or One One-Thousands of a second 0.01 sec or 1/100 or One One-Hundreds of a second 0.1 sec or 1/10 or One One-Tenth of a second The theory is "Find a value that does not work." "Find a value that does work." Then pick a value 1/2 way between the two. Does it work? Keep on dividing and testing until you get to a value, say 0.123, that works. A value of 0.122 on occasion fails. Add 10% to it. 0.135 sec = 0.123 + 0.012 or 135/1000 or delay_ms(135); //This seems to be a huge amount to me! It is better to be slow and correct than fast and wrong. Ten per cent is old engineering guess-work. Mike
2005-02-20 by Grzegorz Bywalec
Hi!
I tray to use Tiny12 but I have problem with crystal
oscilator or with ponyprog(2000). I set fuses as 1101
(CKSEL3...0) but tiny still work with internal RC
oscilator. Where may be a problem?
Thanks for any help! Have a nice day!
Grzesiek
__________________________________
Do you Yahoo!?
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_2502005-02-21 by Valerij Avrealij
Thanks to all for quick help. I'll try find my optimal delay. > 0.001 sec or 1/1000 or One One-Thousands of a second > 0.01 sec or 1/100 or One One-Hundreds of a second > 0.1 sec or 1/10 or One One-Tenth of a second > The theory is > "Find a value that does not work." > "Find a value that does work." > Then pick a value 1/2 way between the two. Does it work? > Keep on dividing and testing until you get to a value, say 0.123, > that works. A value of 0.122 on occasion fails. Add 10% to it. > 0.135 sec = 0.123 + 0.012 or 135/1000 or > delay_ms(135); //This seems to be a huge amount to me! > It is better to be slow and correct than fast and wrong. > Ten per cent is old engineering guess-work. > Mike -- Valerij Avrealij