Thank you very much for your help! The main reason why I want to use this IC (DS17287) was I need more RAM space (about 2K bytes or so). I only have enough I/O on the PIC18F452 to interface to a "8-bit multiplex bus" RAM chip. I guess where I got confused was in order to access RAM in this IC, I need to: 1. Select the address of the RAM's "upper address register" - location 0x51 2. Write the RAM upper address 3. Select the address of the RAM's "lower address register" - location 0x50 4. Write the RAM lower address 5. ...... The address of the address stuff really screw me up! Now I come to see that accessing RAM in this IC is too awkward. Is there any RAM chip out there that also uses 8-bit multiplex bus? Am I going in the right direction here? Best regards, Thomas "Stephen R. Phillips" wrote: On Thu, 18 Mar 2004 13:07:45 -0800, Thomas wrote: > Hello, > > I am having some trouble interfacing with the Maxim DS17287 RTC. The > RTC IC uses 8-bit multiplex bus interface, but the PIC18F452 doesn't not > support this interface so it has to be done in software (and I don't > know how). > > Have you done any coding to interface to this RTC or a similar devices > (i.e DS12877, DS1687, etc)? Please help sharing the code. Thank you in > advance! > > Best regards, > > Thomas > Pick a port with all 8 port bits available and 4 other pins (if you don't plan on using the interrupt output). 3 of these pins can be used for other things (they are inputs to the device so are high impedance but need to be drivable by the PIC). (ALE -RD -WR) First set your direction on the 8 bit data port for output Set ALE to LOW SET -RD and -WR HIGH Set -CS Low now Write your address location to the data port Set ALE to HIGH Set ALE to LOW Now if you wish to write to this address write the data to the data port Set -WR LOW Set -WR HIGH if you wish to read from this address Set the direction of the Data Port to inputs Set -RD LOW Read the Data port state to wherever Set -RD HIGH Now you are done set -CS high set the Data port as inputs (let the bus go) You can now use all those pins except the -CS pin for other things (within reason of course) That about sums it up.. you can read and write any register with that algorythm.. here is a BIG HINT .. go to page 29 of the Data sheet and READ it. So you understand how the bus works. Another BIG HINT, read the WHOLE DATA SHEET, or you WILL be asking questions again in a matter of minutes to hours. Most chips like these do not require you to use -CS to latch in the address even. (Again LOOK at the data sheet page 29 carefully). This device you selected also support burst mode (the address is automagically incremented in the address latch by consecutive read or write operations). Most importantly HAVE FUN! -- Stephen R. Phillips was here -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.