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

RTC

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



Joined: 17 Mar 2014
Posts: 21

View user's profile Send private message Send e-mail

RTC
PostPosted: Tue Mar 18, 2014 11:51 am     Reply with quote

Hello guys,
Do anyone know how to use the Real Time Clock DS1338C-18 with the PIC18F4520 ?
Thanks
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Tue Mar 18, 2014 11:57 am     Reply with quote

I'm sure a lot here would know how to use it.

It connects to a PIC via I2C (which could be software or hardware implemented).

Do you have a more specific question in mind?

(and if you're going to ask for drivers, did you scan the code examples/library first?)

-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
faridh3



Joined: 17 Mar 2014
Posts: 21

View user's profile Send private message Send e-mail

PostPosted: Tue Mar 18, 2014 12:03 pm     Reply with quote

Thanks, but actually, i have never used this before... i have no idea how to use it Sad
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Tue Mar 18, 2014 12:08 pm     Reply with quote

What is "this"??

The PIC 18F4520

The DS1338C?

I2C Communications?

??
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
faridh3



Joined: 17 Mar 2014
Posts: 21

View user's profile Send private message Send e-mail

PostPosted: Tue Mar 18, 2014 12:22 pm     Reply with quote

I2C communications and DS1338C ... Thanks
temtronic



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

View user's profile Send private message

PostPosted: Tue Mar 18, 2014 12:24 pm     Reply with quote

Well I've used the DS1307 with the 18F46K22, both are 'kissing cousins' of the parts you've listed. The driver for the 1307 should work for the 1338.
If you can't get it to work, read the datasheet..Usual reasons why it 'doesn't work'. 1) NO battery...you MUST have a coin cell battery for it to function correctly. 2) PIC doesn't 'see it'. Run PCM programmer's I2C test program( it's here in the code library), to verify the PIC can access the RTC.
If it can't look for wiring problems,shorts,opens, wrong pullups,etc. If timing is off...check the 38KHz xtal layout and specs...

hth
jay
faridh3



Joined: 17 Mar 2014
Posts: 21

View user's profile Send private message Send e-mail

PostPosted: Tue Mar 18, 2014 12:39 pm     Reply with quote

okay thank you
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