We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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.
I think 0X01B is playing a vital role here. Which is a vector location for interrupt 1. Hmmmm. It's certainly an interrupt vector, but it isn't for interrupt 1. Take a look at http://www.keil.com/support/man/docs/c51/c51_le_interruptfuncs.htm. Jon
Sorry but I ment the same. Timer 1 interrupt vector location. Thanks anyway. Hoping for this help in future also.