| |||||
Technical Support Support Resources
Product Information | µVISION DEBUGGER: SERIAL LOOPBACK SCRIPTInformation in this article applies to:
QUESTIONI need to simulate a serial loopback cable for part of my application diagnostics. Is this possible to do in the µVision Simulator? ANSWERYes. Basically, you need to create a signal function that waits for a write to the SOUT VTReg. When this VTReg is written, your script may read it and store the result in the SIN VTReg. For example:
signal void sio_loopback (void) {
while (1) {
wwatch(SOUT);
printf ("Looping Back 0x%2.2X.\n", SOUT);
SIN = SOUT;
}
}
The printf statement in this script notifies you (via the Command Window) that the script executed. SEE ALSO
Last Reviewed: Monday, March 28, 2005 | ||||
| |||||