View previous topic :: View next topic |
Author |
Message |
kurusaray_18
Joined: 15 Dec 2014 Posts: 3
|
16f1847 with ds1307 help |
Posted: Mon Dec 15, 2014 8:03 am |
|
|
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
|
|
Posted: Mon Dec 15, 2014 11:32 am |
|
|
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
|
|
Posted: Mon Dec 15, 2014 11:35 am |
|
|
There is also a DS1307 driver in the code library. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon Dec 15, 2014 11:40 am |
|
|
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
|
16f1847 |
Posted: Mon Dec 15, 2014 12:25 pm |
|
|
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
|
|
Posted: Mon Dec 15, 2014 12:49 pm |
|
|
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
|
|
Posted: Mon Dec 15, 2014 1:04 pm |
|
|
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
|
16f1847 |
Posted: Mon Dec 15, 2014 1:29 pm |
|
|
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
|
|
Posted: Mon Dec 15, 2014 2:38 pm |
|
|
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. |
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
|
|
Posted: Mon Dec 15, 2014 8:13 pm |
|
|
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
|
|
Posted: Tue Dec 16, 2014 5:43 am |
|
|
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 |
|
|
|