Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

programming AT29LV256

Status
Not open for further replies.

uzbekman

Computer
Apr 4, 2004
2
US
Has anyone tried to program AT29LV256. I am having a hard time writing into it? I can read fine. Any help would be appreciated. Thanks.
 
Replies continue below

Recommended for you

What problem are you having? Have you read the datasheet? Have you debugged the write algorithm? The major difference with this part is that you have to program a complete sector at once, otherwise its much the same as any flash mem.
 
Yes I have read the datasheet and everything else. I am not an experienced programmer in this field. I think that is the reason I am not having luck in writing to the memory. I understand that you have to program it in chunks. I have been trying to debug it but it is not yet working. Is it possible that you could take a quick look at the code if I sent it to you? Thanks for your help.
 
Did you issue the write commandS correctly? Remember, writing to flash is NOT like writing to sram. You have to tell the flash that you are about to write some data, and then write the data. Also, you can only write 0's, not 1's. Therefore, if you need to change 1 bit from 0 -> 1, then you will need to copy out the entire contents of the block, erase the block, and write back the block with changed bit.
 
Hi, looking at your code wouldn't help much without the hardware. The simplest way is to assemble the packet of bytes in a buffer (command and data) in the right order. You can run that on your simulator and check that it works correctly. Then you just need to write each byte in turn to the memory, wait a few mS for the memory to do its stuff and check your results. You can add busy checking afterwards.
 
Maybe creating a write word routine / function that takes the address to be written, the desired data, and a delay value would be a more robust solution. Inside the function, the write command can be performed, and delay x ms before issuing the data write. The only reason I suggest this is to keep the buffer size as small as possible, and you can utlize looping (to reduce code complexity).

Just a thought....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top