BTW, I have given this link before, and forgot to mention this. Not this time. Credit for the idea behind this and original code for this excellent timer code goes to Bob Ammerman. Sorry Bob, almost forgot to mention that again ;) Rgs Ian > -----Original Message----- > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Ian McLean > Sent: Monday, 8 March 2004 12:47 am > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [PIC]:How to write timer function for PIC18F452? > > > Nicholas, > > BTW, The link I gave you gives code for 16F series, but > should work with > little/no modification on 18F. You can include asm blocks in > your C code. > Check your C compiler doco. Or write as a separate module and use the > linker. > > Rgs > Ian > > > -----Original Message----- > > From: pic microcontroller discussion list > > [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Nicholas > > Sent: Monday, 8 March 2004 12:23 am > > To: PICLIST@MITVMA.MIT.EDU > > Subject: Re: [PIC]:How to write timer function for PIC18F452? > > > > > > 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. > > > > > > ----- Original Message ----- > > From: "Jan-Erik Soderholm" > > To: > > Sent: Sunday, March 07, 2004 11:58 AM > > Subject: Re: [PIC]:How to write timer function for PIC18F452? > > > > > > > Nicholas wrote : > > > > > > > Is it called timer sub-routine in C language? It is a > > > > sub-routine in the C-lauguage. I don't know how to > > > > write in C language. > > > > > > What about "Chapter 5. Sample Application" in the > > > "MPLAB. C18 C COMPILER USER S GUIDE" ?? > > > > > > And have you thought of just writing a short ASM > > > code to do this ? > > > > > > Jan-Erik. > > > > > > -- > > > http://www.piclist.com hint: PICList Posts must start with > > ONE topic: > > > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other > > [BUY]:,[AD]: ->Ads > > > > > > > -- > > http://www.piclist.com hint: PICList Posts must start with > ONE topic: > > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other > [BUY]:,[AD]: ->Ads > > -- > http://www.piclist.com hint: PICList Posts must start with ONE topic: > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads