> Bob Ammerman wrote: >> >> Here is the skeleton of a (untested) program to read 8 RC servo inputs at >> once. >> > I did not ask for so much! > I was just starting to think about how to give up on IOC, you fired > faster! > Thanks. It seems a very good code, I didn't find anything wrong. > 64 instructions is worst case (all bits are rising), 48 is best case, so > main > program will have "plenty" of time. Actually, if you count the BTFSx instructions correctly you will see that the interrupt handler is always exactly the same length. For example, given... btfss somereg,somebit movlw 1 Then, if the btfss skips then it takes two cycles, if it doesn't skip it takes 1 cycle and the movlw takes 1 cycle. In either case 2 cycles are used. -- Bob Ammerman RAm Systems -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist