Hi all, I ran into problems trying to simulate tmr0 as a counter in MPLAB. I want to count pulses on RA4/T0CKI [low kHz]. The problem is that the counter register tmr0 is incremented every instruction cycle when input signal (RA4) is high and is stopped when the input is low. I expect "counting input signal edges" rather than enabling internal fosc/4 as a pulse source. The timer is configured as follows: banksel OPTION_REG movlw b'11110000' ; prescaler=1:1 assigned to timer0 movwf OPTION_REG ; source: T0CKI/RA4, inc on hi->low banksel TMR0 clrf TMR0 To simulate the above I am using Pin Asynchronous Stimulus. I defined the following two pin stimuli: the first RA4=high, the second RA4=low Simply: I don't get it! Is there any known issue in MPLAB or I don't understand how tmr0 or pin stimulus should work? I appreciate any feedback Ira -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu