Gabriel
Joined: 03 Aug 2009 Posts: 1067 Location: Panama
|
Write protect on a 25LC256 |
Posted: Fri Oct 22, 2010 12:21 pm |
|
|
hi all,
I'm developing a driver for a 25LC256 that i will use in a data logger.
I can read, and write to the memory array just fine.
Although I've plunged into the datasheet over and over i can't understand the write protect features of this chip.
The chip has a Write enable command (WREN) which sets the write bit on the status register. this works on my code just fine too.
My problem is that i would like to use the block memory protection and the status register write protection as well.
I have enabled the hardware protection feature which enables the use of the WP pin on the chip.
My logic is a follows:
enable writes to the status register with the WP pin
reset the memory Block WP bits..
write to the memory array.
enable writes to the status register with the WP pin
set the block protection bits.
disable writest to the stat register with the WP pin
My problem so far is that when i send a WREN command
I can still write to the memory array even though i have set the
WP for the memory blocks
According to the data sheet as long as these bits are set i should never be able to write to the memory array...
What am i missing?
i will post my code later tonight when i get home...
I have made a small test program and the mentioned driver.
But i thought i post this PRE information to see if maybe someone can provide any help before i post the code... _________________ CCS PCM 5.078 & CCS PCH 5.093 |
|