Interesting, this is THE PICLIST and my PIC post didn't receive any response yet, although there are several ongoing discussions under other tags. The PIC tag got just 2 messages in the last 36 hours. Perhaps it's time to change the name of the list to "OT: random discussions loosely related to technology." Isaac Em 24/3/2011 23:17, Isaac Marino Bavaresco escreveu: > Dear All, > > I am writing a boot-loader for the PIC24FJ192GA108 and I'm facing a > problem. Although the data-sheet (DS39905E) says that it can be > programmed one word at a time (page 63), the simulator (MPLAB SIM) keeps > issuing the following error in the "MPLAB SIM" pane of the output window: > > "CORE-W0006: An Invalid Programming mode was selected. No Programming > operation occurred" > ... > "MAXIMUM number of warnings/errors exceeded 200, program execution halted= .." > > > This is the source code for MPLAB C30: > > #define PM_WORD_WRITE 0x4003 > ... > NVMCON =3D PM_WORD_WRITE; > > TBLPAG =3D (unsigned char)( Address >> 16 ); > > __builtin_tblwtl( (unsigned short)Address, ValueLow ); > __builtin_tblwth( (unsigned short)Address, ValueHigh ); > > asm( "disi #5" ); > > __builtin_write_NVM(); > > > I generally trust the MPLAB SIM, but in this specific case it seems to > have a bug. Did somebody face this same problem already? > > > 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 .