Arduino support for RTC RX8010

Go To Last Post
13 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello gurus,

Has anyone used RX8010 RTC with Arduino IDE?

Are there any libraries for it?
Thanks,
Dave

This topic has a solution.
Last Edited: Tue. Mar 24, 2020 - 02:23 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Could this be a start?

 

https://forum.arduino.cc/index.p...

 

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Many thanks Ross,

Do you have an idea which library is in use ?

Thank you,

Dave

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Interestingly, when I google for a library/driver for that chip I hit this:

 

https://github.com/torvalds/linux/blob/master/drivers/rtc/rtc-rx8010.c

 

That's by no lesser person than Linus Torvalds !

 

Now, of course, this will be Linux code and is using Linux mechanisms both for interrupts and interfacing to I2C so cannot be used directly but the point is that it shows the data dialog you need to have with the chip. That part could be lifted and used with any standard I2C library for AVR (such as "Fleury").

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'll just mention make sure you don't forget the two pull-up resistors on the I2C bus lines.

10K will work, although often 4.7K is used.

 

As a side note, that is a rather old chip!

It comes in a PDIP package only!

Mouser: 0 in stock

Digikey: 0 in stock, minimum qty 100

 

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

davidnik wrote:

Many thanks Ross,

Do you have an idea which library is in use ?

Thank you,

Dave

No. But why don't you simply post that question over there in the same thread?

 

Ross McKenzie ValuSoft Melbourne Australia

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Why I google "RX8010 Arduino", the first hit is the thread that Ross linked, and the second is:

 

https://github.com/google/kmsan/blob/master/drivers/rtc/rtc-rx8010.c

 

Which seems to be exactly the same code that clawson linked.

 

Not actually written by Linus himself:

MODULE_AUTHOR("Akshay Bhat <akshay.bhat@timesys.com>");

MODULE_DESCRIPTION("Epson RX8010SJ RTC driver");

 

But the point remains, as clawson said:

it shows the data dialog you need to have with the chip

 

Just googling the part number gives:

 

https://www5.epsondevice.com/en/products/rtc/rx8010sj.html

 

Where you can find the Application Manual for the chip - which has flowcharts showing how to program it.

 

And links to another Linux driver!

 

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Fri. Mar 20, 2020 - 01:15 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


DocJC wrote:
It comes in a PDIP package only!

Not according to the manufacturer's page:

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I looked at the datasheets/application manual for this IC.   Typically poorly organized and incomprehensible to non-professional electronics engineers.   The so-called examples in the various on-line discussions are no better.  They either are missing key low-level interface functions needed to get the device working, or they are so over-engineered (and undocumented) that their complexity makes them essentially worthless.

 

Are you using the Static RAM or the alarm systems of this chip?  If not, then writing your own Arduino library will be easier. Note that the 7-bit Slave Address used by the Wire.h is 0x32.

 

Is there any chance that you could use the common DS3231 RTC instead of the exotic RX8010?  One more reason to get the prototype fully functional before laying out the PCB.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Great thanks to all of you.

Actually it's a very nice chip guys - 160nA consumption with 1.6 to 5.5V and no external crystal needed. 

Anyway, looks will move to mega3208 which has an internal clock and 650nA in standby mode while RTC working. 

Once again - thank you ALL

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So id your issue is now resolved, please see Tip #5 in my signature, below (may not be visible on mobile)

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi  awneil ,

Many thanks for your replay. 

However, I do not think the issue is resolved as there is not an Arduino library ready for use.

Anyway, as I said, will change the solution and mega4808 will be in use but that doesn't mean that RX8010 could be used for someone else.

Once again - thank you very much, I really appreciate your help !

Dave

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, if that is the conclusion, then please mark it.

 

As the Tip explains, you can always unmark it later if you wish.

 

Marking it lets people know - without having having to open the thread - that it's no longer active.

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...