Change the Sine wave frequency

FWIW, ARM Cortex-M3 has a 2-cycle hardware divide instruction for unsigned 32 bit integers. The compiler is pretty crafty about using divide then subtract to quickly compute integer modulus. There's little speed benefit to redesigning for a power-of-2 division or modulus.

On 8 bit AVR, integer division is a terribly slow operation, involving a function call to code which loops 32 times, shifting and subtracting (a.k.a. "long division"). When Arduino Zero becomes available, the same will be true, because the Cortex-M0+ lacks hardware divide.

Only the M3 & M4 versions have the fast integer divide instruction. Arduino Due is based on the Cortex-M3.