How to assign pins for UART for nRF52840 dev kit using the nRF connect desktop VS code?

Hi Team,

I am using the nRF52840 development kit and I want to use the UART example on it, I am using the nRF Connect VS code example central_uart. I am unable to find where I am suppose to give the pin numbers for my UART in the code. I am aware that the nRF52840 has two uarts, how do I enable one of them?

Thanks,

Pranathi

Parents Reply
  • Hi,

    The UART pins are configurable, which means that you can use any GPIO for the UART. The central_uart sample will use P0.05, P0.06, P0.0.07 and P0.08 for the UART as they are connected to the onboard interface chip on the nRF52840 development kit. The interface chip will act as an UART-to-USB bridge and forward the data to the virtual port on the computer. The central uart example will use uart0.

    If you want to add another UART instance, then you can start with the UART lesson in the Devacedemy fundamental course. After finishing the lesson, you can try to merge that code into the central UART sample. Note that you have to change the instance that is used in the lesson since it uses uart0. 

    regards

    Jared

Children
Related