I have experienced a problem with the prescaler on a 16C84-04. It seems to work as expected except when the ratio is set to 1:2. In this case I get an actual ratio of 1:4. I have assigned the prescaler to TMR0 in the OPTION register as per the recommended code sequence in the data book (since the power up assignment is to the watchdog). The code I used is included below - it just sets up the timer and then outputs a pulse on bit 0 of port B on every interrupt (from TMR0). With a 2MHz Xtal clock I get pulses spacings as follows: prescaler setting interrupt rate (pulse spacing) ----------------- ------------------------------ 000 2msecs (should be 1msec) 001 2msecs 010 4msecs 011 8msecs 100 16msecs without the prescaler there should be a TMR0 interrupt every 0.5 msec (i.e. 256 times instruction period of 500nsec) The watchdog is disabled in the config word and the osc is set to XS. Main program - Initialisation and wait loop ************************************************************** MAIN CLRWDT BSF STATUS,RP0 MOVLW B'11000100' ;Prescaler set to 100 MOVWF OPTREG^80H ;SET TMR0 increment on clock BCF STATUS,RP0 ;SELECT REGISTER BANK 0 CLRF PORTB BSF STATUS,RP0 ;SELECT REGISTER BANK 1 CLRF TRISB^80H ;SET PORTB TO ALL OUTPUTS BCF STATUS,RP0 ;SELECT REGISTER BANK 0 MOVLW B'10100000' MOVWF INTCON ;SET GIE and T0IE ;wait for TMR0 interrupts LOOP NOP GOTO LOOP *********************************************************** Interrupt routine *********************************************************** INT_RTN BSF PORTB, BIT ;SET SELECTED BIT TO 1 BCF INTCON, T0IE ;clear timer flags BCF INTCON, T0IF ; BSF INTCON, T0IE ; NOP ;just some time padding NOP ; NOP ; NOP ; NOP ; NOP ; SETLO BCF PORTB, BIT ;SET SELECTED BIT TO 1 RETFI **************************************************************** I also see a similar effect if I try to get a ratio of 1:1 by assigning the prescaler to the Watchdog Timer as per the data book using the options reg. I would wlecome any comments from anybody as I feel I must be doing something wrong somewhere - but I cannot see what or where. I hope my asking this type of question falls within the acceptable use of this mailing list - I am new to the list and to PICS. -- regards martyn fletcher martyn@fletcher.demon.co.uk