When the peripheral is connected to the USB interface of the host, the host will detect the new hardware. At this time, you need to install a virtual serial port (VCP) driver, which can be downloaded from FTDI's website for free. This driver is suitable for different operating systems such as WINDOWS98/2000/ME/XP. What designers need to complete is to write an application program of virtual serial communication, and access the virtual serial port (VCP) as a standard serial port. In the software part of the design, the serial communication MSComm control provided by VB or VC language can be used to write the application program. Take VC language as an example to introduce how to write an application program, mainly introducing the setting of MSComm control and the writing of serial message event MSComm. CommEvent response function. 1)MSComm control settings: When programming, the virtual serial port is usually set to COM3, namely MSComm. SetCommPort to 3, MSComm. SetSettings to "9600, n, 8, 1" (this rate is the default setting, in fact, VCP drivers always transmit data at the fastest rate); Set the switch state of COM3 through MSComm. SetPortOpen reads or outputs data through MSComm. SetInput and MSComm. Set the value of MSComm when reading data. The r threshold is 1. 2) When data is transmitted to PC, serial message event MSComm. Immediately trigger CommEvent and automatically read the data of COM3. The following is an application program written by the author of this article, which deals with the OnComm function of this serial message event. Its function is to receive data from the serial port and display it in the edit box. Data can be sent automatically or manually, which is set by the user according to the specific situation.