Hello Every one i am new to keil but got the basic knowledge and i am going to create a program in which when ever the Serial (RI) interrupt occurs then SBUF must send its contents to any Globle variable but i dont think that its as simple as its look like, cuz even in Keil's Simulator the contents of SBUF are not accesible like in the interupt i use statement like
var=SBUF;
but the var is not gaining the value could any one please help me ?
i am using that program ......
void RXTX_int(void) interrupt 4 //Serial interrupt ISR { if(RI==1) { RI=0; //Reset receive data bit var=SBUF; // Global Variable to be used in main() } if(TI==1) { TI=0; //Reset transmit data bit } }
show the initialization
Erik