Book Your slot
X
ONLINE BOOKING
BOOK NOW
OFFLINE BOOKING
Call or WhatsApp 7993732682 (WhatsApp Now), 9177341827 (WhatsApp Now)
search
Menu Login home
  • Questions

  • Library

  • University Updates

  • Informatives

  • Technology Lines

  • Training & Internships

  • X
    Menu
  • Home
  • Privacy Policy
  • Legal Disclaimer
  • Terms & Conditions
  • Return Policy
  • About Us
  • Need any help?? write to us at

    support@engineershub.co

    Follow Us

    X
    LOGIN
    Login to access posts, links, updates, question papers, materials, one liners!
    Use Your Email Address/Mobile and Password to Login
    Forgot Password?
    Not a member? Sign Up
    LOGIN WITH EMAIL/MOBILE
    Forgot Password?
    Go Back
    FORGOT PASSWORD
    Go Back
    RESET PASSWORD
    Go Back
    Continue with LinkedIn
    OR
    Fill Up a Simple Form
    Already a Member? Login
    SIGN UP
    Fill all the below details correctly and click on Next
    Go Back
    Explain the programming steps of the counter and timer in 8051 micro controller ? - EngineersHub
    Go Back
    Question
    Pisini Yagna Venkata Bhanu Pradeep
    4 years ago
    1 Answer(s) posted Write an answer 6854
    Answer
    Read Mode
    Answer posted by Manish Matta
    4 years ago

    PROGRAMMING  STEPS OF THE COUNTER AND TIMER OF THE 8051 MICRO CONTROLLER :

    1. Load the TMOD register indicating which timer is used and which MOD is to be selected.

    2.               Load TL & TH with initial count values.

    3.               Start the timer.

    4.               Keep monitoring the TF flag come out of the loop when TF = 1.

    5.               Stop the timer.

    6.               Clear the TF flag to continue the next counting.

    7.               Again reload TH & TL.

    EXAMPLE PROGRAM:

             MOV TMOD,#o1H

    BACK: MOV TL0,#F2

              MOV TH0,#FFH

        CPL P1.0

        LCALL DELAY

       SJMP BACK

    DELAY: SETB TR0

    AGAIN: JNB TF0,AGAIN

    CLR TRO

    CLR TFO

    RET

    Users Joined

    mahek thakur
    8 months ago
    sowmya
    8 months ago
    biraja
    9 months ago
    Diana R
    9 months ago
    P Annapoorani
    9 months ago
    X
    Explain the programming steps of the counter and timer in 8051 micro controller ?
    X
    Explain the programming steps of the counter and timer in 8051 micro controller ?

    PROGRAMMING  STEPS OF THE COUNTER AND TIMER OF THE 8051 MICRO CONTROLLER :

    1. Load the TMOD register indicating which timer is used and which MOD is to be selected.

    2.               Load TL & TH with initial count values.

    3.               Start the timer.

    4.               Keep monitoring the TF flag come out of the loop when TF = 1.

    5.               Stop the timer.

    6.               Clear the TF flag to continue the next counting.

    7.               Again reload TH & TL.

    EXAMPLE PROGRAM:

             MOV TMOD,#o1H

    BACK: MOV TL0,#F2

              MOV TH0,#FFH

        CPL P1.0

        LCALL DELAY

       SJMP BACK

    DELAY: SETB TR0

    AGAIN: JNB TF0,AGAIN

    CLR TRO

    CLR TFO

    RET

    EngineersHub Logo
    x
    Loading...