Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/04/08 12:39
Read: times


 
Msg Score: +1
 +1 Good Answer/Helpful
#156400 - First Steps
Responding to: ???'s previous message
I will like to guide you through the first steps of finding out how you may achieve a solution to the delay problem.

Look at the data sheet and/or the reference manual for your MCU and study specifically how the timer section works. For your particular delay question you would likely need to discover the following things about the timer function:

How is the timer clocked?

What are the options for selecting a clocking rate to use?

What initialization steps are necessary to place the timer into an operational state as a time delay mechanism?

As a time delay, how many clock times correspond to a 3 msec delay?

How is a count value loaded into the timer?

How is the timer monitored to see when the count value has changed by the amount that represents 3 msec?

What are the names of the SFRs used to manipulate the timer?

With answers to all of the above you are prepared to devise the necessary algorithm to initialize the timer, arm it to start a 3 msec delay and then monitor it to find when the end of the delay has occurred. It can be helpful, particularly if you are new to working with a timer, to draw out a diagram that depicts the algorithm. This could take the form of a flow chart or timing diagram. Finally it is time to write code that implements the algorithm.

Make an attempt to go through this process and then if you have some additional questions then come back and post again with information about what you have achieved so far. Someone may then be able to answer those questions and guide you forward.

Michael Karas





List of 2 messages in thread
TopicAuthorDate
how to give a delay using timers of AT89C51 in C            01/01/70 00:00      
   First Steps            01/01/70 00:00      

Back to Subject List