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.

Wierd problem with DS12887 RTC

Status
Not open for further replies.

DrWhoF

Advanced Member level 1
Joined
May 6, 2005
Messages
402
Helped
24
Reputation
48
Reaction score
11
Trophy points
1,298
Activity points
4,388
I can read and modify seconds and years but I can not access and modify minutes, hours, days and months.
Seconds count from 0-59 and then there is no change in miutes, hours and so on.
The system is working in standard configuration with 8051 microcontroller/RS232-PC.
What can be the reason?
Thanks.
DrWho
 

IanP

Advanced Member level 5
Joined
Oct 5, 2004
Messages
7,942
Helped
2,309
Reputation
4,620
Reaction score
531
Trophy points
1,393
Location
West Coast
Activity points
66,416
You have take into account this:
The DS12887 like its predessesor, the 6818, periodically updates all time and date registers ..
If you attempt to read them during the update procedure, they may be not accessible, hence, you will read "nothing" ..
Try to sense the UPI (update-in-progrss) bit and read/write the RTC when it is permissible ..
Regards,
IanP
 

    DrWhoF

    Points: 2
    Helpful Answer Positive Rating

e9406114

Newbie level 1
Joined
Jul 26, 2005
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,290
You must set regB = 0x86, For example :


oldregB = regB;
regB = 0x86; //must require
second =ggetnum();
minute =getnum();
hour =getnum();
for(c=255;c>0;c--);
regB=oldregB;

I have made RTC DS12887 with AT89S52. It works well.

Noi - nvnoi@vtihcm.com.vn
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top