Keil Logo


Information in this article applies to:

  • µVision Version 2 and Later


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

Did this article provide the answer you needed?
Not Sure
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.