Discussion in "8051 Discussion Forum" started by    sks    Oct 31, 2011.
Mon Oct 31 2011, 09:50 pm
#1
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
Tue Nov 01 2011, 03:50 pm
#2
Hello Mr Ajay,
Please help
sks
Tue Nov 01 2011, 09:58 pm
#3
How about attaching the full Proteus project files.
Wed Nov 02 2011, 02:39 am
#4
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]
Wed Nov 02 2011, 02:40 am
#5
[Topic moved to 8051 Discussion forum]
Wed Nov 02 2011, 11:25 am
#6
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
Wed Nov 02 2011, 11:29 pm
#7
@ sks
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
#8
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

Fri Nov 04 2011, 12:25 am
#9
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
Fri Nov 04 2011, 02:41 am
#10
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.


Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Bobbyerilar
Thu Mar 28 2024, 08:08 am
pb58
Thu Mar 28 2024, 05:54 am
Clarazkafup
Thu Mar 28 2024, 02:24 am
Walterkic
Thu Mar 28 2024, 01:19 am
Davidusawn
Wed Mar 27 2024, 08:30 pm
Richardsop
Tue Mar 26 2024, 10:33 pm
Stevencog
Tue Mar 26 2024, 04:26 pm
Bernardwarge
Tue Mar 26 2024, 11:15 am