DS3234 No Battery Backup

I have a Sparkfun DS3234 RTC. The data sheet is here:

When I withdraw power it does not save the time, even though the battery is new. I have set the EOSC bit to zero like this:

pinMode(cs,OUTPUT); 
	  SPI.begin();  
	  SPI.setBitOrder(MSBFIRST); 
	  SPI.setDataMode(SPI_MODE1); 
	  //set control register 
	  digitalWrite(cs, LOW);  
	  SPI.transfer(0x8E);
	  SPI.transfer(0x0); 
	  digitalWrite(cs, HIGH);

Is this correct? Any help needed.

Thanks.

If you read through the comments for this product on the SparkFun website https://www.sparkfun.com/products/10160
there are posts that talk about this device only working with SPI_MODE3. Give that a try.

I'd also recommend that you write a sketch to read the values in control register (0x0E for read) so you can confirm what you have after you write to the control register.

If you read the data sheet, you will see that you will also get 1Hz on the square wave pin and disable alarms when you zero the control register.

The datasheet says that the EOSC bit is set to zero on power up so writing zero to the register will have no effect.
Are you sure the battery is the correct voltage (check it on a multimeter) and is it in the right way round?

Pete

Actually, I don't know how that 1Hz wave will affect me. Does it matter if I just need the right time? I am not using alarms.

I will check the mode and the voltage. It should be correct, I have tried it many ways around.