EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Topics / help to programing 8051 timer

help to programing 8051 timer

|

Microcontroller › 8051 › help to programing 8051 timer

  • This topic has 1 reply, 2 voices, and was last updated 13 years, 1 month ago by AJISH ALFRED.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • May 30, 2012 at 3:38 pm #1825
    Diogo ALbano silva
    Participant

    Hi !! i just want to know how do you do,to load thx e tlx with a number to create an delay. If i want to make a 20ms of delay how can i have the number for THX and TLX???

    May 30, 2012 at 5:12 pm #7941
    AJISH ALFRED
    Participant

     

    Your timer module get a clock for every 4(I guess) cloks from the crystal oscillator.

    And you know the time period of the crystal you are using. Just divide that time period with 4 to get the time period of clock which goes to the timer module.

    Now as you need 20ms time period, just calculate how many clocks you need. Set the register values in such a way that it will overflow and generate an interrupt after that much clocks.

    Learn the datasheet for more clear and detailed information. 

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • How to make string LEDs? July 11, 2025
  • PIC KIT 3 not able to program dsPIC July 11, 2025
  • Display TFT ST7789 (OshonSoft Basic). July 10, 2025
  • Remote Control By Location Part 2 July 10, 2025
  • Raise your hand if your car had one of these: July 10, 2025

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise