I was thinking about the article. If I want to make for example 1khz sound, the full sinus period is 1s/1000=1ms
The counter counts down, and then flips the output, but flipping is not a fully period, only a half.
So if I want to make 1kHz sound, I make the following:
Set the counter: (1ms/4us)/2=125
Because it is a square-wave, in this case the base harmonic is a 1kHz signal, but the 1th 2th and ... so on harmonics are :
-3kHz
-5kHz
-8kHz
.. and so on
The higher the frequency of the harmonics are, the smaller the ampltude.
It is possible, with some 2. oder low-pass or high-pass filter to filter-out the not necessarly harmonics, so you can have clearer sinus signal.