Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > Electronic Projects Design/Ideas/Reviews


Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution.

Reply
 
LinkBack Thread Tools Display Modes
Old 5th June 2004, 09:26 PM   (permalink)
Default on & off dellay timer 1to300 sec

hi every one
am looking for the simplest way to make tow type of timers (on dellay and off dellay) using pic
can any one help me
thank you
eng-bm is offline  
Old 6th June 2004, 08:00 AM   (permalink)
Default Re: on & off dellay timer 1to300 sec

Quote:
Originally Posted by eng-bm
hi every one
am looking for the simplest way to make tow type of timers (on dellay and off dellay) using pic
can any one help me
thank you
It's very easy really, the simplest way is probably just software loops. If you check my tutorials you will see that many of them use delay routines, based on a 1mS delay - then called by a loop to give up to 255mS. If you set that loop at 250mS, and call it 4 times, that gives you a 1 second delay. Or you could use the delay generator on the PICList to generate code for a one second delay.

Then simply call the one second delay as many times as you need to give your required delay, using a single loop counter will give you a maximum of 255 seconds, by using two loop counters this increases to 65,535 seconds.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 6th June 2004, 02:43 PM   (permalink)
Default

i want to control the time by a linear variable resistor
eng-bm is offline  
Old 6th June 2004, 08:54 PM   (permalink)
Default

Quote:
Originally Posted by eng-bm
i want to control the time by a linear variable resistor
Easy! - simply read the pot and adjust the time delay accordingly, you can either read the pot with an A2D or capacitor charging method. Both are covered in my tutorials!.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 7th June 2004, 01:27 PM   (permalink)
Default

thank u mr.nigel, but could u make me a favore and send me a practical circut with a working program for it
eng-bm is offline  
Old 7th June 2004, 02:09 PM   (permalink)
Default

Quote:
Originally Posted by eng-bm
thank u mr.nigel, but could u make me a favore and send me a practical circut with a working program for it
Sorry, I don't have much time available for designing circuits and writing software for people, if I manage to find time I'll do it for you.

But everything you need is in the tutorials, I would suggest you get a PIC and have a play.

For a nice simple timer, here's a (very) simple way to write the program:

1: Read A2D to get pot position.
2: Display pot value (optional).
3: Check if start button pressed.
4: Button not pressed, goto 1:
5: Delay 'pot value' number of seconds.
6: Do what ever you need to at the end of the timed period, turn an LED on, switch a relay - anything you want.
7: Goto back to 1:

Hardware wise I would suggest something like a 16F818/9 or 16F876, an LCD display (to show what the time is set to, and you could make the display count down as well), a Start button, probably a Stop button, and some output device - an LED would do for testing.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 08:37 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

eXTReMe Tracker