EN / 中文

thermal actuator, thermostatic element, thermostatic valve, thermostatic radiator, thermoelectric actuator

  • Home
  • Company
    • About Us
    • Product Introduction
    • Application & Solution
  • Innovation
  • Product
    • Customized Thermal Actuator/Valve
      • Thermal Actuator for Marine Solution
      • TV/HAT Temperature Control Valve
      • Thermoactuator
    • T&P Relief Valve
      • Standard T&P Relief Valve
      • T&P Relief Valve for Air Compressor
      • T&P Relief Valve for Steam Boiler
    • Probe for T&P valve
    • Thermoelectric Actuator
      • 500 series thermoelectric actuator
      • 501 series thermoelectric actuator
      • 504 series thermoelectric actuator
    • Thermostatic Control Valve
      • 300 series
      • 301 series
    • Thermostatic Mixing Valve
      • 0829
      • 5464
    • Freeze Protection Valve
    • VAV Diffuser Thermostatic Element
    • Automobile Thermal Control
      • Auto Engine Thermal Control
      • Diesel Filter Element
  • News
  • Contact
  • Chinese
  • Home
  • News
  • thermal actuator News
  • Realization and Simulation of virtual serial communication for STM32 microcontroller
 

Realization and Simulation of virtual serial communication for STM32 microcontroller

by admin / 2019/09/03 / Published in thermal actuator News

Aiming at the serial communication of STM32 microcontroller, a simulation method of virtual serial communication is proposed. The transmission and reception of serial communication are simulated by the combination of virtual serial port software, serial debugging assistant and Keil software.

Realization and Simulation of virtual serial communication for STM32 microcontroller_no.232

  The results show that the serial port of STM32 microcontroller can send and receive data normally by software simulation and verify the normal operation of the serial port without hardware. This method does not need hardware development board and simulator, nor does it concern whether the computer has serial port, but uses virtual serial port software (VSPD) to create virtual serial communication interface. Therefore, VSPD software, serial debugging assistant and Keil uVision 5 software need to be installed on the computer. VSPD creates virtual serial ports in pairs. These virtual serial ports are exactly the same as real physical serial ports in use.
The virtual interconnection links the created pairs of serial ports together, which is equivalent to connecting two serial ports with data lines, thus realizing the simulation of sending and receiving data. The number of new virtual serial ports is unrestricted, so the number of serial ports can be easily expanded. After opening the software, thermostatic element manage ports select two serial numbers on the interface that appears and click Add pair, then two virtual serial ports COM1 and COM2 are displayed under the Virtual ports of the Serial Ports Explorer section on the left side of the interface. These two serial ports are the created serial ports. If you need to continue to add the serial ports, just continue to select the serial port under the management ports and click Add pair. The simulation and debugging of USART can be realized by binding virtual serial port COM1 and COM2 with USART in STM32 microcontroller. After compiling and linking the compiled serial port program to generate executable files, debugging and simulation are carried out in Dubug mode. The MODE command sets the virtual serial port parameters to be bound. COMx (x = 1,2,3.
..
) For a virtual serial password, baudrate is the effective baud rate of the serial port (e.g. 1200, 2400, 9600, or 19200), parity is the parity check setting (parity is 0 for no check bit, parity is 1 for odd check, and parity is 2 for even check), databits is the number of data bits (8 for 8 bits, 7 for 7 bits), and stops are the number of stop bits.

Realization and Simulation of virtual serial communication for STM32 microcontroller_no.216

  Number (1 for 1 bit stop bit, 15 for 1.5 bit stop bit and 2 for 2 bit stop bit). The ASSIGN command binds the virtual serial port created by the computer to the simulation serial port of the microcontroller. Channel is a virtual serial COMx (x = 1,2,3…
Inreg and outreg are the input and output of MCU serial port (inreg is SxIN, outreg is SxOUT, x = 1, 2, 3). When simulating multiple serial ports, because there are many virtual serial ports created, in order to avoid entering commands in each simulation, a configuration file USART.txt can be created, and the above MODE and ASSIGN commands can be written successively. If multiple serial ports need to be bound, multiple groups of MODE and ASSIGN commands need to be written, with the same format and specific parameters according to the actual program.
Require settings. After creating the configuration file, change the suffix to. ini, such as USART. txt to USART.

Realization and Simulation of virtual serial communication for STM32 microcontroller_no.112

  ini in this article. When setting the Keil parameter, change the Initialization File path in the Debug tab.

Realization and Simulation of virtual serial communication for STM32 microcontroller_no.170

  Set the port number to create the virtual serial COM2, set the baud rate to 9600 according to the simulation program, no parity check bit, stop bit to 1 bit, data bit to 8 bits. From the test results, it can be seen that through virtual serial port, serial debugging assistant and microcontroller can receive and receive data correctly, and communication is normal.

Realization and Simulation of virtual serial communication for STM32 microcontroller_no.14

  This paper introduces the method of using virtual serial port in STM32 serial port simulation. All of them adopt the way of software simulation. It has low cost, high efficiency and greatly reduces the time of software development.
The test results verify the validity of the method, which has a good application value in practice development and teaching.

ARCHIVES

  • October 2019
  • September 2019
  • August 2019
  • April 2019
  • August 2018
  • July 2018
  • June 2018
  • May 2018
  • April 2018
  • January 2018
  • October 2017

CATEGORIES

  • News
  • Technology
  • thermal actuator News

COMPANY

  • About Us
  • Product Introduction
  • Innovation
  • Application & Solution
  • Terms of Use

PRODUCT

  • Customized Thermal Actuator/Valve
    • Thermal Actuator for Marine Solution
    • TV/HAT Temperature Control Valve
    • Thermoactuator
  • T&P Relief Valve
    • Standard T&P Relief Valve
    • T&P Relief Valve for Air Compressor
    • T&P Relief Valve for Steam Boiler
  • Probe for T&P valve
  • Thermoelectric Actuator
  • Thermostatic Control Valve
    • 300 series
    • 301 series
  • Thermostatic Mixing Valve
  • Freeze Protection Valve
  • VAV Diffuser Thermostatic Element
  • Automobile Thermal Control
    • Auto Engine Thermal Control
    • Diesel Filter Element

CONTACT

Tel.: (+86) 574 8805 9937

Mob./Whatsapp: (+86) 180 6927 2889

Email: sales@wisdom-thermostats.com

Zhejiang WISDOM Thermostats Technologies Co., Ltd.

Add.: No. 615 Xiaogao West Road, Ningbo 315000, China

© 2015 Zhejiang Wisdom Thermostats Technologies Co., Ltd. all rights reserved.

TOP