I want C code as example of how I can set a timer (ie. 5 minutes, 1hour ..etc) using pic18f452 with clock frequency 8MHz.
for example if the time pass (5 minutes, 1hour) a led connected with PIC will turn on forever till another condition happen make it off.
another question
Time= (4x clock period ) x Prescaler x (256 - TMR0L)
what is the difference between prescaler 8 , 1, 32.. etc ? what these numbers mean ? what are the affect they made _________________ MKA
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
Posted: Mon May 07, 2012 6:21 am
You should really read the datasheet for your PIC. The Timer section of the datasheet will tell you about the prescaler and give you an idea how your program should work. _________________ The search for better is endless. Instead simply find very good and get the job done.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum