STM32's USART0 and ZigBee's P02_RX and P03_TX pins realize serial bidirectional communication
BY:T7
Date:20171214
At:YSU_B307
Development Environment:
uVision : V5.12.0.0 STM32F103V8T6
Library version: STM32F10x_StdPeriph_Lib_V3.5.0
1. Hardware connection:
1. STM32:
2. Zigbee
3. Z-TEK ZY099 RS232 TO TTL (5V) serial port converter compatible with level 232 to TTL
4. Nine-pin serial cable RS232 cable db9 male to male cross cable
5. Connection diagram from STM32 to ZigBee
2. Code:
1.STM32 code: Function: what the serial port receives and what it sends
Link: https://pan.baidu.com/s/1bGgurO Password: m9ls
3. ZigBee code: Function: serial port transparent transmission
Link: https://pan.baidu.com/s/1nvvHutz Password: 1k27
3. Experimental results:
Functional implementation: After the hardware is connected and the code is downloaded as described above, connect the ZigBee coordinator to the PC through the serial port, open sscom32, and send "This is the Serial Test!" to the coordinator. The coordinator sends the data to the terminal node through the serial port transparent transmission function. The terminal node receives the message and converts it to RS232 via P02_RX, P03_TX ----> TTL ---> STM32; then STM32 receives the data and converts it to TTL via RS232 ---> P02_RX, P03_TX (terminal node) ---> coordinator through the serial port, and then sends it to the sscom32 window of the PC through the serial port of the coordinator. As shown below:
Previous article:The difference between JTAG and SWD modes of STM32
Next article:STM32 reads SD card using FATS file system without valid FAT volume
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- How are chips made? CCTV's most powerful science popularization!
- Unboxing and verifying BOX function through APP
- Thermostat reference design based on TI SimpleLink wireless MCU
- Pre-registration for the live broadcast with prizes | ST Data Center and Communication Network Power Management Solutions
- MSP430 - Key interrupt control small light flip
- [NXP Rapid IoT Review] Rapid IoT Studio: The First Step in Simple Programming
- Adafruit Funhouse Development Board
- GD32E231 DIY Contest (9) - Rewrite the key processing program
- 【Distributed temperature and humidity acquisition system】+WIFI data receiving module
- Autonomous driving company TuSimple is recruiting for 2022, welcome to apply