//* Executing Some Code Every-so-many Interrupts *

#define slowdown_factor (Timer_interrupt_Hz / Desired_frequency_Hz) static uint16_t slowdown_counter = slowdown_factor; --slowdown_counter; if ( 0 == slowdown_counter ) { slowdown_counter = slowdown_factor; .. insert your functionality here or call a function .. } .. reminder of the interrupt service routine .. // OR static uint16_t slowdown_counter = 0; ++slowdown_counter; if ( slowdown_factor == slowdown_counter ) { slowdown_counter = slowdown_factor; .. insert your functionality here or call a function .. } .. reminder of the interrupt service routine ..