Coder Social home page Coder Social logo

rtd_click's Introduction

MikroE


RTD Click

  • CIC Prefix : RTD
  • Author : Djordje Rosic
  • Verison : 1.0.0
  • Date : Nov 2017

Software Support

We provide a library for the RTD Click on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.

Library Description

This library contains functions for basic reading and writing into the click's registers, as well as convert temperature function that can convert raw data into degrees celsius. Check documentation for more details.

Key functions :

  • void rtd_writeRegister(uint8_t regAddress, uint8_t writeData) - Writes data into a register
  • uint16_t rtd_readTemperature() - Reads temperature from temperature registers
  • float rtd_convertTemperature(uint16_t inputData, uint16_t referentResistance) - Converts raw data to degrees celsius

Examples Description

The application is composed of three sections :

  • System Initialization - Initializes SPI peripheral, CS pin, and UART logger
  • Application Initialization - Initializes RTD click driver, and sets the proper configuration mode for three wire RTD.
  • Application Task (code snippet) - Measures temperature, converts the data to celsius degrees, and outputs them via UART.
void applicationTask()
{
    uint16_t readValue;
    float convertedValue;
    char testTxt [20];

    readValue = rtd_readTemperature();
    convertedValue = rtd_convertTemperature(readValue, _RTD_REF_RESISTANCE_470);

    floatToStr(convertedValue, testTxt);
    mikrobus_logWrite("Current temperature: ", _LOG_TEXT );
    mikrobus_logWrite(testTxt, _LOG_LINE );

    delay_ms(1000);
}

The full application code, and ready to use projects can be found on our LibStock page.

Other mikroE Libraries used in the example:

  • UART
  • Conversions
  • C_string

Additional notes and informations

Depending on the development board you are using, you may need USB UART click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all Mikroelektronika compilers, or any other terminal application of your choice, can be used to read the message.



rtd_click's People

Contributors

kacaperendic avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.