Feedback on http://www.maxim-ic.com/appnotes.cfm?an_pk=3974

Member Comments Avg rating: 40
  tmig   - inclusion of source code
2009-05-27
When the C source code is supplied it is common to include the header files too, especially if they are specific to the hardware of interest
  tmig   - mistake in source code? (no rating)
2009-09-28
  In your example code you have the following writes to initialize the cock registers:

   start();
   writebytei2c(ADDRTC); /*write tcxo */
   writebytei2c(0x00); /* write register address */
   writebytei2c(sec);
   writebytei2c(min);
   writebytei2c(hr);
   writebytei2c(dy);
   writebytei2c(dt);
   writebytei2c(mn);
   writebytei2c(yr);
   writebytei2c(0x10); /* enable sqw, 1hz output */
   stop();

The last write is to enable sqw, 1Hz output. In the DS32x35 clock register map the next register after years is an alarm register. What gives? This looks like an error to me.
  Rishi   - Ans to tmig (no rating)
2009-10-02
You are right, there seems to be an error in there. You would be writing to the alarm bits.

You can change this, by issuing a stop. The do a regular i2c write to that particular register (start -> slave address -> Memory address -> Data -> Stop)
Your Comments
Login or register to post a comment.