µVISION DEBUGGER: USING THE SIN VTREG
Information in this article applies to:
What is the SIN/SIN0/SIN1 VTReg and how do I use it?
When simulating a target microcontroller, the Keil µVision Debugger provides Virtual Target Registers (VTRegs) to allow you to provide input to the pins of the simulated device.
The SIN, SIN0, and SIN1 VTRegs represent the inputs to the on-chip serial port of the MCU. The SINx form is used for MCUs with multiple serial ports.
So, if you have configured a serial port, the following commands (typed in the debugger's Command Window) input a value into the serial stream. Note that you may also use the Serial Window in the µVision Debugger to input characters for the serial port.
The following command injects the letter A into the simulated serial input.
SIN = 'A'
The following command injects the 9-bit value 19Ex into the simulated serial input.
SIN1 = 0x019E
Many of the VTREGs for a microcontroller are listed in the Keil online Device Database.
Go to the Device Database, select the microcontroller, look under 'Simulated Features' and select the peripheral in question. The VTREGs for that peripheral are listed at the end of the peripheral simulation details window.
For example, some microcontrollers may use the SxIN VTREG instead of the SINx VTREG.
The following Discussion Forum threads may provide information related to this topic.
Last Reviewed: Thursday, December 15, 2005
of your data.