I have been deeply affected by serial ports since 51. The MAX232 I bought from Huaqiang was originally broken. I thought there was something wrong with my circuit or schematic. Since there was no good serial port, I thought of starting from myself, from the smallest system board to the peripheral circuit. Later, it was verified that the chip was not working. Later, I found that the male and female connectors were also particular in the design of the circuit. When designing ARM, the level conversion chip also needs to be replaced with MAX3232, that is, a chip with a driving voltage of 3.3V.
Next, we will make some summary about serial port debugging:
1. Power on the newly soldered board and use a multimeter to test the voltage signal generated by MAX3232. The 2nd pin of MAX3232 is about +10V to ground, the 6th pin is about -10V to ground, the 16th pin is about +5V, and the 15th pin is grounded.
2. Open My Computer->Management->Device Manager->Port->Communication Port, double-click, enter "Port Settings", check the baud rate and some other settings, mainly the baud rate, which must be the same as the software to be debugged.
3. Make sure whether the serial port you want to connect to your board is male or female. If the design is male/female, and you weld female/male, it will not work. It is equivalent to swapping the original 2nd and 4th pins with 3rd pin as the axis of symmetry; swapping 1st and 5th pins, because we usually need 2nd, 3rd and 5th pins for communication. If the 4th pin becomes 2nd pin after swapping; the 5th pin becomes 1st pin, it is equivalent to not connecting anything at all. It will definitely not work when tested.
Generally, if you use a female connector to connect to MAX3232 on the board, you should connect to pins 2 (TX), 3 (RX), and 5 (GND). If you use a male connector to connect to MAX3232 on the board, you should connect to pins 4 (RX), 3 (TX), and 1 (GND).
Note: Some male connectors do not have numbers, so you can just number them yourself: the male connector is facing you, numbered 1, 2, 3, 4, and 5 from left to right.
4. Test with MAX3232 chip and serial debugging assistant
I. If you are sure that you have connected the above correctly, short-circuit the 2nd and 3rd pins of the female connector on the extension cable, and use the serial port debugging assistant. If it can send and receive messages automatically, it means that there is no problem with the extension cable.
A MAX3232 can have two serial ports. Before performing the following operations, first determine which serial port you are using.
II. Next, power on the board and short-circuit the corresponding R*X and T*X on the end connected to ARM (* indicates which serial port it is, because two serial ports are connected). If it can send and receive signals automatically after short-circuiting, it means that there is no problem with your serial port hardware.
51 is connected like this:
ARM is connected like this:
Previous article:ARM cross-compilation environment configuration
Next article:LPC2106 basic information, ISP, JTAG, clock calculation
Recommended ReadingLatest update time:2024-11-16 13:29
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- 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
- What are the best power solutions for agricultural drones? Vicor engineers tell you!
- EEWORLD University Hall----Automatic Control Theory Experiment Beijing Institute of Technology
- When the EEPROM battery runs out of power, will the stored data be lost?
- TMS320F28335 serial port flash programming
- 3-wire spi, LCD driver for HX8369
- How will Espressif ESP8266 communicate with the cloud server?
- LIS3DH three-axis accelerometer package and code
- Method of measuring ABS wheel speed sensor signal using automobile oscilloscope
- The difference between motion control of PLC and motion controller
- A very practical summary! One article covers all rectifier and filter circuits