Search code examples
uartmicrochipmplabpic24

Redirect Printf to UART on PIC24F Curiosity


I'm trying to redirect Printf to UART to output to a console like CoolTerm etc, without success, I'm using the "PIC24F Curiosity Development Board" with PIC24FJ128GA204, MPLAB X v5.25, MCC v3.85.1

after search google and microchip forums, I have got up with this On Youtube On Microchip DM240004 docs

UART Settings:

UART Settings

Pin Manager:

Pin manager

CoolTerm doesn't even recognize the board as a serial port.

I expect to be able to print out from the board with printf to CoolTerm, TeraTerm, etc.


Solution

  • Unlike Arduino, Teensy or other boards, on your Curiosity the USB is not an emulated serial port.

    According to the screenshots on your question, you're trying to set up a UART on Port C. If that's what you want to do you'll have to look at your board 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 that can work on both 3.3V or 5V).

    As far as I can tell, the micro USB port on your board can only be used for programing and/or debugging.