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

Examples for nRF52840 Dongle ADC Reading

Hello,

I am using nRF52840 Dongle and I want to use AIN0 pin for reading a sensor data. I was using PIC for this kind of project(C Programming)  before nRF52840. Here my questions;

1) I am new at programming nRF52840 and i need some examples for Analog Digital Converter. So how can i make ADC configuration basically ? I tried to understand SAADC example but it uses timer interrup. I need to use it without any interrupt. 

2) Which functions are using for getting value between 0-2048(for 11 bits res.) ?  In examples used 2 dimensions array for storage value of ADC results. I just want to store it an integer.

If we compare nRF52840  with PIC, nRF52840 is very complicate for me and it's libraries are not using basic C language. So i need some basic examples.

Thank you :)

Parents
  • I am new at programming nRF52840

    In that case, you should certainly be starting with the nRF52840-DK rather than the dongle.

    As the name suggests, the DK is specifically designed for Development use - not least because it comes with an on-board debugger.

    Nearly all of the SDK examples focus on the DKs.

    The dongle is great as a cheap platform once you have a working application - but the DK is the place to do learning & development.

    If we compare nRF52840  with PIC, nRF52840 is very complicate

    Which particular "PIC" are you talking about?

    The nRF52840 is a complete System on a Chip - "SoC" - with a high-performance, 32-bit, ARM Cortex-M4F CPU plus a complete radio susbsystem plus some pretty advanced peripherals.

    That is obviously going to be a lot more complicated that a simple little 8-bit microcontroller!

    But the basic principles remain the same.

    it's libraries are not using basic C language

    The libraries use standard 'C'.

Reply
  • I am new at programming nRF52840

    In that case, you should certainly be starting with the nRF52840-DK rather than the dongle.

    As the name suggests, the DK is specifically designed for Development use - not least because it comes with an on-board debugger.

    Nearly all of the SDK examples focus on the DKs.

    The dongle is great as a cheap platform once you have a working application - but the DK is the place to do learning & development.

    If we compare nRF52840  with PIC, nRF52840 is very complicate

    Which particular "PIC" are you talking about?

    The nRF52840 is a complete System on a Chip - "SoC" - with a high-performance, 32-bit, ARM Cortex-M4F CPU plus a complete radio susbsystem plus some pretty advanced peripherals.

    That is obviously going to be a lot more complicated that a simple little 8-bit microcontroller!

    But the basic principles remain the same.

    it's libraries are not using basic C language

    The libraries use standard 'C'.

Children
Related