Peripheral Simulation

Dialog boxes which display and allow you to change peripheral configuration.

VTREGs (Virtual Target Registers) which support I/O with the peripheral.

These simulation capabilities are described below.

Serial Interface ASC0 Dialog

The Serial Interface ASC0 dialog displays and allows you to edit
the configuration of the Asynchronous/Synchronous Serial Interface.
The controls in this dialog are separated into several logical
groups.

The Mode group contains the following controls.

Mode displays and allows you to change the serial
interface mode of operation (data length and synchronous or
asynchronous).

Baudrate is the actual baudrate.

S0BG is the ASC0 Baudrate Generator Reload Register
(SFR).

S0CON is the ASC0 Control Register (SFR).

S0TBUF is the ASC0 Transmit Buffer Register (SFR).

S0RBUF is the ASC0 Receive Buffer Register (SFR).

S0R enables the baudrate generator.

S0STP specifies the number of stop bits (cleared for 1,
checked for 2).

S0REN enables serial data reception.

S0LB enables loopback mode.

S0BRS specifies how the baudrate is generated (cleared
to divide clock by reload+constant, checked to reduce serial clock
to 2/3).

S0ODD specifies the parity to use (cleared for Even,
checked for Odd).

The Error Detection group contains the following
controls.

S0OEN enables overrun checking.

S0OE indicates an overrun error was detected.

S0FEN enables frame checking.

S0FE indicates a framing error was detected.

S0PEN enables parity checking.

S0PE indicates a parity error was detected.

The Interrupts group contains the following controls.

S0TIR is the ASC0 transmit interrupt request flag.

S0RIR is the ASC0 receive interrupt request flag.

S0EIR is the ASC0 error interrupt request flag.

S0TBIR is the ASC0 transmit buffer interrupt request
flag.

The Ports group contains the following controls.

P3.10 is the state of the TxD0 output pin.

DP3.10 is the data direction register for the TxD0
pin.

DP3.11 is the data direction register for the RxD0
pin.

S0IN VTREGData Type: unsigned int

The S0IN VTREG represents the ASC0 serial input of the simulated
microcontroller. Values you assign to S0IN are input to the serial
channel. You may assign input using the command window. For
example,

S0IN='A'

causes the simulated microcontroller serial input to receive the
ASCII character A. If you want to use the S0IN VRTEG to simulate
reception of multiple characters, you must be sure to delay for at
least one character time between successive assignments to S0IN. This
may be done using a signal function. For example:

You may use the S0IN VTREG to input more than 8 bits of data. For
example,

S0IN=0x0123

inputs a 9-bit value. In addition to the S0IN VRTEG, the serial
window allows you to input serial characters by simply typing. Serial
characters that are transmitted byt the simulated microcontroller
appear in the serial window.

S0OUT VTREGData Type: unsigned int

The S0OUT VTREG represents the serial output from the simulated
microcontroller. Whenever the simulated serial port transmits a
character, the value transmitted is automatically assigned to S0OUT
(which is read-only). You may read the value of S0OUT to determine
the character transmitted by your simulated program. For example,

S0OUT

outputs the value of the last character transmitted. You may use
the S0OUT VTREG in a script to process transmitted data. For
example,

Important information

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.