![]() |
Forum Index : Microcontroller and PC projects : RTC GetTime/ RTC SetTime
Author | Message | ||||
jman![]() Guru ![]() Joined: 12/06/2011 Location: New ZealandPosts: 711 |
Hi All So I noticed that when using I2C and you use the built in RTC commands after the command ie RTC GetTime or RTC SetTime the I2C is ALLWAYS closed and a new Open command is required. So is this known / Bug or by design I2C Open 100,100 RTC GetTime I2C Write &H44, 0, 2, &H01 ,&H00 End The code above Produces [14] I2C Write &H44, 0, 2, &H01 ,&H00 Error: Not enabled While the following works as expected RTC GetTime I2C Open 100,100 I2C Write &H44, 0, 2, &H01 ,&H00 End This is also applies to the RTC SetTime command Regards Jman |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9643 |
Interesting. I get the same problem with your test code, so it might be an elusive bug perhaps? Manual says(page 63): This suggests that the command will use the current I2C settings, but it would indeed seem that the I2C port is being closed by the GetTime command - odd. Watching this thread with interest.... Smoke makes things work. When the smoke gets out, it stops! |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3303 |
It is a bug and now that it has been pointed it out I can see it in the source - as obvious as the nose on my face! I will fix it in the next release. Thanks Jman and Grogs. Geoff Geoff Graham - http://geoffg.net |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |