This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

heh guys, wonder if anyone can help me answer some doubts on timer2 of 8051 n real time clock???

First, TIMER2, can i reset timer2 of 8051??? from wat i know, timer2 jus keep on running right? so is it POSSIBLE to write a program(in C) to reset timer2???

Secondly, FOR EXAMPLE, using a real time clock. Lets say that i haf a FAN connected to a device wif a real time clock. i set the time to 8am then i want it to stop at 9am. Do u guys know how to write a program in which i have describe above in C (8051).
thanks alot...

Parents
  • "so is it POSSIBLE to write a program(in C) to reset timer2???"

    Yes.

    "Do u guys know how to write a program in which i have describe above in C (8051)."

    Sure. Here it is:

    void main(void)
    {
    TIMER2=8am;
    FAN=on;
    while(TIMER2<9am);
    FAN=off;
    while(1);
    }

    I'll leave you to flesh out the details.

    Stefan

Reply
  • "so is it POSSIBLE to write a program(in C) to reset timer2???"

    Yes.

    "Do u guys know how to write a program in which i have describe above in C (8051)."

    Sure. Here it is:

    void main(void)
    {
    TIMER2=8am;
    FAN=on;
    while(TIMER2<9am);
    FAN=off;
    while(1);
    }

    I'll leave you to flesh out the details.

    Stefan

Children