Hi all, I am facing a problem while debugging the code. The following error is comming and it is jumping to disassembly Error message is *** 65: access voilation at 0X001B: no 'execute/read' permission This location is Timer 1 interrupt routine. My code is as follows Following is a part of total code. <pre void sendserial(char); void init_run(void); //void init_stop(void); //void send_response(void); void main(void) { P1 = 0x00 ; //Initialise P1.0 to P1.3 used as output & //Initialise P1.4 to P1.7 used as input SP = 0x50; SCON = 0x50; //Set Serial IO to receive.And select mode1 TMOD = 0x21; //configure timer for the correct baud rate TH0 = 0x00; TL0 = 0xF7; TH1 = 0xFD; //TH1: reload value for 9600baud @11.059MHz TL1 = 0xFD; //TH1: reload value for 9600baud @11.059MHz TCON = 0x00; //Set timer to not running T2CON= 0x00; T2MOD= 0x02; // TI = 0; //clear transmit interrupt flag // RI = 0; //clear receive interrupt flag // TR0 = 1; //start timer 0 TR1 = 1; //start timer to Receive TR2 = 0; IE = 0xFA; ET0 = 1; //enable timer 0 interrupt // ET1 = 1; EA = 1; //Enable global interrupt ES = 1; //Enable serial interrupt PS=1; DE=0; while(1) { if(run) { sendserial('R'); init_run(); } if(stop) { sendserial('S'); //init_stop(); } if(query) { sendserial('Q'); //send_response(); } } } void sendserial(char command) { int j; *(pos_ack+3) = command; sencnd = 0; sendchr = 7; for(j=0; j < 7; j++) { *(send_buf+j) = pos_ack[j]; DE = 1; TI = 0; } } void init_run(void) { run=0; TH2=0x13; TL2=0x88; Iref=0xff; Delay=5000; TR2=1; Stat=1; } /*void init_stop(void) { } void send_response(void) { } Thanks in advance.
"The only reason you'll get an Error 65 is if you enable an interrupt for which there is no defined vector, if you access memory which is not declared (by a variable), or if your program runs amuck and jumps to a location in memory where no program code is located." That was my point, really. If you get the interrupt number wrong on the ISR definition but enable the interrupt you thought you'd defined an ISR for, when that interrupt fires the CPU vectors to a location that either has no code or the wrong code. I only mentioned this as I seem to remember this being the solution to similar questions on the forum. I have no personal experience of the error in question, and little experience using the debugger.