LCD16x2+ds1307+ time/pwm Problem

I'm using mega1280, i'm sorry, i dont see this big error, digital is 0 or 1.
Put analog and another pin, no more problems. Tanks