View previous topic :: View next topic |
Author |
Message |
jaikumar
Joined: 15 Dec 2006 Posts: 109
|
Reason for corruption of data from DS3232. |
Posted: Thu Mar 17, 2011 12:10 am |
|
|
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
|
|
Posted: Thu Mar 17, 2011 12:17 am |
|
|
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
|
|
Posted: Thu Mar 17, 2011 12:25 am |
|
|
Yes. Battery voltage is also fine. |
|
|
jaikumar
Joined: 15 Dec 2006 Posts: 109
|
|
Posted: Thu Mar 17, 2011 12:54 am |
|
|
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
|
|
Posted: Thu Mar 17, 2011 1:42 am |
|
|
That was not the cause.
Any other ideas?
regards,
jai |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9243 Location: Greensville,Ontario
|
|
Posted: Thu Mar 17, 2011 5:45 am |
|
|
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
|
|
Posted: Thu Mar 17, 2011 6:07 am |
|
|
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
|
|
Posted: Thu Mar 17, 2011 1:39 pm |
|
|
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 |
|
|
|