Eric Smith wrote: > > Wow, you're reading my mind, or more likely my web page. That's exactly > how my closed caption decoder works. No, Eric I haven't read either. However, I'll take a look at your web page. Andrew Warren wrote: > Check out my web page for a method with 1.25-cycle resolution... It's > answer #41, in the "PIC16/17 Answers" section. Just looked at it. It appears to have single cycle resolution for 8 samples. After I posted the initial message, I thought of a solution almost identical to your answer #41 that was good for 15 samples. First your code segment from answer 41: SETUP MOVLW 00000001B ;MAKE B0 AN INPUT, B1-B7 OUTPUTS. TRIS PORTB ; SAMPLE RLF PORTB ;SHIFT 7 CONSECUTIVE SAMPLES OF RLF PORTB ;B0 INTO B7-B1. RLF PORTB ; RLF PORTB ; RLF PORTB ; RLF PORTB ; RLF PORTB ; MOVF PORTB,W ;W-REG CONTAINS LAST 8 SAMPLES ;(MSB = EARLIEST, LSB = LATEST). Followed by: RLF PORTB ;SHIFT NEXT 7 CONSECUTIVE SAMPLES OF RLF PORTB ;B0 INTO B7-B1. RLF PORTB ; RLF PORTB ; RLF PORTB ; RLF PORTB ; RLF PORTB ; At the end, W contains the first 8 samples and B7-B1 contain the last 7 samples. You can carry this concept a little bit farther if you wish to sacrifice ALL I/O ports for this problem. For example, suppose you had a 40 pin part like the C64, C65, etc. The input signal in addition to being tied to Port B <0> can also be routed to Port A <0>, Port C <0>, Port D <0>, and Port E <0>. This would give you an extra 5 + 7 + 7 + 2 = 21 samples for total of 36 samples. Any more Ideas? Scott