Volatile Delays
You want to write a simple delay loop on your embedded microcontroller. Let’s say you’re waiting for the crystal oscillator to stabilise before you use it. static void delay( int loops ) { while(loops–) ; } You’re then very surprised to find that this takes a total time of 0ms when you call it. You… Read More »