Hi All, I have to write to flash memory 2 pocket of data one of them is always 14 b= ytes and the second one may very 110-128 bytes of data. the way flash memor= y works is I can't rewrite like EEPROM is. in order to rewrite entire sector needs to = be erased and after erase all cells becomes logic 1. the reason I mention t= his is if verification failed I have to ignore and go next. in my case I ha= ve 2 uart and one of them is 14 byte rx data coming in and the second one 1= 20 byte rx. as soon as the data comes in I have to store in to flash. =A0al= l data are mixed =A014 bytes or 120 bytes can be mixed order and different = information. =A0the size of flash is 4000000 bytes. the way I see it easies= t way to save data is to define maximum data size lets say 130 bytes and st= ore data every 130 bytes regardless of 14 bytes or 120 bytes is coming in. = so the data will be stored every 130 bytes and to read back it will be ever= y 130 bytes witch makes it easy to read. another way I was thinking is to a= dd start and end character and when it comes to read back i just look for s= tart and end character. total record can go up to 25000. I am not sure if I explained clearly. on top of this since i already knew about flash I = also added 256kb eeprom to store location information where was last saved.= my question is what's the best way do you think to store data in flash and= read back all.=A0 any idea? thanks Andre =A0=A0 --=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 .