At 08:03 17.6.1998 +0200, you wrote: >Hello Pavel, >if you have a plenty of time, why not try the following: > >1. Capture rising edge, enter ISR, read timer for LOW >2. Wait here until falling edge >3. Read time for HIGH, reset timer, leave ISR >4. Do what do you want until 1. > >Of course, if your duty cycle nears 100% it may be a bottleneck... Hmm, problem is,that there is a lot of other interrupts, some of them should be as precisely timed as possible. On the processor with normal architecture, like Z80(accessible stack in main memory) is not a problem to write reentrant interrupt service or there are several interrupt vectors. But on PIC it is impossible. And because PWM cycle is relatively slow, I can't afford to be in the interrupt routine so long. But, thank you for help. PavelK ************************************************************************** * Pavel Korensky * * DATOR3 LAN Services spol. s r.o. * * Modranska 1895/17, 143 00, Prague 4, Czech Republic * * * * PGP Key fingerprint: F3 E1 AE BC 34 18 CB A6 CC D0 DA 9E 79 03 41 D4 * * * * SUMMA SCIENTIA - NIHIL SCIRE * **************************************************************************