Content originally posted in LPCWare by rocketdawg on Wed Feb 12 11:29:46 MST 2014
how long a delay?
very short delays can be done with a string of nop or in a loop.
any long delay should be done with a callback from a timer ISR.
remember, a spin in place delay loop is wasting CPU cycles and is not deterministic since any ISR can change the timing.