I am using the parallel port’s IRQ line to measure pulses from a PWM. I have written a small piece of code that will register when a pulse is received (i.e. in the ISR registered for the parallel port’s IRQ, number 7 I believe). However, it seems I can only read one pulse, and then it stops. If I read the status port, I am then able to read as many pulses as I’d like. Here is a snippet of the code:
for( count=0; count<MAX_COUNT; count++)
InterruptWait( 0, NULL );
clock_cycles[count] = ClockCycles();
in8( stat_handle );
InterruptUnmask( PARALLEL_IRQ, intr_id );
When I remove the “in8(stat_handle)”, it no longer records more than one pulse. Anyone know why???