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, When simulating an interupt from serial port RX0, I cannot succeed in affecting SBUF0 to a local variable, the watch window shows this variable to 0 even if SBUF0 is set. Here is my code : static void serial_port_0_isr (void) interrupt COM0_VECT { unsigned char data_received; if (RI != 0) { RI = 0; data_received = SBUF0; ... } } on the above code, data_received is always 0 even if SBUF0 is set. To set SBUF0, I use the serial port window from the simulator. any idea would be appreciated.
well I'm new to keil and 8051, I was assuming the C compiler is able to use correct banking, which becomes transparent to the programmer, at least at the C level !? Am I wrong ? Do I have to manage banking in C ?
"Am I wrong?" Yes "Do I have to manage banking in C?" Yes - see the using keyword extension, and the REGISTERBANK Control Directive