Giter VIP home page Giter VIP logo

nrf52_saadc_example's Introduction

A simplified version of the saadc example in the nrf5 SDK. In this example the Saadc is set to sample 10 times at 100 ms each, with 14bit as a resolution.

The Analog voltage can be read using this equation :

RESULT = [V(P) โ€“ V(N) ] x GAIN / REFERENCE x 2^(RESOLUTION - m)

(m=0) if CONFIG.MODE=SE, or (m=1) if CONFIG.MODE=Diff.

Source

nRF5_SDK version supported :

Versions starting from v15.3.

Supported Development kits :

  • The nRF52-DK (PCA10040).
  • The nRF52840-DK (PCA10056).
  • The nRF52833-DK (PCA10100).

Toolchain :

SEGGER.

How to test :

  1. Clone or download the repository into the $nRF5_SDK_Location\examples\peripheral\ folder.

  2. You can use a potentiometer to test it. The example is set to use the analog pin AIN1 (P0.03).

The middle pin of the potentiometer should be connected to the analog pin, and the other pins to vdd and gnd.

Note: Do not connect the potentiomter to the 5V pin instead of the VDD pin. the maximum supported voltage on the analog pins is VDD. Connecting it directly to 5V may damage the SOC.

  1. Open your prefered Terminal emulator.

Analog inputs :

Analog Input GPIO
AIN0 P0.02
AIN1 P0.03
AIN2 P0.04
AIN3 P0.05
AIN4 P0.28
AIN5 P0.29
AIN6 P0.30
AIN7 P0.31

nrf52_saadc_example's People

Contributors

rmptxf avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.