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

2x16 LCD and Rotary Encoder

Hello,

I've been looking around to find the best way to interface the nRF52 DK with both an LCD screen for printing settings to a panel display, and a rotary encoder, used to scroll through and enter into various menus.

The rotary encoder would be any simple 5pin quadrature or 2bit grey code input that I could find, and the LCD screen would be something like this: www.newhavendisplay.com/nhd0216k1zflybw-p-284.html

I have worked with components like this extensively on Arduino and simpler interfaces but don't understand the software/coding necessary to get these working for the nRF52. I am confident I can hook them up properly however, which is a good first start.

I really have no idea where to begin and would like to find the simplest and most straightforward method of learning to interface these components.

Any help would be greatly appreciated.

Thanks and Regards

Parents
  • Hey.

    As @RK mentioned, the nRF52 as a QDEC peripheral. This will take care of the wheel decoding. You will of course interface it correctly with your code. You can learn this from the product specification ,qdec driver documentation and the QDEC example code.

    The display can be used with simple gpio instructions. I agree with RK in that a display using i2c or SPI might be "cleaner" to implement. (it will require less connections)

    I assume that you are going to have a radio connection while doing this. Remember that using delays (busy wait delays like nrf_delay) will not work well together with BLE connections. Use a periodic timer to trigger periodic tasks, to let the CPU work with other things in between.

Reply
  • Hey.

    As @RK mentioned, the nRF52 as a QDEC peripheral. This will take care of the wheel decoding. You will of course interface it correctly with your code. You can learn this from the product specification ,qdec driver documentation and the QDEC example code.

    The display can be used with simple gpio instructions. I agree with RK in that a display using i2c or SPI might be "cleaner" to implement. (it will require less connections)

    I assume that you are going to have a radio connection while doing this. Remember that using delays (busy wait delays like nrf_delay) will not work well together with BLE connections. Use a periodic timer to trigger periodic tasks, to let the CPU work with other things in between.

Children
No Data
Related