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.

The time to run a loop in the microcontroller

Status
Not open for further replies.

grassflying

Newbie level 5
Joined
Apr 21, 2007
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,334
I am programming a delay function using ARM7. I simply use a while loop to waste the time. Which clock speed determines the time to run a loop in the microcontroller? Thanks!
 

its the system clock determines duration, for accurate delays use timer interrupt and put your mcu in halt mode or execute other routine
 
Yes,
Interrupts are better since you can perform other operation while waiting. It is also permit to reduce the power consumed while doing nothing.
 
Hi,
You can also write this delay in assambler. There you have exact timings (you should find how much cycles takes execution of each command in the documantation).
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top