Keil™, An ARM® Company

µVision® User's Guide

Assign Serial I/O to a PC COM Port

The ASSIGN command allows you to use a PC COM Port as input for an UART in the µVision3 simulator. If you enter the following commands, serial I/O is performed via the COM2: interface of your PC. The STIME variable allows you to ignore the timing of the simulated serial interface.

>MODE COM2 9600, 0, 8, 1    /*9600 bps, no parity, 8 data & 1 stop bit */
>ASSIGN COM2 <S0IN >S0OUT   /*ASC0 output & input is done with COM2:   */
>S0TIME = 0                 /*ignore timing of simulated ASC0 interface*/