Hi
Bare with me I am really new to all this but I am so keen to learn.
I am having trouble getting my DS1302 to memorise the time after removing the main power source. At this point my code is telling me that write protection is enabled. How do i go about disabling this??
There are a lot of problems with the DS1302. If you have a cheap module from Ebay, you need luck to make it work. Maybe you need a lot of luck. Some try to make it work by extra toggling some pins, or do something with the power.
Then you have a good chip (or good module) and I suppose good other components as well.
bcraig24 might have bought a cheap module and it may never work.
Get rid of the DS1302. Buy a DS3231 module.
If you bought a DS1302 module from a well known and good seller, they might also provide good code for it.
I bought a Arduino kit form my local electronics store which came with my DS1302. Not sure on its quality but the UNO has the gold marker proving its quality so I would assume the components accompanying it would be also.
I am using the library you mentioned.
Maybe I will try the DS3231.
JimboZA:
Although I upgraded to the 1307 becasue the I2C interface is more frugal on pins, I had good success with the 1302 using Henning Karlsen's library.
I tried this library and it is now giving me this error. Repeated for every day of the week and month on the year.
B:\Program Files\Arduino\libraries\DS1302\DS1302.cpp:258:10: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
Can confirm this is a very easy way to get the DS1302 working. I tried two other libraries (RTCLib_by_NeiroN and another one that also needed Time.h (seriously, I don't expect something simple like this to need TWO special purpose libraries)) and I couldn't fathom either of them. Karlsen's library worked straight away, no messing. I'm using Arduino Nano and the cheapest DS1302 module I could find on eBay China.