hello, My address/data bus to interface the RTC is P1, Chip Select is P3^6 DS is P3^4 AS is P3^3 R/W is P3^5.
How can i use a pointer to access the registers in the RTC (like a pointer that points to the base address of the RTC (0x0A) and i can increment it to point to the other locations of the RTC)?
thanks in advance.
Have you looked at the application notes, etc, provided by Maxim/Dallas on their website?
yes of course, i'm also trying to find a way to use the Port-0(AD0-AD7) , which connected to the Eprom 27c256 along with P2.0-P2.4, for the RTC, i'm guessing i'll need to find a way so there will be no collision with the eprom. any suggestions please ?
... is precisely that is can be shared between multiple devices!
That's what "bus" means!
Specifically, the address bus is what selects the specific device.
Once you have your device mapped into XDATA, the processor simply accesses it as for any other XDATA address - it neither knows nor cares that it isn't a memory chip...
nice... i've selected A15 as 'chip select' for the RTC meaning :
#define DS12887A XBYTE[0x8000]
while the A15 is "on"='1' the uC in now scanning the RTC along with ALE(uC)=AS(on RTC) and alternately using RD(uC)=DS(RTC) and WR(uC)=R/W(RTC) i'm able to read/write to the RTC. is that correct ?