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 support@ccsinfo.com

18F4550, DS1307 & NOKIA 3310 LCD problem

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



Joined: 02 Mar 2008
Posts: 7
Location: UK

View user's profile Send private message MSN Messenger

18F4550, DS1307 & NOKIA 3310 LCD problem
PostPosted: Sun Mar 02, 2008 11:11 am     Reply with quote

Hi

i need help trying to fix a problem i have with a little project i got on the side, i'm new to programming in C but i'm learning quick, i have some exp with pascal but thats about it.

i've used the code to drive the DS1307 from this post:
http://www.ccsinfo.com/forum/viewtopic.php?t=23255

and the NOKIA 3310 LCD driver from this post:
http://www.ccsinfo.com/forum/viewtopic.php?t=25571

i had it working fine but after i left it powered overnight and i woke to see the time and date displayed as:

45/25/-1
45:85:85

i have no idea why its done this but as far as i can see it should be working. it also displays this on the terminal if i plug it to the serial port on my pc.

any help would be awesome
cheers
_________________
<~Simbo~>
Douglas Kennedy



Joined: 07 Sep 2003
Posts: 755
Location: Florida

View user's profile Send private message AIM Address

PostPosted: Sun Mar 02, 2008 1:43 pm     Reply with quote

The DS1307 regs 0..7 appear to be corrupted. This can happen if the DS1307 is run without a backup battery and power fails. The other source is that a valid series of I2C writes sent the values you see into the DS1307 regs. The other possibility is that every thing inside the DS1307 is just fine but the I2C read routine is getting messed up and gives you false values.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Mar 02, 2008 1:47 pm     Reply with quote

Quote:
45/25/-1
45:85:85

For more information, here is a previous thread on this topic:
http://www.ccsinfo.com/forum/viewtopic.php?t=19926
Simbo



Joined: 02 Mar 2008
Posts: 7
Location: UK

View user's profile Send private message MSN Messenger

PostPosted: Tue Mar 04, 2008 9:53 am     Reply with quote

Thank you for your help, turns out it was the simplest of things that i really didn't check.

The battery was going dead but was still powering everything else, changed it and the clock from the ds1307 came back.

lol

always the simple things
_________________
<~Simbo~>
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