Ttelmah
Joined: 11 Mar 2010 Posts: 19218
|
|
Posted: Thu Nov 15, 2018 3:30 am |
|
|
It won't....
You do realise the clock has to be initialised before it can run?.
The time needs to be set into the chip, and the CH bit (bit 7 of the seconds register), needs to be cleared _before_ the chip will start giving a time. You can't just read it and expect to see a time.
As the chip wakes from 'new', the clock is disabled.
Realistically also, the update rate needs to be a lot slower. 50mSec is not enough loop delay to allow the LCD to draw.
Also the I2C setup should be:
#use I2C(master, I2C1, SLOW = 100000)
Your chip does not support the fast protocol, so needs to use SLOW. |
|