1FT232AM Introduction
FT232AM is a USB-RS232 converter provided by FTDI. It can easily establish a reliable connection between RS232 and USB interfaces. The plug-and-play and hot-swap performance of the USB interface provides a very easy-to-use environment for RS232 peripheral devices, and provides a transmission rate of up to 115kb/s (if the level converter uses MAX3245CAI, the transmission rate can reach more than 1Mb/s). At the same time, it also provides a USB-RS422/RS485 port, so that the two communication protocols of RS422/RS485 and USB complement each other, so that the device has both plug-and-play and hot-swap performance and long-distance transmission and anti-interference characteristics.
2.2 Hardware Design
The design circuit of FT232AM is shown in Figure 1. It provides a standard DB-9 pin signal line to the outside. When the PC peripheral is set to RS232 level, MAX3245CAI is used for RS232/TTL level conversion. A 93C46 is also expanded in the design to store the VID, PID, device serial number, etc. of the developed PC peripheral.
2.3 Drivers
In Window98/2000/XP system, user-level applications must access USB hardware devices through drivers. Although many companies currently provide development tools for writing drivers, it is still relatively difficult. When using FT232AM, since FTDI provides a virtual serial port (VCP: virtualCOMport) driver, after installing the VCP device driver, the system virtualizes the USB peripheral into a serial port device (usually COM3), so that the application accesses the USB port just like accessing a standard serial port, and LabWindows/CVI provides a serial port programming function library, so that user program development can be very convenient.
3LabWindows/CVI
LabWindows/CVI is a virtual instrument software development platform for computer measurement and control developed by NI. It provides a wealth of virtual instrument controls and has excellent hardware interface functions. It provides dedicated drivers for almost all data cards, acquisition instruments and other acquisition devices. The RS232 function library provides various serial communication control functions. According to the actual serial communication, it can be divided into 6 categories: opening and closing serial port functions, I/O read and write functions, modem control functions, serial port setting functions, register status functions and callback functions. Some of the more commonly used functions are as follows:
(1) Open/Close function
(2) I/O read and write functions
I/O read and write functions provide a variety of read and write methods, only some of the functions are introduced here.
(3) Modem control function
4. Software Design
The program flow chart of serial communication is shown in Figure 2. Since different acquisition instruments have different communication protocols, it is necessary to write PC programs according to the specific instrument communication protocols. This article will take the communication between PC and USB as an example to illustrate the method of implementing USB communication in LabWindows/CVI. Figure 3 is the program interface diagram of the virtual oscilloscope.
Some of the code in the program is as follows:
(1)Configure and open the serial port
The communication port selection and communication parameter configuration panel is shown in Figure 3. In the callback function of the "Configure" button, configure and open the serial port according to the selected parameters.
Previous article:ADI chip identification and fault repair features
Next article:CAN bus isolation method using ADuM1201
- High signal-to-noise ratio MEMS microphone drives artificial intelligence interaction
- Advantages of using a differential-to-single-ended RF amplifier in a transmit signal chain design
- ON Semiconductor CEO Appears at Munich Electronica Show and Launches Treo Platform
- ON Semiconductor Launches Industry-Leading Analog and Mixed-Signal Platform
- Analog Devices ADAQ7767-1 μModule DAQ Solution for Rapid Development of Precision Data Acquisition Systems Now Available at Mouser
- Domestic high-precision, high-speed ADC chips are on the rise
- Microcontrollers that combine Hi-Fi, intelligence and USB multi-channel features – ushering in a new era of digital audio
- Using capacitive PGA, Naxin Micro launches high-precision multi-channel 24/16-bit Δ-Σ ADC
- Fully Differential Amplifier Provides High Voltage, Low Noise Signals for Precision Data Acquisition Signal Chain
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Summary of learning about state machine scheduling design
- After adding a product to the ONENET platform, when adding a device, the automatic subscription option allows the device to subscribe to ONENET messages?
- Power chip static current
- Commonly used anti-collision algorithms in RFID systems
- Children's Poetry White Model Electronic Book--Why does the relationship between current parallel negative feedback circuits have a negative sign?
- How do sensors with different protocols achieve remote data transmission?
- Configuration issues of IAR project path and header file path
- Package size issues
- What exactly is the UWB "One-Finger Connection" technology released by Xiaomi? What is its use?
- 【PLC based on IoT】---Burn IIOT OS for PLC master control