> -----Original Message----- > From: piclist-bounces@mit.edu On Behalf Of Wouter van Ooijen > Sent: Monday, February 08, 2010 1:26 AM > > > I`ve already tried to call them in intervals of 100ms, it > worked, but is it > > the best way to do it? or it is better to call them in the main > loop of the > > code with no time interval? > > AFAIK the 'general wisdom' is that contact bounce lasts no longer than > 50 ms, so that determines the maximum frequency (20 Hz). The minimum > frequency is determined by the feeling of responsiveness. If your 10 Hz > feels OK, by all means stick to that. A great introduction to debouncing is Jack Ganssle's "A Guide to Debouncing". http://www.ganssle.com/debouncing.pdf Paul Hutch > > Wouter van Ooijen > > -- ------------------------------------------- > Van Ooijen Technische Informatica: www.voti.nl > consultancy, development, PICmicro products > docent Hogeschool van Utrecht: www.voti.nl/hvu -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist