Altronics Colour Maximite - Mystery Cap


Author Message
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1296
Posted: 03:04am 11 Dec 2012      

  Nick said  
  Bill.b said   Hi Nick
How is the battery on the RTC
Bill

Yep. Full battery and it definitely holds the set time. Pull it out and it loses the time.


Nick,
Guessing a bit here but voltage might still be the problem - here's some extracts from the 1307 datasheet:

DETAILED DESCRIPTION
.....Access to the DS1307 is obtained by implementing a START condition and providing a device identification code followed by a register address. Subsequent registers can be accessed sequentially until a STOP condition is executed. When VCC falls below 1.25 x VBAT, the device terminates an access in progress and resets the device address counter. Inputs to the device will not be recognized at this time to prevent erroneous data from being written to the device from an out-of-tolerance system. When VCC falls below VBAT, the device switches into a low-current battery-backup mode. Upon power-up, the device switches from battery to VCC when VCC is greater than VBAT +0.2V and recognizes inputs when VCC is greater than 1.25 x VBAT.

Pin 3 (Vbat) Min 2.0v Max 3.5v
....Battery voltage must be held between the minimum and maximum limits for proper operation. Diodes in series between the battery and the VBAT pin may prevent proper operation. If a backup supply is not required, VBAT must be grounded. The nominal power-fail trip point (VPF) voltage at which access to the RTC and user RAM is denied is set by the internal circuitry as 1.25 x VBAT nominal. A lithium battery with 48mAh or greater will back up the DS1307 for more than 10 years in the absence of power at +25°C.

Pin 8 (Vcc) Min 4.5v Max 5.5v (Ground is Pin 4)
Primary Power Supply. When voltage is applied within normal limits, the device is fully accessible and data can be written and read. When a backup supply is connected to the device and VCC is below VTP, read and writes are inhibited. However, the timekeeping function continues unaffected by the lower input voltage.


It's very specific about when it allows read/writes, updates, etc. What is the Vcc supply voltage and the Vbat voltage you have at the chip? Also, when you removed the battery and put it back, was the board powered or not? If it was powered then the 1307 should have ignored that anyway.

As I understand it, the RTC clock is only read once, immediately on power-up and then MMBasic keeps time from that - but it does somehow know if the RTC isn't running on power-up because it comes up with the "Clock Not Set" message under the logo to remind you to issue a Time/Date command. I assume that subsequent to that, if a new Time/Date MMBasic command is issued then it would also be written to the RTC, not just MMBasic.

Anyone else with some comments on this?

Greg