Hi
I have this circuit and it works great
This scheme on Proteus 8
The circuit are feed back from the Transformer
The transformer output coil is 400V and the tension is set to 220V by the variable resistance 100K
My experience is poor in programming the microcontrollers and I want your experiences in the programming code
On the other hand, if you want someone to write code for you please ask the moderators to move this to gigs and collaborations, the folk there take paid commission.