Why do you need there also an Atmega...this is another story and something that I really don't understand exactly. I must admit that I find this kind of setups quite funny, where the Application MCU is about 50-100 times slower/less resources than the peripheral/communicaton one
Available on Tindie: https://www.tindie.com/products/nEXT_EVO1/universal-ac-mains-dimmer-mpdmv41/