Content originally posted in LPCWare by fjrg76 on Mon Nov 26 10:06:50 MST 2012
Quote: ElectroNerd
This is the simplest way to create delay - by burning clock cycles. The only problem is that while the CPU is busy, you wouldn't be able to service interrupts if they are triggered.
This is a software delay, so:
- As long as the interrupt system is enabled, all the enabled interrupts will be serviced. Nonetheless, your app will be stuck in the delay() funtion 'til the desired time elapses.
- You cannot guarantee exact timing for the delays 'cause the interrupts' overhead and optimization level will affect them.