Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

DS1302 RTC interfacing with pic

Status
Not open for further replies.

galib.tan

Newbie level 6
Joined
Jan 5, 2012
Messages
11
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Activity points
1,379
Hi,
I'm new to rtc. I just want to design and build a digital clock using DS1302 and pic 16F877A. I've done synchronous serial communication using usart module and read the datasheet of DS1302 several times. But, things aren't clear to me. I can't get the starting point. All I understood is I've to send some control byte and address of registers to write and read data. Could anybody help me with the complete working flow? I want to write the code myself.
Galib.tan
 

why 1302 why not 1307 ?

Best you will learn from example. Here is one example you can find it complete on internet :

PROJECT : INDUSTRIAL AND DOMESTIC TIMER
AUTHOR : JESWANTH MG
COMPILER : HI-TECH PIC C COMPILER 9.60 IN PRO MODE
 

Attachments

  • main.pdf
    85.8 KB · Views: 155
  • DS1307.c.txt
    1.9 KB · Views: 132
  • main.c.txt
    3.9 KB · Views: 96
Last edited:
Hello tpetar,
yes,DS1307 is a nice chip,and now I use it too.but when I promote 20 pieces,someone not work.Do you see the same effect ?
Of course,the power(VCC,Vbat) all be ok,and (CH) bit cleared to 0.MCU I2C port is ok too.but somepiece's crystal not work,someone is ok!? I do't know why?
why 1302 why not 1307 ?

Best you will learn from example. Here is one example you can find it complete on internet :

PROJECT : INDUSTRIAL AND DOMESTIC TIMER
AUTHOR : JESWANTH MG
COMPILER : HI-TECH PIC C COMPILER 9.60 IN PRO MODE
 
Last edited:

hi tpetar
I want to use DS1302 because I already have two of them. However, I'm trying to understand the codes you sent. It would be a great help if you tell me the steps to program. I mean what and what I have to do sequentially.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top