Hi, I'm trying to get the clock module that can be integrated into the serial OLED module working. I can output text to the OLED display perfectly well, however when I try to set the time (and display it on the OLED) it just displays "00/00/00 00:00". I am using the 20M2 chip, and am connected in a serial connection the the OLED firmware/clock board through the default pins (B.7 is output, B.0 is input). The DS1307 clock module and battery are inserted correctly.
Here is the code copied directly from the manual:
I have also attempted:
Neither of these work, they both give me "00/00/00 00:00". I have noticed that occasionally after programming it will turn to "3F/00/00 00:00", which I assume is just random data or some glitch? I do get the "** DATA 0 SET **" text appearing when I program it, which is a good sign.
Any ideas on how to fix the clock? I'm thinking it could be some data speed issues or something.
Here is the code copied directly from the manual:
Code:
init: pause 500
main: serout B.7,N2400, (253,0,"25/12/01 22:00 ")
pause 1000
serout B.7,N2400, (0)
end
Code:
init: pause 1000
setfreq m16
main:
serout B.7,N2400_16, (253,0,"25/12/01 22:00 ")
pause 4000
serout B.7,N2400_16, (0)
end
Any ideas on how to fix the clock? I'm thinking it could be some data speed issues or something.