I have rich experience in ATmega series controllers in C, C++, Assembler
Regarding this project
- you need to simulate a candle i.e to flash LED in random manner
so for two LEDs two PWM signal can be used which leaves only two available
so intensity input have to use ADC only
since this controller doesn't have random generate we have to implement it using a table which can create an effect flickering candle by controlling the LED
but this controllers lack memory or working registers (16 only) so normal program not gonna cut it, but this can be only solved by implementing inline assembler occasionally
I know you specifically mentioned not to use Assembler but i develop it so it wont visible to external world just use like C functions like setLED1on(), setFlickerRate(), functions will assembler which you dont have to maintain because this piece code always work without error
Contact me for more info