I am currently working on this world time clock project and got it working with three alarms and automatic account for daylight saving time in central Europe.
Now I thought it would be nice to have the LCD backlight fade in with a button press and fade out after a small delay when the button is released.
To test I just added
analogWrite(backlight, brightness);
into the setup loop which works fine for the backlight for the LCD but the RTC quits with the error message "RTC stopped".
when I change the above statement again to
digitalWrite(backlight, HIGH);
everything works fine without any hick ups.
This makes me kind of believe that using PWM is interfering with the i2c bus of the RTC. If it does, is there a work around or do I have to just live with out fading the backlight with a button press.
Since I am not even sure if there is a way of going around, I attached the full code and a fritzing file of the circuit I am currently using.
Thanks for having a look at...
worldclock_bl_0_0_5.ino (18.9 KB)
clock-speaker-04.fzz (15.5 KB)