3BABY
Member level 5
- Joined
- Jan 14, 2011
- Messages
- 91
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,286
- Location
- New Zealand
- Activity points
- 2,252
Hi Guys,
seeing i was not successful after many weeks trying to interface I2C EEPROM.. i decided to try Serial Flash.. as i still needed some sort of non-volatile memory for my project.. but did not want to use a whole heap of I/O pins.. my problem:
i have the Write routine, and a Read routine working.. BUT.. i for some reason cannot Read a Byte from a Random Address, or put more correctly i cannot read the actual data that is there.. i can only read (correctly) the Address i just Wrote to..
for instance.. i am writing ASCII "A" to location 37h, "B" to location 38h, "C" to location 39h, but if i read location 37h i read the value of FFh, if i read back location 38h i get the same FFh, and if i read 39h i get ASCII "C"..
the "data in" routine in the code is working properly i know, because i can read the Status Register correctly.. so im certain that is not the issue. when i write o 37h and then read it back i get the correct value (ASCII "A") and the same with 38h and 39h.. but i cannot write to n locations and then read back all the locations correctly.. the only location i read correctly is the last location i wrote to.
whats going on.. i have read through the datasheets over and over and it doesnt seem like im doing anything wrong.. as far as i know the Writes are ok with data is in the locations.. but why can i only read back the last Address i wrote to properly... what special voodoo do i need to make this work?
im using M25P80 8Mbit Serial Flash Memory
Any help would be much appreciated!!
seeing i was not successful after many weeks trying to interface I2C EEPROM.. i decided to try Serial Flash.. as i still needed some sort of non-volatile memory for my project.. but did not want to use a whole heap of I/O pins.. my problem:
i have the Write routine, and a Read routine working.. BUT.. i for some reason cannot Read a Byte from a Random Address, or put more correctly i cannot read the actual data that is there.. i can only read (correctly) the Address i just Wrote to..
for instance.. i am writing ASCII "A" to location 37h, "B" to location 38h, "C" to location 39h, but if i read location 37h i read the value of FFh, if i read back location 38h i get the same FFh, and if i read 39h i get ASCII "C"..
the "data in" routine in the code is working properly i know, because i can read the Status Register correctly.. so im certain that is not the issue. when i write o 37h and then read it back i get the correct value (ASCII "A") and the same with 38h and 39h.. but i cannot write to n locations and then read back all the locations correctly.. the only location i read correctly is the last location i wrote to.
whats going on.. i have read through the datasheets over and over and it doesnt seem like im doing anything wrong.. as far as i know the Writes are ok with data is in the locations.. but why can i only read back the last Address i wrote to properly... what special voodoo do i need to make this work?
im using M25P80 8Mbit Serial Flash Memory
Any help would be much appreciated!!