
Originally Posted by
lilimike
I tried your code and I feel like I am getting closer but...
first the delay was over 1 minute ... Not sure if it is because I am using the internal oscilator ...
OK, not a problem. You didn't specify an OSC earlier so I chose 20mhz.
Let's go with 8Mhz internal.
Change the OSC define and add this line ...
Code:
DEFINE OSC 8
OSCCON = %01110001 ; 8Mhz Internal
And change TMR0 = 100 to ...
Code:
<font color="#000000"> <b>TMR0 </b>= <font color="#800000"><b>193 </b></font><font color="#0000FF"><b><i>; load timer for 1ms</i></b></font>
And put DelayTime back to 10000.
The values for different OSC and Timer reload periods can be found easily with ...
PicMultiCalc - (Timer Helper)
http://www.picbasic.co.uk/forum/atta...7&d=1225550328
My example was trying to show how to deal with 6 different timers without needing 6 Timers.
I'm affraid the "Instead of"'s will be your job. 
<br>
Bookmarks