Create your countdown timer with a variable which contains the initial value according to your setting of switches or some serial input .