shabazmondal
Member level 2
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)
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)
Last edited: