CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Reason for corruption of data from DS3232.

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
jaikumar



Joined: 15 Dec 2006
Posts: 109

View user's profile Send private message

Reason for corruption of data from DS3232.
PostPosted: Thu Mar 17, 2011 12:10 am     Reply with quote

Hi All,

I am using a DS3232 with 18F2550 I2C. When i set the date and time it works. but when i switch on and off a few times either the date or time
gets corrupted. The value some times is even greater than 12 for month.

Data does not get corrupted as long as power is not switched on/off

Need help on what might be the causes.

Thanks and Regards,
Jai.


Last edited by jaikumar on Thu Mar 17, 2011 12:17 am; edited 1 time in total
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Thu Mar 17, 2011 12:17 am     Reply with quote

You do have a battery attached, yes?

-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
jaikumar



Joined: 15 Dec 2006
Posts: 109

View user's profile Send private message

PostPosted: Thu Mar 17, 2011 12:25 am     Reply with quote

Yes. Battery voltage is also fine.
jaikumar



Joined: 15 Dec 2006
Posts: 109

View user's profile Send private message

PostPosted: Thu Mar 17, 2011 12:54 am     Reply with quote

When using CCS ICD-U64 the MCLR pin is kept at 4.5 V. I removed the ICD connections during power cycle. The data has not got corrupted. Will test further to determine if this is THE cause.

regards
jai
jaikumar



Joined: 15 Dec 2006
Posts: 109

View user's profile Send private message

PostPosted: Thu Mar 17, 2011 1:42 am     Reply with quote

That was not the cause.
Any other ideas?

regards,
jai
temtronic



Joined: 01 Jul 2010
Posts: 9243
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Mar 17, 2011 5:45 am     Reply with quote

Other things to look at.

Properly designed power supply,especially EMI filtering...

Enable PUT in Fuses...

Correct ground layout and local bypass caps, one per chip.

Correct pullups, based on Vdd and speed..
Ttelmah



Joined: 11 Mar 2010
Posts: 19538

View user's profile Send private message

PostPosted: Thu Mar 17, 2011 6:07 am     Reply with quote

Take us through the supply circuitry, and the layout of the I2C connections (pullup values, do you have inline resistors as well?).

Best Wishes
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Mar 17, 2011 1:39 pm     Reply with quote

Quote:
I am using a DS3232

Maxim makes that chip. Look on their website for excellent appnotes
on how to use it. Look near the end of this appnote for suggestions
on fixing data corruption with RTC chips:
http://www.maxim-ic.com/app-notes/index.mvp/id/504
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group