Hmmm,
although I said the penny had dropped, I don't seem to be able to make the code work where you said to put it:
Code:
</i></font>StartTimer:
<b>IF </b>OSC = 48 <b>THEN </b><font color="#000080"><i>; IF OSCILLATOR IS 48MHz THEN
</i></font>@ BSF T1CON,T1CKPS0, 0 <font color="#000080"><i>; SET PRESCALE VALUE TO 2
</i></font><b>ENDIF
</b>T1CON.1 = 0 <font color="#000080"><i>; (TMR1CS) Select FOSC/4 Clock Source
</i></font>T1CON.3 = 0 <font color="#000080"><i>; (T1OSCEN) Disable External Oscillator
</i></font>T1CON.0 = 1 <font color="#000080"><i>; (TMR1ON) Start TIMER1
</i></font><b>RETURN</b>
Now when I compile my program, it comes up with the error: Bad expression or missing THEN. (Elapsed_INT-18.bas)
Is this because the oscillator has been defined in my program and not in the Elapsed_INT-18? I've had problems similar to this before when I've tried to create simple modules like you do (not saying that yours are simple I mean my ones!). I like that style of programming I just can't seem to make it work.
Thanks for any help.
Rob
P.s. I looked up your thread "Show us your colours"... I like it!
Bookmarks