On 22/12/2013 06:25, Andre Abelian wrote: > Hi All, >=20 > I have to write to flash memory 2 pocket of data one of them is always 14= bytes and the second one may very 110-128 bytes of data. the way flash mem= ory works is > I can't rewrite like EEPROM is. in order to rewrite entire sector needs t= o be erased and after erase all cells becomes logic 1.=20 Does your flash chip distinguish between PAGE WRITE and PAGE PROGRAM commands? Some do not need you to rewrite all of the bytes in a page. I posted an answer elsewhere that might be useful to you if your flash chip is similar: http://electronics.stackexchange.com/questions/86019/how-to-read-write-in-m= 25pe80-using-pic18f67k22-controller/86093#86093 David --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .