Write n Read 24C04
Mon Oct 31 2011, 09:50 pm
Hi Mr Ajay.
I need your help/guidance to correct or modify the code.
I have written a code in assembly to write in to EEPRM 24C04 and read those data and Display at Port2. I have simulated the code in Proteus, but sorry to say, i am not able to write more than 8 bytes. The Code, Schematic and Debug files are attached.
Please guide.
Thanks
sks
I need your help/guidance to correct or modify the code.
I have written a code in assembly to write in to EEPRM 24C04 and read those data and Display at Port2. I have simulated the code in Proteus, but sorry to say, i am not able to write more than 8 bytes. The Code, Schematic and Debug files are attached.
Please guide.
Thanks
sks
Wed Nov 02 2011, 02:39 am
Are you sending subaddress to specify where exactly are you going to write? I guess not as from your program...
all I2C EEPROM should be addressed as follows
[start][slaveadd][subadd][data][data]...[stop]
all I2C EEPROM should be addressed as follows
[start][slaveadd][subadd][data][data]...[stop]
Wed Nov 02 2011, 11:25 am
Dear Mr Ajay and ExperimenterUK,
Thanks for responding me. I will modify the code as advised by Mr Ajay and attach everything in my next post.
Thanks all
sks
Thanks for responding me. I will modify the code as advised by Mr Ajay and attach everything in my next post.
Thanks all
sks
Wed Nov 02 2011, 11:29 pm
@ sks
see the tutorial these all information is given in tutorial in the detail
http://www.8051projects.net/i2c-twi-tutorial/
see the tutorial these all information is given in tutorial in the detail
http://www.8051projects.net/i2c-twi-tutorial/
Fri Nov 04 2011, 12:22 am
Dear Mr Majoka,
Thanks for the reply.
i am attaching the proteus project file with the code. please check and reply. i am not able to correct it. In proteus i can't write more than 8 bytes of data to the EEPROM.
Please help.
Thanks
sks
Thanks for the reply.
i am attaching the proteus project file with the code. please check and reply. i am not able to correct it. In proteus i can't write more than 8 bytes of data to the EEPROM.
Please help.
Thanks
sks
Fri Nov 04 2011, 12:25 am
Dear Mr ExperimenterUK.
I have attached the code with proteus project in my last post as advised by you. please check and help.
Thanks
sks
I have attached the code with proteus project in my last post as advised by you. please check and help.
Thanks
sks
Fri Nov 04 2011, 02:41 am
Page program mode varies from device to device.
If you check the data sheet you will see that the 24c04 can only program eight bytes
at a time in Page program mode.
After eight bytes you need to send a new address or the earlier bytes get over-written.
You can also write in Byte program mode.
Note that 0xa0 is not an address * in* the eeprom it is the address *of* the eeprom.
If you check the data sheet you will see that the 24c04 can only program eight bytes
at a time in Page program mode.
After eight bytes you need to send a new address or the earlier bytes get over-written.
You can also write in Byte program mode.
Note that 0xa0 is not an address * in* the eeprom it is the address *of* the eeprom.
Powered by e107 Forum System