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 ?
"got the basic knowledge"
Does this include understanding that SBUF is not one register, but two independant registers - one read-only, and the other write-only...
"the var is not gaining the value"
What do you mean by that??
Have you tried looking at the examples provided?
Well Sir Andy i know that there are two of them means one is read only and the other is write only but i want to access the SBUF which holds the Serial Recivings and i want to access the contens of that SBUF but thats not working because that SBUF is not giving its value to any variable in my example var is variable name.......
i have tried one example but not working even in the simulator
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