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.

How can I use one of the 8051 timers to calculate a time delay?

Status
Not open for further replies.

Sherif Welsen

Junior Member level 1
Joined
Feb 3, 2005
Messages
18
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
135
Hi all,

Please provide me with how i can use one of the 8051 timers to calculate a time delay equal 1 second. I'm using XTAL frequncy 11.0592 MHz.

Regards.
 

Re: Time Delay

First question is how precise 1sec you need?

Second question is do you can use 12MHz?

You can made 16Bit timer for 50ms. In interrupt routine of that timer you increment variable, and when you count 20 you have ~1 sec. Here are first question, if you need exactly 1 sec. that means that you have to calculate how many cycles need for going in and going out of interrupr routine, as well as, how many interrupt commands do you have.

If you have 12Mhz xtal one cycle lasts 1us so every calculation is much simpler.

Regards,

Mr.Cube
 

Time Delay

You must read your 51 spec, and find the cycle number run every instruction, then,
your may code your timer programmer, caculate the cycler number, simu the interrupt and get to the i second
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top