Lembit, In the output window maybe there is a message why the emulation stopped. Is it the 'stack underflow'? Both times the same message? Tamas On 07/09/06, Lembit Soobik wrote: > > well no, I dont try to run the data as code. > I have the tables on the right place, as you can see, and all I do is > hit the RUN button of the simulator after doing a BUILD ALL successfully. > then what I see is that it doesn't run. > Instead the green arrow shows up on the line data, just as if there were a > breakpoint. > (there is no breakpoint). > > Now, if I change the data in the table from hex to literal, build all and > run, it runs perfectly fine. > > Lembit > > ----- Original Message ----- > From: "Jan-Erik Soderholm" > To: > Sent: Thursday, September 07, 2006 2:33 PM > Subject: RE: [PIC] defining data in Program Memory > > > OK. I see. > > So somewhere in your code you have some > code that reads from the PAGA_table table, right ? > Is it that code that doesn't work (depending on > what the table looks like) ? > > I'm still not sure why your code "stops" > in the data table ? It should never be there. > If you're not trying to run your "data" as "code" > that is. > > Well, I'm not sure what you mean with "stop" either... :-) > > Jan-Erik. > > -----Original Message----- > From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu]On > Behalf > Of Lembit Soobik > Sent: den 7 september 2006 14:13 > To: Microcontroller discussion list - Public. > Subject: Re: [PIC] defining data in Program Memory > > > Jan-Erik, > > It is a pretty long program, which I am working on. > the program works, and I am adding some more functionality. > the program contains a table already, which has only literal data, > like for > example > data "example data" > data "more data " > and so on. > now I have added a second table with literal data and that works too > (in the simulator and also in the target system.) > now I have changed the data in the second table to contain hex values. > and this is where i get the problem. > > If it really helps, I can send you the program, but for now maybe > some > extract can help to make sense: > LIST P=3D18F4520, F=3DINHX32 ;directive to define processor and file > format > #include ;processor specific variable definitions > CONFIG OSC =3D HS > > CONFIG BOREN =3D OFF > CONFIG PWRT =3D ON ; f=FCr debugger =3D MPLAB SIM > CONFIG STVREN =3D OFF > CONFIG LVP =3D OFF > CONFIG DEBUG =3D OFF > CONFIG CP0 =3D OFF > CONFIG CP1 =3D OFF > CONFIG CP2 =3D OFF > CONFIG CP3 =3D OFF > CONFIG WRT0 =3D OFF > CONFIG WRT1 =3D OFF > CONFIG WRT2 =3D OFF > CONFIG WRT3 =3D OFF > CONFIG EBTR0 =3D OFF > CONFIG EBTR1 =3D OFF > CONFIG EBTR2 =3D OFF > CONFIG EBTR3 =3D OFF > > #define scroll_dir TRISA,4 > #define scroll PORTA,4 ;Push-button RA4 on PCB > #define select_dir TRISB,0 > #define select PORTB,0 ;Push-button RB0 on PCB > #define EinTris TRISB,4 > #define AusTris TRISB,0 > #define TrigTris TRISB,1 > > EXTERN LCDInit, temp_wr, d_write, i_write, LCDLine_1, LCDLine_2 > EXTERN UMUL0808L, UDIV1608L, AARGB0, AARGB1, BARGB0 > ssprw macro ;check for idle SSP module routine > movlw 0x00 > andwf SSPCON2,W > sublw 0x00 > btfss STATUS,Z > bra $-8 > > btfsc SSPSTAT,R_W > bra $-2 > endm > > variables UDATA > ptr_pos RES 1 > ptr_count RES 1 > temp_1 RES 1 > .... > STARTUP CODE > NOP > goto start > NOP > NOP > NOP > PROG1 CODE > PAGA_table > data 'R', 0x01, 'Q', 0x00, .0 > data 'R', 0x01, 'Q', 0x01, .16 > ; data 'R', .1, 'R', .3; .32 > ; data 'R', .1, 'R', .4; .48 > > > stan_table ;table for standard code > ; "XXXXXXXXXXXXXXXX" > ; ptr: > data "Fenster Nord Azi" ;32 > data "West-Fenster Azi" ;48 > data " Achtung: offen " ;64 > data "- geschlossen - " ;80 > > > start > ;------------------------------Initialisieren=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > bcf INTCON2, 7 > movlw 07h > movwf ADCON1 > movlw 07h > movwf CMCON > bcf AusTris ; zum Testen werden Pulse ausgegeben > bsf PORTB, 0 > bcf TrigTris ; zum Testen werden Trigger-Pulse ausgegeben > bsf EinTris ; Eingang vom EIBus > ; > > ----- Original Message ----- > From: "Jan-Erik Soderholm" > To: > Sent: Thursday, September 07, 2006 1:30 PM > Subject: RE: [PIC] defining data in Program Memory > > > > Lembit Soobik wrote : > > > >> When I run the code... > > > > *WHAT* "code" ?? > > > > You have only showed some table data. > > Where is the code ? > > > > 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.1/440 - Release Date: > 06.09.2006 > > > > -- > 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 > > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.405 / Virus Database: 268.12.1/440 - Release Date: 06.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