DDS - 3phase signals 120 degrees out of phase

If we're looking for ways to save time, I'll suggest declaring ISR_exec_time and program_exec_time as const. It's surprising how many cycles it takes to do a cbi() or sbi() with a variable bit number. With a const bit number, those collapse to single-byte cbi and sbi instructions.

I think there could be additional improvement - but maybe not much - from declaring current_count to be local to the ISR. It's not used outside the ISR. It's volatile, so it has to be read or stored each time it's used; if it was a local variable, it might just stay in regsiters, and never make it to memory at all.