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.

DS12887 with 8051(embedded C querry)

Status
Not open for further replies.

shabazmondal

Member level 2
Joined
Aug 29, 2011
Messages
46
Helped
6
Reputation
12
Reaction score
5
Trophy points
1,288
Location
Mumbai
Activity points
1,524
I am using DS12887 along with AT89C51 for a custom design of an automatic user defined bell.
I am developing an embedded C code for the same. When i referred mazidi I found a certain command 'XBYTE' which is used to read or write data into the RTC.
I have certain querries that I would like to get answered
This is the connection that I am using..(I mean just ALE ,(~RD),(~WR), and Port 0) connections.
these are the querries
1) do we need to write any other command apart from including the header file "#include <absacc.h>"
example of statement for reading
yr=XBYTE[9]; // for receiving the year in a variable 'yr'
example for writing
XBYTE[0]=0x55; // for writing into seconds address space

Are these statement sufficient along with the header file.

2)I don't intend to use the alarm and interrupt functions of the DS12887.
So what should I write into the registers A(bits 4,3,2,1),B(bits 7,6,5,4,3) and C(bits 7,6,5,4)

78_1320671655.png
 
Last edited:

Hi..

Please once check this link..You will find whole code so that you can compare it with your code and find differences.
https://www.edaboard.com/threads/90407/

I went through tha above mentioned link,my querry about 'XBYTE' is cleared..
but i still want to know about the registers.
and one more thing is that, do I need to connect pull ups for the Port ZERO of 8051 if im connecting it to the data lines of RTC 12887??
 

I went through tha above mentioned link,my querry about 'XBYTE' is cleared..
but i still want to know about the registers.
and one more thing is that, do I need to connect pull ups for the Port ZERO of 8051 if im connecting it to the data lines of RTC 12887??


I think you need not connect the pull up resistor to port 0...Please once check this link this may be use full for you
https://www.edaboard.com/threads/67707/
 

This issue gets cleared,we dont need any pull up resistors.
I will revert back if there are nay more questions.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top