Page 1 of 1

RTC - ISL 12026 code .. working

Posted: Wed May 26, 2010 2:21 am
by mmk-tsm
Hello,
Can anybody please help me with some working i2c code for interfacing to the ISL12026 RTC. This is the replacement for the now obsolete X1226. I need code that works straight up, we have boards in production.
The 12026 registers cannot be written one byte at a time as for the X1226 - must use page writes.

TiA,
Michael.

Re: RTC - ISL 12026 code .. working

Posted: Thu May 27, 2010 7:26 am
by v8dave
Hi Michael, not sure if you have had any direct contact on this but looking at the datasheet it should be simple enough to get I2C working with this device. Interesting to note that it is pin compatible with the DS1338 that I use already.

You should be able to do something with this in about 1-2 hours work or therebaouts. Do you need this to be integrated into the Netburner RTC calls or can you live with being passed back the time in tm structure from a custom library?

How much support for the device do you need?

Dave...

Re: RTC - ISL 12026 code .. working

Posted: Thu May 27, 2010 10:36 am
by mmk-tsm
Dave,
Yes, I know I can do it. I was hoping somebody might already have some working code and be generous enough to share. Not re-inventing the wheel and all.
Especially since this is Intersil's replacement for the venerable old X1226.
And no, it does not have to be integrated into Netburner's calls - I am currently using code that was modified from ...not sure where I got it.

Thanks,
Michael.

Re: RTC - ISL 12026 code .. working

Posted: Thu May 27, 2010 10:44 am
by v8dave
Hi Michael,

According to the document on migration, the only thing you are affected by is the writing to the RTC. Could you not simply modify the code to do this as one page?

I have order 2 samples to try out in my design. They are actually cheaper than the current part I am using and pin compatible.

Dave...

Re: RTC - ISL 12026 code .. working

Posted: Mon May 31, 2010 8:32 am
by mmk-tsm
Dave,
yes, I have the migration document, and as mentioned in original query, I am aware that the only thing changed is the page write requirement.
I dont have a multiple register write function for my current i2c handler. But I will look into it. I genuinely thought some others on the group must be using the isl1226.
Thanks,

Re: RTC - ISL 12026 code .. working

Posted: Mon Jun 14, 2010 3:42 am
by v8dave
Hi there, are you still using this device? I have just fitted one to my development board and about to start coding for it. Just wondered if you actually made any progress with it?

Dave...

Re: RTC - ISL 12026 code .. working

Posted: Tue Jun 15, 2010 9:15 pm
by v8dave
Hi Michael,

Out of interest, I decided to simply try the supplied RTC driver that comes with Netburner and it works without any changes. The code to write the time already sends out the complete page. I now have a working clock on my Netburner without doing any code. I don't use the alarms so not sure about that part but I ony need basic time and date function.

Cheers,
Dave...

Re: RTC - ISL 12026 code .. working

Posted: Mon Aug 09, 2010 7:12 pm
by v8dave
Is anyone else using this device with the Netburner?

I have changed to a Dallas Maxim DS1338 after having some issues with the ISL 12026 device. As it happens I was testing on the 30th June and when I got up the next day, the clock was showing 31st June which is not a valid date. I double checked the code and it was fine. I reset the time to just before midnight to see if it would do this again and it did.

I should have tried a different year but I needed to get the design completed and working so that i could commit the PCB's to being produced so I changed to the DS1338 instead. I have emailed the Intersil agent about this and awaiting a reply to why this is.

Anyone else using this, could you see if it does it with your Netburner?

Cheers,
Dave...

Re: RTC - ISL 12026 code .. working

Posted: Tue Aug 10, 2010 10:04 am
by greengene
one problem i've had in the past is forgetting that the rtc months
usually range from 1 to 12 whereas the time functions tm_struct, or time_t,
range from 0 to 11. if that offset was not included, the 31st would be fine
for may or july. just a thought.

Re: RTC - ISL 12026 code .. working

Posted: Tue Aug 10, 2010 10:19 am
by v8dave
Good point. I noticed that in my driver for the DS1338 and I just checked the original code from Netburner and it does account for the month being 0-11 for the ISL1206 which works with the ISL12026 without any changes.

Reading

bts.tm_mon = GetBCD( RTCdata[4] ) - 1;

Writing

i2cStatus = I2CSend( MakeBCD( bts.tm_mon + 1 ) ); /* Month */

I may hook up an ISL12026 to an AVR and see if I get the same effect there.

The DS1338 is working just fine and gives me a few bytes of RAM I need for non-volatile storage of simple counters.

Cheers,
Dave...