>Where does the 100 msec come from ?

It comes from the formula ...
1/(OSC * 1000000 / 4 / Prescaler / 65536)
1/(40 * 1000000 / 4 / 8 / 65536) = 0.0524 Sec. = 52.4 mS
Times 2 for a full cycle = 104.8 mS

>How could I set different periods ?

If the frequency is fixed, use the Timer Template ...
http://darreltaylor.com/DT_INTS-14/TimerTemplate.html