Em 25/3/2011 12:47, M.L. escreveu: > On Thu, Mar 24, 2011 at 10:17 PM, Isaac Marino Bavaresco > wrote: > >> This is the source code for MPLAB C30: >> >> #define PM_WORD_WRITE 0x4003 > > I wouldn't trust C30 to give you what you think you're getting, when > dealing with something that requires instruction-level compilation > accuracy. MPLAB C30 offers the pseudo-function "__builtin_write_NVM()". It does the exact sequence recommended by Microchip, and it is used in Microchip's own boot-loaders. > I say this as someone who generally likes C30. > I'd rewrite the code in assembly and see if it works. The problem was that I didn't have access to a real board at that time, I was using the simulator. Best regards, Isaac --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .