The (more or less) correct syntax would be something like: Timer1 = OFF; Shadow16bitT1 = TMR1L + TMR1H*256; Timer1 = ON; CCPR1 += Shadow16bitT1; First of all you must switch off timer 1 so you have no byte-rollover within the timer while you read. This period of time should be made as short as possible, so just copy the timer to a shadow register. Add it all up in the end. If you do this instead: Timer1 = OFF; CCPR1 += TMR1L + TMR1H*256; Timer1 = ON; ...the timer will be switched off longer because then you have an extra 16bit addition to perform. If you choose not to switch timer 1 off, you _will_ get occational errors with this method. If you can't switch timer 1 off, you have to test the values you read from the timer to make sure you had no rollover. Something like this: do { L = TMR1L; H = TMR1H; } while (TMR1L < L); // if this is true, lo-byte rolled over, // and the concatenated value will be wrong // if it rolled over before TMR1H were copied. With all this in mind, it's not just to make timer 1 a 16bit variable. The code looks better with it, but works better without it. -DS Tuesday, November 09, 1999, 5:00:23 PM, you wrote: EB> Your syntax is correct. EB> To make TIMER1 you could use: EB> unsigned long (uns16, etc) TIMER1; EB> TIMER1 = TIME1L + TIME1H * 256; EB> Regards, EB> Brusque EB> ----- Original Message ----- EB> From: Roberto Fonseca Iannini EB> To: EB> Sent: Tuesday, November 09, 1999 12:44 PM EB> Subject: 8 + 8bits variable >> What's the c syntax to perform an 16-bit sum like: >> CCPR1 = CCPR1 + TIMER1; >> Note that TIMER1 wasn't defined by the 1687x.inc. Instead it was made as >> TIMER1H and TIME1L (each one 8 bits type). The same is true to CCPR1. >> Summarizing: How can I define or use a new 16 bit variable called >> TIMER1 that is formed by TIMERH and TIMERL (MSB and LSB)? >> (this code is for 16F877) >> See you guys, >> >> Beto. >> No matter how much data you add to your laptop, it will not get heavier.