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

16f1847 with ds1307 help

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



Joined: 15 Dec 2014
Posts: 3

View user's profile Send private message

16f1847 with ds1307 help
PostPosted: Mon Dec 15, 2014 8:03 am     Reply with quote

Hello.

CCS when the 16f1847 with DS1307 and DS1307 employee co driver I need.

I would appreciate if you can help.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Dec 15, 2014 11:32 am     Reply with quote

CCS has a ds1338 driver here, which should also work with the ds1307:
Quote:
c:\program files\picc\drivers\ds1338.c
Ttelmah



Joined: 11 Mar 2010
Posts: 19539

View user's profile Send private message

PostPosted: Mon Dec 15, 2014 11:35 am     Reply with quote

There is also a DS1307 driver in the code library.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Dec 15, 2014 11:40 am     Reply with quote

The reason I gave him that one is because he has some cryptic comment
about CCS employee, so I thought maybe he only wanted one from CCS.
kurusaray_18



Joined: 15 Dec 2014
Posts: 3

View user's profile Send private message

16f1847
PostPosted: Mon Dec 15, 2014 12:25 pm     Reply with quote

I tried. DS1307 in its library. but

I not work with 16f1847.

An example on the use 16f1847 with DS1307 Is there?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Dec 15, 2014 12:49 pm     Reply with quote

Post a description of the connections between the DS1307 and the PIC.

Also post a description of all connections to the DS1307 pins.
temtronic



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

View user's profile Send private message

PostPosted: Mon Dec 15, 2014 1:04 pm     Reply with quote

I know the driver works for all sorts of PICs !
1) do you have a battery conected to the DS1307 ? Pin 3 I think ...
It MUST be there for it to work.

2) Do you have the correct pullup resistors on the I2C lines? 3K3 or 4K7 will work.

3) Have you run PCM P's 'I2C scanner' program found in the code library here? It will find ANY I2C device....

4) Have you got the '1Hz LED' type program running on your PIC/board? This should be done first to confirm hardware/pgmr/software does work.



Jay
kurusaray_18



Joined: 15 Dec 2014
Posts: 3

View user's profile Send private message

16f1847
PostPosted: Mon Dec 15, 2014 1:29 pm     Reply with quote

I understand. I have 3 numbers I pulled to the ground. I was wearing a 10k pullup resistor.

Changing experience them again.
Ttelmah



Joined: 11 Mar 2010
Posts: 19539

View user's profile Send private message

PostPosted: Mon Dec 15, 2014 2:38 pm     Reply with quote

PCM programmer wrote:
The reason I gave him that one is because he has some cryptic comment
about CCS employee, so I thought maybe he only wanted one from CCS.


Very Happy

That's a case of him using a translation program. He is using (employing....) a DS1307.

Shows how this sort of program can lead one off in odd directions.....

I used to be quite good at reading 'Chinglish' manuals.
asmallri



Joined: 12 Aug 2004
Posts: 1635
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Mon Dec 15, 2014 8:13 pm     Reply with quote

temtronic wrote:

1) do you have a battery conected to the DS1307 ? Pin 3 I think ...
It MUST be there for it to work.


Not quite - the battery input on the DS1307 cannot be allowed to float (be unconnected). If there is no battery present (for example when you are testing) then either a pull-up or pull-down resistor can be used and the DS1307 will work correctly.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
temtronic



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

View user's profile Send private message

PostPosted: Tue Dec 16, 2014 5:43 am     Reply with quote

hmm ...
interesting about the battery input to the DS1307! Though without a 'backup battery' on the pin you lose the feature of keeping the RTC alive when PIC power fails,so if you use it without battery, you might as well code a SW RTC into the PIC !

learning something new everyday, remembering 1/2 of it !!


Jay
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