Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Maximum delay can be implemented by timers

Status
Not open for further replies.

Greital

New Member
hi,

I'm kinda new to 8051 and have a problems with it :(

Q: assuming 8051 is connected to a 6Mhz crystal, what is the maximum delay that can be implemented by a single timer using mode 1 ?

what I've tried is the following:
1. finding the freq = 6/12 Mhz
2. finding the cycle of time = 1/freq
3. delay = number of counts X cycle of time ----> here I stuck :banghead: how to find the number of counts ??? :nailbiting:

I'm not sure if what I'm doing is right or wrong :(

so please :angelic: help me out with this :(
 
Using a 12Mhz crystal you will get 1uS per tick cycle....

The timer can be set to 4 modes..... 16 bit timer... 8 bit timer with pre-scaler.. 8 bit with re-load or just 8 bit timer..

8 bit with prescaler is pretty much the same as 16 bit but a bit more control..

a 16 bit timer will run for 65535 ticks or 65535 * 1uS.... That give a total 65.535mS for a complete count.If you use a 6Mhz you can double that to 131mS..

I have done a bit of an article HERE!!.. It shows interrupts using the timer!!
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top