So the internal clock is not incrementing the timer at xtal x 4. Thanks for the solution Dmitriy. I'm trying to generate pulses in bursts of 1-255 spaced evenly over ~900us. The bursts must not be over 100us but can range from say 850 to 950us and must be every 1ms. When the 628 gets its new data it starts tmr1 and every time tmr1 rolls over it decrements the number of loops through the timer in each burst by one, so eventually it will have sent out that number of pulses at the tmr1 load spacing. Then it says via portb to a 18f452 that it wants the next burst data. Hopefully this transfer takes place in the time between the end of the 850-950 burst and 1ms. Every 1ms new pulse spacing is available from a lookup table in the 18f with the number of pulses. This is supposed to control a stepper motor which needs an accurate number of pulses evenly spaced. The count/1ms comes from an encoder read by a HCTL2016 every 1ms. Many thanks, Brian Harris ----- Original Message ----- From: Brian Harris To: piclist@mit.edu Sent: Saturday, April 01, 2006 4:08 PM Subject: [PIC]Timer load not recognized Greetings, I'm using a 16f628's TMR1 At 19.6608 MHz to generate bursts of pulses. With TMR1H staying at 0xff, I've noticed that changing TMR1L from 0xff to 0xfe or 0xfd makes no difference to the loop time between i_val and goto load in this segment. When observed programmed, on a logic analyser or on MPLab's stopwatch, the loop time is the same for 0xff , 0xfe and 0xfd=4.069010us=20IC's It changes at 0xfc--0xfa to 4.37962us=23IC's f9--f7=26IC's, f6--f4=32IC's and 0xac--0xae=101IC's etc etc. I've noticed this in another 16f870 TMR1 circuit too. I'm wondering if anyone knows why it's skipping. In threes by the look of it. It's perplexing because the application needs to be able to use the finer increments to generate evenly spaced bursts over the range of 1-230 pulses/ms. Any insight greatly appreciated. Thanks, Brian Harris load means get new values for cnt and int_ i_val bcf t1con,tmr1on ;stop tmr1 movfw int_h ;load interval between pulses movwf tmr1h movfw int_l movwf tmr1l movlw b'00001001' ;prescaler=1 movwf t1con ;start tmr1 btfss pir1,tmr1if ;wait for Timer1 overflow goto $-1 bcf pir1,tmr1if bsf porta,1 ;output pulse nop nop ;*****timed at 2 nops****** bcf porta,1 ;Count out bursts decfsz cnt,f goto i_val goto load -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist