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.
... 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 ?