Richard R. Pope wrote 2014-07-21 06:48: > Allen, > Do I do the reset in main() just before I call the delay routine or > should I reset the timer inside the delay routine just before I execute > the for loop. Doesn't realy matter. It gives a tiny timing difference. > Yes, you can leave any number of the required elements out > of a for loop and C will figure it for you. But I trying to figure out > how to use the interrupt routine. Again, if you have setup the rellevant registers and bits, it is used by the interrupt hardware in the processor automaticly. You never makes any direct call to the ISR from your code. Jan-Erik. > Thanks, > rich! > > On 7/20/2014 12:16 PM, Allen Mulvey wrote: >> Richard, >> >> I think you are getting there but there are a few details you missed. >> >> I've never seen a for loop used like this but it looks like it should wo= rk. >> I would reset count and use a while loop to wait for the incrementing. >> >> What you missed is that resetting count is only part of the reset. This = is >> the 10ths of a second. Meanwhile you don't know where the clock is and w= ill >> > --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .