This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to send data from Pic controller to nrf51822 using UART?

Hello all,

I want to send some sensor data( collected by Pic controller) to other BLE client(may be a phone) using nrf51822 via UART. Can somebody suggest how to communicate using UART? Do I need to run UART program on both the controller and the nrf51822 chip using Pic and BLE apis respectively?

In all, I want get data from Pic controller to my nrf51822 chip(using UART) and then want to send that data to another BLE device such as Phone(using UART).

Parents
  • We developed an application where a PIC gathers sensor data and sends it via UART to the nRF51822 when a host is connected and requests the data. It is probably similar to the example cited by LKH. A couple of things we learned along the way:

    1. Because the Soft Device can interrupt the UART transaction HW flow control was necessary to prevent losing data.

    2. We needed the radio to be able to wake up the PIC with a break character which the nRF UART cannot generate directly. However the support folks at Nordic were able to show us how to generate a break by disconnecting the UART TX from the GPIO pin and holding it low for enough time to generate a break to the PIC

    3. If your application is sensitive to power consumption, disable the UART on the radio when you are not using it as it does burn a surprising amount of power while idle.

Reply
  • We developed an application where a PIC gathers sensor data and sends it via UART to the nRF51822 when a host is connected and requests the data. It is probably similar to the example cited by LKH. A couple of things we learned along the way:

    1. Because the Soft Device can interrupt the UART transaction HW flow control was necessary to prevent losing data.

    2. We needed the radio to be able to wake up the PIC with a break character which the nRF UART cannot generate directly. However the support folks at Nordic were able to show us how to generate a break by disconnecting the UART TX from the GPIO pin and holding it low for enough time to generate a break to the PIC

    3. If your application is sensitive to power consumption, disable the UART on the radio when you are not using it as it does burn a surprising amount of power while idle.

Children
No Data
Related