在 PIC24F Curiosity 上将 Printf 重定向到 UART

Redirect Printf to UART on PIC24F Curiosity

我正在尝试将 Printf 重定向到 UART 以输出到 CoolTerm 等控制台, 没有成功,我正在使用 "PIC24F Curiosity Development Board" 使用 PIC24FJ128GA204、MPLAB X v5.25、MCC v3.85.1

在搜索 google 和 microchip 论坛后,我已经解决了这个问题 On Youtube On Microchip DM240004 docs

串口设置:

引脚管理员:

CoolTerm 甚至无法将开发板识别为串口。

我希望能够使用 printf 从板上打印到 CoolTerm、TeraTerm 等

与 Arduino、Teensy 或其他开发板不同,根据您的好奇心,USB 不是模拟串口。

根据您问题的屏幕截图,您正在尝试在端口 C 上设置一个 UART。如果这是您想要做的,您必须查看您的电路板 schematic and connect those pins to a TTL serial port. If you want to see the printf outputs on the screen of your PC you need either a TTL to RS232 (if your computer still have a good old serial port, which I very much doubt) or a USB-to-serial adaptor with the appropriate levels (check the datasheet or just get one 是否可以工作在 3.3V 或 5V 上)。

据我所知,你板上的微型 USB 端口只能用于编程 and/or 调试。