The microsecond delay in organ.c doesn't work for me using avr-gcc 4.8.1.
for (i = 0; i < period; i++) {
_delay_us(1);
}
The delay is much longer than expected (~7*period). I can get the code to work using _delay_loop_2(), but it's sparked my curiosity trying to figure out what's going on.
In case anybody else is also curious, I started a thread on AVRFreaks to discuss a code fragment that demonstrates the problem.
The microsecond delay in organ.c doesn't work for me using avr-gcc 4.8.1.
The delay is much longer than expected (~7*period). I can get the code to work using _delay_loop_2(), but it's sparked my curiosity trying to figure out what's going on.
In case anybody else is also curious, I started a thread on AVRFreaks to discuss a code fragment that demonstrates the problem.