westaust55
Moderator
Hi all,
I have assembled the AXE033 LCD display and added the optional DS1307 RTC kit. I have a problem with the setting of the time .
I have tested the LCD side of the AXE033 in both Serial and i2c modes and that is working perectly okay .
I have run a small program to set the date and time in the RTC (in serial mode) but am finding that if I set a date and time, then after a pause display the time, I always get the previous settings.
Note that the clock is being set in some matter as the data is available later and I do see the following message in the top row each time:
***Data 0 Set***
By way of explanation,
If I first set the RTC to 01/01/08 and time to 20:00 then a pprevious setting is displayed.
If I change the date to 01/02/08 and the time to 20:10 and rerun my program, then after a pause when I display the time I see 01/01/08 and time to 20:00.
Then if I change the date to 12/03/08 and the time to 20:20 and rerun my program, then after a pause when I display the time I see 01/02/08 and the time as 20:10.
If I run the program a second time without chnaging the date and time data then the desired values are then displayed.
Below is the program I have created:
main: pause 1000
serout 7, N2400, (254,1) ; clear the screen
pause 1000
serout 7, N2400, ("hello Westaust55")
pause 2000
; remove REMs to set time
; serout 7, N2400, (253,0,"12/03/08 20:24 ")
;
; pause 1000 ; I have tried values upto 10,000 here
serout 7, N2400, (0)
pause 1000
end
It is as if there is some kind of buffer holding the latest set of data so that the new data is held back from the RTC. Other than run the program twice to get the desired data into the RTC I am currently at a lost .
Any thoughts or comments would be appreciated.
I have assembled the AXE033 LCD display and added the optional DS1307 RTC kit. I have a problem with the setting of the time .
I have tested the LCD side of the AXE033 in both Serial and i2c modes and that is working perectly okay .
I have run a small program to set the date and time in the RTC (in serial mode) but am finding that if I set a date and time, then after a pause display the time, I always get the previous settings.
Note that the clock is being set in some matter as the data is available later and I do see the following message in the top row each time:
***Data 0 Set***
By way of explanation,
If I first set the RTC to 01/01/08 and time to 20:00 then a pprevious setting is displayed.
If I change the date to 01/02/08 and the time to 20:10 and rerun my program, then after a pause when I display the time I see 01/01/08 and time to 20:00.
Then if I change the date to 12/03/08 and the time to 20:20 and rerun my program, then after a pause when I display the time I see 01/02/08 and the time as 20:10.
If I run the program a second time without chnaging the date and time data then the desired values are then displayed.
Below is the program I have created:
main: pause 1000
serout 7, N2400, (254,1) ; clear the screen
pause 1000
serout 7, N2400, ("hello Westaust55")
pause 2000
; remove REMs to set time
; serout 7, N2400, (253,0,"12/03/08 20:24 ")
;
; pause 1000 ; I have tried values upto 10,000 here
serout 7, N2400, (0)
pause 1000
end
It is as if there is some kind of buffer holding the latest set of data so that the new data is held back from the RTC. Other than run the program twice to get the desired data into the RTC I am currently at a lost .
Any thoughts or comments would be appreciated.