View previous topic :: View next topic |
Author |
Message |
noman yousaf
Joined: 07 Jan 2016 Posts: 17 Location: pakistan
|
I2C function for DS1302 RTC with 16f676 |
Posted: Sat Nov 05, 2016 8:29 pm |
|
|
I want to use RTC DS1307 with PIC16F676. Is there any library function which can do this?
Please guide me.
Regards
Last edited by noman yousaf on Sat Nov 05, 2016 9:40 pm; edited 1 time in total |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sat Nov 05, 2016 9:14 pm |
|
|
Look in your CCS drivers directory:
Quote: | c:\program files\picc\drivers\ds1302.c
|
Also, it's SPI, not i2c. |
|
|
noman yousaf
Joined: 07 Jan 2016 Posts: 17 Location: pakistan
|
|
Posted: Sat Nov 05, 2016 9:42 pm |
|
|
PCM programmer wrote: | Look in your CCS drivers directory:
Quote: | c:\program files\picc\drivers\ds1302.c
|
Also, it's SPI, not i2c. |
sorry i made a mistake in writing. it was DS1307. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19552
|
|
Posted: Sun Nov 06, 2016 3:50 am |
|
|
There have been drivers posted here for this. For example:
<http://www.ccsinfo.com/forum/viewtopic.php?t=23255&highlight=ds1307>
A search will find others. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9246 Location: Greensville,Ontario
|
|
Posted: Sun Nov 06, 2016 9:12 am |
|
|
I've done several products using the DS1307, it's easy to use and keeps great time. Just be sure to install the battery ! I use the 1Hz interrupt to trigger a remote temp/control data product.
Also if you need to store a few variables, the onboard battery backed RAM is great ! Somewhat easier than EEPROM routines as you can just save/read ONE byte not a 'block'.
Jay |
|
|
|