hi all I am doing a project which involves storage of some values in nonvolatile ram so in case of powerdown the value remains there and it can be read back when circuit gets power.This value should be modified also. I am using atmel 89C51 and i am using atmel's 24C04 as nonvolatile ram. I have done my coding in assembly. Now my problem is I dont know how to read data from n write data to this ram.
AT24Cxx Serial EEPROMs have 2-wire I2C interface. This is not good choice for AT89C51 to communicate with such way due you should write software emulated I2C protocol. I suggest you either select MCU with hardware I2C interface (like AT89C51IC2, ID2) or select another type of serial EEPROM. For example, AT25xx serie works via SPI link. This inteface is much more easy to be software emulated. There are alot of C51 MCUs which have hardware SPI, for example, AT89S53, AT89S8252, S8253 etc. Moreover, in some cases SPI may be obtained with UART in mode 0. Anyway, here is the links: How to connect AT24 to C51 - http://www.atmel.com/dyn/resources/prod_documents/doc0507.pdf How to connect AT25 to C51 - http://www.atmel.com/dyn/resources/prod_documents/doc0628.pdf By the way, AT89C51 is not produced anymore, use AT89S51 instead, see here: http://www.atmel.com/dyn/products/devices.asp?Status=Mature&family_id=604&family_name=8051%20Architecture Regards, Oleg