Hi Mike Thanks you very much for your answer.=20 Here is the c function that works now for me: unsigned int ReadFlash( unsigned int address ) { EEADRL =3D address%256; EEADRH =3D address/256; EEPGD =3D 1; // program memory RD =3D 1; // read asm("nop"); asm("nop"); return EEDATH*256 + EEDATL; } It was the point that only a semicolon is not a nop in the compiled code. S= o it worked during debugging but not during the normal release version. I used a lot of time to solve this now and I got also a wrong answer from the microchip support that sad that the current compiler does not support this functions. Many thanks again you helped me a lot. Adrian --=20 View this message in context: http://old.nabble.com/Read-Flash-of-PIC16F916= -tp33623645p33663598.html Sent from the PIC - [PIC] mailing list archive at Nabble.com. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .