View previous topic :: View next topic |
Author |
Message |
faridh3
Joined: 17 Mar 2014 Posts: 21
|
RTC |
Posted: Tue Mar 18, 2014 11:51 am |
|
|
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
|
|
Posted: Tue Mar 18, 2014 11:57 am |
|
|
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
|
|
Posted: Tue Mar 18, 2014 12:03 pm |
|
|
Thanks, but actually, i have never used this before... i have no idea how to use it |
|
|
bkamen
Joined: 07 Jan 2004 Posts: 1615 Location: Central Illinois, USA
|
|
Posted: Tue Mar 18, 2014 12:08 pm |
|
|
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
|
|
Posted: Tue Mar 18, 2014 12:22 pm |
|
|
I2C communications and DS1338C ... Thanks |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9243 Location: Greensville,Ontario
|
|
Posted: Tue Mar 18, 2014 12:24 pm |
|
|
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
|
|
Posted: Tue Mar 18, 2014 12:39 pm |
|
|
okay thank you |
|
|
|