Help with writing to registers for 1Hz pwm and timer interrupt

If yours is a typical residential mains circuit in an advanced country, it is highly unlikely that the frequency will vary by that much.