this might be more an AVR-GCC related question, but here goes anyway:
I would like to use NOP instructions for delaying 2 and 4 microseconds (at 8 MHz), since I'd like to control the delay more accurately than with the _delay_xxx functions (macros) in /util/delay.h allow. I am using the latest WinAVR package.
However no matter how I use the NOP in C (one example given in /compat/ina90.h), the compiler refuses to generate the NOP instructions, and thus they are not seen in the .lst file, and thus there is no delay. Fiddling around with optimization flags don't help, although I don't know if removing -O2 is sufficient.
How can I use the NOPs in my C code, or do I have to use the _delay_xxx macros?
Basically this is just a test of doing capacitive proximity sensing using charge transfer bursts like QProx chips do, but in software. I could do it with assembler too just for example, but it is just too easy to use printf to output something to serial port as a debugging measure ;-)
Thanks in advance,