Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

AT89S52 Microcontroller timer

Status
Not open for further replies.

Ogu Reginald

Full Member level 6
Joined
Oct 7, 2011
Messages
369
Helped
47
Reputation
94
Reaction score
46
Trophy points
1,308
Location
Nigeria
Activity points
3,391
I am using AT89S52 microcontroller in my project.
I want to recieve signal through port1 pin0 and my first load is connected at port1 pin1 while my second load is connected to port1 pin2.
I want the first load load to come on immediately a logic 1 is recieved at port1 pin0 and after five minutes it should be off and the second load is switched on and off after ten minutes.
Please can anyone help me with a c code that will work for the above design specification.
My main problem is how to call up the time and set it to the desired time.
 

Using timer interrupt. When P1.0 is high then call start 5 minute timer once. Timer runs for 5 minutes timer will be off and the second load whill be high and 10 minutes timer is started once and after 10 minutes second load is switched OFF. First write the Timer initialization and timer interrupt code.
 

To start the timer is problem to me and also to designate the time duration for the on and off is another problem.
Please I want an example on how to start the time and how to set the duration and also on how to turn off the timer.
Please remember that the code should be on c language.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top