Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
lightsinthesky
PostPosted: Feb 29, 2012 - 09:50 PM
Rookie


Joined: Jul 16, 2010
Posts: 30


I'm interfacing a DS3234 RTC with an AVR and have a strange problem...

I poll the seconds register by sending a "&h00" by SPI and get the following seconds counts (decimal, when anded with &B00001111 for the last 4 "ones seconds" bits):

0,1,2,3,4,8,9,10,11,12,0 (repeats)

This should obviously count from 0-9, but for some reason it adds 3 when it gets to 5??


http://datasheets.maxim-ic.com/en/ds/DS3234.pdf

Interestingly, the 10's seconds does a similar thing. It counts 00,10,20,00,10,20,00,10,20.... Never gets to 30,40,50... It's like I'm missing a bit!
 
 View user's profile Send private message  
Reply with quote Back to top
Kun.io
PostPosted: Feb 29, 2012 - 11:52 PM
Hangaround


Joined: Feb 09, 2012
Posts: 223


Check your code against others, like this one: http://sensi.org/~svo/satashnik/

Or lower the SPI speed.
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits