RefreshNotes
Read Short Notes & Refresh Your Memory
Search This Blog
Home 8051
Search
Saturday, April 30, 2016
Categories
8051 Timer Delay Calculation Embedded System
Microcomputer
While designing delay programs in 8051, calculating the initial value that has 8051
to be loaded in to TH and TL registers forms a very important thing. Let us
C Programming
see how it is done.
Maths
Assume the processor is clocked by a 12MHz crystal. Tamil
That means, the timer clock input will be 12MHz/12 = 1MHz Website
That means, the time taken for the timer to make one increment =
1/1MHz = 1uS Blog Archive
For a time delay of X s the timer has to make X increments. April (101)
2^16 = 65536 is the maximum number of counts possible for a 16
bit timer. About Me
Let YY be the value that has to be loaded to TH register and XX be Kathireshan Ganesan
the value that has to be loaded to TL register. Follow 32
Then, YYXX = Hexadecimal equivalent of (65536-X) where (65536- View my complete prole
X) is considered in decimal.
Example:
Let the required delay be 1000uS (ie; 1mS).
That means X = 1000
65536 X = 65536 1000 = 64536.
64536 is considered in decimal and converting it t0 hexadecimal gives FC18
That means YYXX = FC18
Therefore TH=FC and TL=18
<< Previous :: Up :: Next >>
Related topics:
8051 Crystal and Baudrate | 8051 Serial Baudrate Calculation | 8051
Serial Port | 8051 Serial Port Programming | 8051 Timer Programming
| 8051 Timers | 8051 Software Development Tools | 8051 Development
Boards and Evaluation Kits | 8051 Features | 8051 History | 8051
Enhanced Version 8052
List of topics: 8051
Posted by Kathireshan Ganesan at 5:51 AM
Labels: 8051
No comments:
Post a Comment
Enter your comment...
Comment as: Jitendra Jha (Google) Sign out
Publish Preview Notify me
Newer Post Older Post
Subscribe to: Post Comments (Atom)
Home Categories About Contact Privacy Policy Terms Of Use Sitemap Archive
2016 - 2017. refreshnotes.com. All Rights Reserved. Simple theme. Theme images by luoman. Powered by Blogger.