On Sun, 7 Mar 2004, Nicholas wrote: > I have written my main program with PIC-C already. Are we able to write ASM > code in C source code? Can they be complier togather as .c file? > I don't have any idea how to start writng the timer sub routine. You don't need to write it in assembly language, and you don't need to write a subroutine. All you need for a periodic interrupt is to configure T2CON, PR2, and enable the TMR2 interrupt. The datasheet explains these registers. -- John W. Temples, III -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads