> 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. -- 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