yes i know 1 nop takes 1 cycle. at 1 Mhz it is 1 uS. But indeed at 32 Mhz, you need 32 nops. a bit waste of code. the compiler will create different code depending on the clock freq.
in some cases it will use nops, while in other it will create a loop.
if this project must run at 1 mhz, than it will not work with the shown code. but at 8,16 or 32 mhz it should work.
↧