18M2 RTC

Tony P

Member
I am trying to connect an RTC to the CH1030A project board but cannot get it to work. I am using the centre non-buffered pins B.1 (SDA) and B.4 (SCL) as normal but I am not getting the RTC to run.
I have tested the 18M2 and the RTC on the AXE091 project board and all work fine.

Any ideas please?
 

The bear

Senior Member
The clever people on this forum will ask you for more information.
Like: Photo of layout, circuit diagram, your coding & symptoms (What it is or isn't it doing). I'm not clever.
Good luck.
 

Hemi345

Senior Member
Do you have the 4.7K pullup resistors fitted? The AXE091 has those built in (to the right of the RTC).
 

hippy

Technical Support
Staff member
Also check your power rail. If the power rail drop below some level ( 4.5V ? ) in comparison to the battery back-up voltage the RTC can think it's unpowered, will disable its I2C interface.

But my gut feeling is Hemi345 has nailed it with missing pull-ups.
 

Tony P

Member
Do you have the 4.7K pullup resistors fitted? The AXE091 has those built in (to the right of the RTC).
No I dont. I didn't realise that I needed them!.
But I have other clock circuits happily running, such as a central heating time clock, using 18M2 and the same RTC's without the resistors!
 

hippy

Technical Support
Staff member
But I have other clock circuits happily running, such as a central heating time clock, using 18M2 and the same RTC's without the resistors!
Some RTC modules may have the pull-up resistors included on them.

It may be possible to get I2C working using the internal pull-ups so would be worth adding "PULLUP %00010010" to the start of your program. If that makes the RTC work, stops when you take that out, then it's almost certainly a pull-up issue.

Also double-check you haven't got SDA and SCL crossed over.
 

Tony P

Member
Sorted thank you.
The RTC module that I used for my heating time clock has indeed got the required pull ups. This new RTC has not even though I purchased them as a job lot of, what I assumed were, identical modules.
Two 4k7's added and I'm all good to go:)
 
Top