How do you write to the upper pages of the 24LC256 EEprom chip?
dmacq
Posts: 11
Hi:
I've hit the wall again
I think my basic understanding of the 24LC256 EEprom chip is flawed.
I've had great success using Jon Williams' EEprom writer code -- as long as I stick to the first page of the EEprom.
But writing to subsequent 7 pages has defeated me.
From what I can gather from the data sheets the upper pages are selected by bits in the control byte.
I thought it would be a simple matter of changing which bits were set in the DevAddr constant such as:
DevType CON %1010 << 4 ' device type
DevAddr CON %000 << 1 ' address = %000 -> %
and changing it to
DevAddr CON %001 << 1 ' for page 1
DevAddr CON %010 << 1 ' for page 2
etc.
But that doesn't work at all.
Writing and Reading to the first page works great. But I'm clearly missing something. Is here (yikes) a hardware component?
macq
I've hit the wall again
I think my basic understanding of the 24LC256 EEprom chip is flawed.
I've had great success using Jon Williams' EEprom writer code -- as long as I stick to the first page of the EEprom.
But writing to subsequent 7 pages has defeated me.
From what I can gather from the data sheets the upper pages are selected by bits in the control byte.
I thought it would be a simple matter of changing which bits were set in the DevAddr constant such as:
DevType CON %1010 << 4 ' device type
DevAddr CON %000 << 1 ' address = %000 -> %
and changing it to
DevAddr CON %001 << 1 ' for page 1
DevAddr CON %010 << 1 ' for page 2
etc.
But that doesn't work at all.
Writing and Reading to the first page works great. But I'm clearly missing something. Is here (yikes) a hardware component?
macq
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
Let's say vital.
But what I can't figure out is how to write to addresses higher than 32767
How do I store data at address 123456? or 215689?
I was sure it had something to do with those control bytes...
Post Edited (dmacq) : 7/26/2004 6:33:56 PM GMT
In fact, I just opened the docs and it says right on page 1: 32K x 8·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
I've just discovered a parallax application note that suggests I've been misled (for sometime ) by the 24LC256's name.
It says its merely a 32kb eeprom... in which case I've already max'ed it out.
Do I really need to buy seven more of these things just to give me my 256k?
http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&category=50914&item=3814628072&rd=1&ssPageName=WD1V
Hope the link works...I don't think Parallax has this particular chip, although they do have the 8k & 16k chips listed.· But good price, and I have purchased form this guy...He's reputable.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Knight Designs
324 West Main Street
P.O. Box 97
Montour Falls, NY 14865
(607) 535-6777
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Knight Designs
324 West Main Street
P.O. Box 97
Montour Falls, NY 14865
(607) 535-6777
Jon Williams
Applications Engineer, Parallax
Dallas Office
as i read the code from your posted program looks to me (newbee) that i can use the i2c memories chip with a standard bs2p.
I put the question because i just bought some pic16c57c from parallax and i discovered later that my original code for bs2p24 does not works because the chip does not have i2c command.
How i can convert the old program from bs2p24 to the bs2p. there is any software to do that , or i have to do it line by line manualy.
Thank you
Ion George
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
I did a mistake in writing on my previous question. I wanted in fact to mean bs2 but i still have a big cloud in my head between daily work and moolighting the stamps, and my fingers are faster then my taughts.
I will try your code today.
Thanks for help
Ion