Gerhard, I was wondering can I use your assembly code before main()? #asm org 0xF000000 ;EEPROM start address de 0x59,0x43,0xFF,0x67,0xFF,0x77,0xFF,0x76 de 0xF5F,0x65,0xFF,0xFF,0xFF,0x55,0xAA,0xAB #endasm for some reason Mplab doesn't recognize #ROM 0x2100={0x01,0x02,and so on} using CCS compiler I was wondering to replace it with assembly it looks pretty good. thanks Andre -----Original Message----- From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu]On Behalf Of T. Uzri Sent: Thursday, March 08, 2007 6:33 PM To: Microcontroller discussion list - Public. Subject: Re: [PIC]: EEPROM pre-setting directives This is how EEPROM is set in MPASM org 0xF000000 ;EEPROM start address de 0x59,0x43,0xFF,0x67,0xFF,0x77,0xFF,0x76 de 0xF5F,0x65,0xFF,0xFF,0xFF,0x55,0xAA,0xAB ----- Original Message ----- From: "Andre Abelian" To: "Microcontroller discussion list - Public." Sent: Thursday, March 08, 2007 9:31 AM Subject: RE: [PIC]: EEPROM pre-setting directives > Gerhard, > > I use ICD2 without enabling "Preserve EEPROM on Program" > I couldn't program EEPROM Data. Do you use ICD2? > How do you program EEPROM data? > > thanks > > Andre > > > > -----Original Message----- > From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu]On Behalf > Of Gerhard Fiedler > Sent: Thursday, March 08, 2007 4:42 AM > To: piclist@mit.edu > Subject: Re: [PIC]: EEPROM pre-setting directives > > > Andre Abelian wrote: > > > Hi-Tech C example: > > __EEPROM_DATA(0x01,0x02,and so on); > > > > in CCS C example: > > #ROM 0x2100={0x01,0x02,and so on} > > address 0x2100 is for 16f876a it might be different for 452. > > These options place EEPROM content in the hex file. > > > > In MPLAB you have to select "Preserve EEPROM on Program" > > If you select this option, the above directives will not have any effect. > > When "Preserve EEPROM on Program" is selected, MPLAB reads the EEPROM > contents into the EEPROM buffer before programming, overwriting whatever > was in your hex file, and then programs the previous contents back. > > If you want your hex file contents programmed, do /not/ select this option. > > Gerhard > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist