Thanks [dimax](https://arduino.ru/forum/proekty/generator-s-reguliruemoei-chastotoi-na-arduino) for the idea and code. Just made some changes like starting frequency.