user32611: Do I Have to Change Internal Interrupt Setups when I Change Clock Speed? The reason I ask is because I am trying to modify this code: 
https://github.com/DccPlusPlus/BaseStation/blob/master/DCCpp_Uno/DCCpp_Uno.ino (Beginning at Line 289)
so that if will work on an ATmega328P-derivative board running at 3.3V and 8 MHz. I need the waveforms to be generated at the same speed, so is there anything I have to change? The original code is written for a 16 MHz uno or mega.

user30761: The equation for timer period is given by the following formula, where N is the value of the prescaler, TOP is the value given by either MAX (i.e. 0xFF, 0xFFFF) or the value in register OCRnx, and f is the frequency of the I/O clock.

If you're using phase-correct or phase- and frequency-correct mode, the factor (TOP+1) in the formula above should be replaced by 2 × TOP.

32611: <p>Do I Have to Change Internal Interrupt Setups when I Change Clock Speed? The reason I ask is because I am trying to modify this code: </p>

<p><a href="https://github.com/DccPlusPlus/BaseStation/blob/master/DCCpp_Uno/DCCpp_Uno.ino" rel="nofollow noreferrer">https://github.com/DccPlusPlus/BaseStation/blob/master/DCCpp_Uno/DCCpp_Uno.ino</a> (Beginning at Line 289)</p>

<p>so that if will work on an ATmega328P-derivative board running at 3.3V and 8 MHz. I need the waveforms to be generated at the same speed, so is there anything I have to change? The original code is written for a 16 MHz uno or mega.</p>
 30761: <p>The equation for timer period is given by the following formula, where <code>N</code> is the value of the prescaler, <code>TOP</code> is the value given by either <code>MAX</code> (i.e. <code>0xFF</code>, <code>0xFFFF</code>) or the value in register <code>OCRnx</code>, and <code>f</code> is the frequency of the I/O clock.</p>

<p><a href="https://i.stack.imgur.com/K07UMm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/K07UMm.png" alt="T = (N × (TOP+1)) ÷ f"></a></p>

<p>If you're using phase-correct or phase- and frequency-correct mode, the factor (<code>TOP</code>+1) in the formula above should be replaced by 2&nbsp;×&nbsp;<code>TOP</code>.</p>
