That's the problem then! Replace this STARTUP CODE to this STARTUP CODE 0x0000 Tamas On 10/09/06, Lembit Soobik wrote: > > The STARTUP is at EF2: > .cinit romdata 0x00002a program 0x000002 > > PROG1 code 0x00002c program 0x000cda > > PROG3 code 0x000d06 program 0x000170 > > PROG2 code 0x000e76 program 0x00007c > > STARTUP code 0x000ef2 program 0x00000c > > which doesnt help me much, but I did the following now: > > I opened the Program memory window. It shows from 0000 to 0028 all FFFF > (NOP) > > then the next lines are > > 0000 NOP > > 0152 PGA_table > > 2051 ADDWFC 0x51, W, ACCESS > > 020 > > when I do a reset in the simulator and then single step through the > program, > it walks through all these NOP and then through the above statements, > which > tells me it does execute the table data. > > I am going to do now the same with the version where I have put the tables > at the end. > > Lembit > > > > From: "Lembit Soobik" > > To: "Microcontroller discussion list - Public." > Sent: Sunday, September 10, 2006 11:51 AM > Subject: Re: [PIC] defining data in Program Memory > > > > oh yes, Jan-Erik, > > I do believe you. And I do understand what you say. > > and I am working on it to find out from the map file and the lst file > what > > went wrong. > > just not much success so far, except the startup points are different in > > the > > version which fails and the one which works (with the tables at the > end). > > but I am working on it :) > > > > Lembit > > > > > > ----- Original Message ----- > > From: "Jan-Erik Soderholm" > > To: > > Sent: Saturday, September 09, 2006 8:52 PM > > Subject: RE: [PIC] defining data in Program Memory > > > > > >> Lembit Soobik wrote : > >> > >>> with dataPoint and dataLines (they remain 0x00) > >>> and in case of TXSTA (the last line above), > >>> instead of moving the 0xA4 into TXSTA, it adds it to > >>> the 2 which already was in TXSTA, resulting in 0xA6. > >> > >> Well now, you *DO* remember what I wrote before, right ? > >> > >> One of the "values" in your table, translates (*if* executed > >> as if it would have been "code") into an "ADDWFC with result > >> put back into 'f'". > >> > >> Doesn't that ring a bell ??? > >> > >> I bet that you have some code that doesn't ends properly > >> and let the processor run straight into your "table". > >> > >> What is so hard with checking the MAP file !!! > >> > >> The point from Tamas about checking *where* your "STARTUP" > >> code ends up in memory is of course also highly rellevant... > >> > >> Best Regards, > >> Jan-Erik. > >> > >> > >> > >> -- > >> http://www.piclist.com PIC/SX FAQ & list archive > >> View/change your membership options at > >> http://mailman.mit.edu/mailman/listinfo/piclist > >> > >> > >> -- > >> No virus found in this incoming message. > >> Checked by AVG Free Edition. > >> Version: 7.1.405 / Virus Database: 268.12.2/442 - Release Date: > >> 08.09.2006 > >> > >> > > > > -- > > http://www.piclist.com PIC/SX FAQ & list archive > > View/change your membership options at > > http://mailman.mit.edu/mailman/listinfo/piclist > > > > > > -- > > No virus found in this incoming message. > > Checked by AVG Free Edition. > > Version: 7.1.405 / Virus Database: 268.12.2/442 - Release Date: > 08.09.2006 > > > > > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- unPIC -- The PIC Disassembler http://unpic.sourceforge.net -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist