In the debugger of uVision I would like to simulate the incomming of one data on the serial port. The problem is: when I change the value of SBUF, the debugger thinks that I want to send a data because the debugger automatically set the TI bit. So I would like to know how I can simulate a data reception with uVision 2 debugger ? Thanks
The debugger is doing exactly the right thing. SBUF is a read/write register with a direction latch. When you write to it (change it) the value goes to an output shift register and sets TI when the stop bit gets shifted out. When you read it you get the results of the last char shifted in. You cannot stuff something into SBUF to simulate a received char. Read from an array (that you create) instead of SBUF to simulate received chars. - Mark
Take a look at the VTREGs for SIN and SOUT. If you want to simulate an input to the serial port, set SIN = 'A'. This simulates reception of the character A. Keil Support
How to get it(free) for my computer?Thanks