牛卧堂MCU技术交流

标题: [NUC123] Detect UART Baud Rate by PWM Capture [打印本页]

作者: admin    时间: 2023-6-2 10:29
标题: [NUC123] Detect UART Baud Rate by PWM Capture

This example code uses PWMA channel 0 (PA.12) to detect UART1 baud rate by PWM capture function. PWM capture function can reload the counter value when it detects falling
edge and latch the counter value when it detects rising edge. User can transmit specified data on RXD and use this method to detect UART baud rate by calculating the low-level time of UART data.

To use this example code, user should connect PWMA channel 0 (PA.12) to UART1 RXD (PB.4). It also has to connect another Nu-Link2-Me ICE_TX and GND to NUC123 UART1
RXD and GND to transmit the specified data.

You can download the sample code at https://www.nuvoton.com/resource-downlo ... 0402183528





欢迎光临 牛卧堂MCU技术交流 (http://nuvoton-mcu.com/) Powered by Discuz! X3.2