Wan Zulhelmi Wan Ahmad Kamar wrote: > What i meant by exact time means that for example > i want 5ms of delay, > how would i make sure my loop will only delay exactly for 5 ms and no > more or less than that. 5mS is a "long" time for a PIC, which probably makes a software delay routine inappropriate. Use a timer to set up a periodic 1mS interrupt, for example, then base everything off of that. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com _______________________________________________ http://www.piclist.com View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist