I gave the code from the MikroC timer calculator but I thought you were using a 20 MHZ crystal not 4 MHZ. Sorry about confusing things. MikroC apparently uses a different convention for defining an ISR but the timer start values should be correct. I am using those same values in another project myself. Allen > -----Original Message----- > From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf Of > Richard R. Pope > Sent: Wednesday, July 23, 2014 1:58 PM > To: Microcontroller discussion list - Public. > Subject: Re: [Pic] Making a special timer! >=20 > Jan-Erik, > That is why I said that the MikroElektronika Timer Calculator does > not generator the correct code for the XC8 compiler. That is the exact > name for it. It will get you in the ballpark but you have to be aware of > its short comings. Nope, I wouldn't expect them to generate code > specifically for the XC8 compiler. > Someone else recommended that I use this program as a starting > point for the interrupt timer. That is what I did. I don't remember who > but it is useful to a certain point. I just asked it for the numbers for > a 10mS delay and the delay is closer to 80mS. So I will have to do a > little adjusting. > Jan-Erik, you and everyone else have been a huge help. I couldn't > have done this with out you guys. It is greatly appreciated. If I have > offended anyone, please don't take it personally. I know that I can be a > little gruff at times but I don't mean anything by it. > Thanks, > rich! --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .