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.
I checked data addresses from D:0x00 to D:0x1F which should show me all R0 to R7 registers in all 4 banks. When affecting SBUF0 to R7, none of the R7 registers is affected, I mean addresses 07, 0F, 17 and 1F left unchanged ! The PSW register value is 00 and should therfore affect the address 07. I also tried to add "using 1" in my serial port ISR definition, now the PSW value is 08, pointing to register bank 1, as expected. Unfortunately R7 in this bank is still not affected ! joe