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

I2C function for DS1302 RTC with 16f676

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



Joined: 07 Jan 2016
Posts: 17
Location: pakistan

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

I2C function for DS1302 RTC with 16f676
PostPosted: Sat Nov 05, 2016 8:29 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Sat Nov 05, 2016 9:14 pm     Reply with quote

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

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

PostPosted: Sat Nov 05, 2016 9:42 pm     Reply with quote

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: 19496

View user's profile Send private message

PostPosted: Sun Nov 06, 2016 3:50 am     Reply with quote

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: 9221
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sun Nov 06, 2016 9:12 am     Reply with quote

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
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