> -----Original Message----- > From: piclist-bounces@mit.edu > [mailto:piclist-bounces@mit.edu] On Behalf Of John Nall > Sent: Monday, February 06, 2006 7:25 AM > To: Microcontroller discussion list - Public. > Subject: [PIC] A question for the dsPIC experts amongst us . . . > > > With regard to comparing the use of Timer0 on the 18Fxxx to > using Timer1 on the 30Fxxx. > > But one could check for PR1 going to zero, true? It stops > when it hits zero? Does not go negative or any silly thing > like that? I am not a dsPIC expert but I just read a bit the manual. I do not think PR1 will change once you load a literal value into it. PR1 is the Period Register. TMR1 is the Timer 1 register and it will count up in timer mode with a rate depending on the pre-scaler. >From the manual: "The 16-bit timer has the ability to generate an interrupt on period match. When the timer count matches the period register, the T1IF bit is asserted and an interrupt will be generated, if enabled. The T1IF bit must be cleared in software. The timer interrupt flag T1IF is located in the IFS0 control register in the Interrupt Controller." Regards, Xiaofan -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist