Hey Avionics.
I remember your post i did reply also... Anyway. For starters ill try to help as i can :P
1. Define osc 8 is enough trust me, osccon = %01110110 is not needed 
2. Put your Interrupt routine ALWAYS on top because it is best for pic to write it in it's first pages of memory to acces it faster.
Go like --> Includes then--> Defines then--> Registers( like ansel, cmcon0,intcon etc...) then--> Goto mainroutine and after that Put your Interrupt routine (SLOOP) and then--> put the ON interrupt goto sloop and continue with your main routine and after the main use your SUBroutines. This is the build i use and it's a nice way to keep your programms clean and easy to read.
3. An interrupt routine MUST be look like this because it wont work.
This is the build i explained above and what i always use.
Code:
goto Initialization
'-------------------------------------------------------------------------------
'ISR ISR ISR ISR ISR ISR ISR ISR ISR ISR ISR ISR ISR
'-------------------------------------------------------------------------------
ISR:
disable
. here are your commands
. here are your commands
. here are your commands
. here are your commands
return
enable
on interrupt goto ISR
'-------------------------------------------------------------------------------
' Initialization Initialization Initialization Initialization
'-------------------------------------------------------------------------------
Init:
. here are your commands
. here are your commands
. here are your commands
. here are your commands
. here are your commands
'-------------------------------------------------------------------------------
' Main Programm Main Programm Main Programm Main Programm Main Programm
'-------------------------------------------------------------------------------
Main:
. here are your commands
. here are your commands
. here are your commands
. here are your commands
And a last tip that will help you with ALL PIC and ALL Timers.Check this out Timer Calculator
Let me know if this work !!!
Regards, Kostas.
Bookmarks