Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Tools
Old 16th April 2008, 07:06 AM   #1
Default Can i use the TIMER1 for timer ckt

hello friends ,
my project is timer ckt for fan control.
can i use the TIMER1 form the PIC16F72. 20th may is the deadline for the project ...........after 10 min ckt generate some signal to operate the relay..
Plz help me ........
__________________
hm:
sachin.kolkar is offline  
Old 16th April 2008, 07:22 AM   #2
Default

20 minutes you say or was that 30 - 10 of may? Seriously, the use of TIMER1 cannot be the hold up of the project.

Set the timer to its max number of cycles. Compute or better yet measure with an o-scope the length of this max_cycle. Then take 60 seconds / max_cycle * cycle_time. This returns your 1-minute BASE. Now every time the timer interrupt is triggered, the BASE, which may be two 8-bit variables, is decremented by 1. Over time the BASE will reach 0 afterwhich you proceed to decrement another variable called MINUTES but only after your reset your BASE variables. Finally after the MINUTES variable decrements down to 0, branch, call, or vector to a routine to generate the famed elusive relay operating signals.

But... of course the real work is in the setup. Gota set global interrupts, gota set timer1 interrupt, gota clear timer1 flag before all this, gota load the timer, and gota turn on the timer, and gota setup an interrupt vector address, gota clear timer flag again while in the interrupt....

Last edited by donniedj; 16th April 2008 at 07:28 AM.
donniedj is offline  
Reply

Tags
ckt, timer, timer1

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
Driving a servo motor- Timer0, Timer1 Wingmax Robotics Chat 0 1st December 2007 08:44 AM
Timer1 not interrupting (16F876) ChriX Micro Controllers 8 9th December 2005 10:16 AM
PIC 16F877 Timer1 spurnymart Micro Controllers 6 13th November 2004 03:04 PM
PIC timer0 / timer1 for SONAR application zenoneder Micro Controllers 0 17th February 2004 09:10 PM
regarding Timer1 module in PIC16F877... foosm Micro Controllers 2 17th August 2003 03:02 AM



All times are GMT. The time now is 05:49 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker