Giter Site home page Giter Site logo

rtos's Introduction

RTOS

The code was developed for FRDM KL128Z microcontroller running ARM's cortex M0+ processor. Further more, a shield was developed for the FRDM board which communicates to a LCD touch diplay using the GPIO port and a high brightness LED to which the power is delivered by a switch mode power supply. The LED is made to blink by providing the switch mode power supply an fluctuating DC. This is delivered by the onboard PMW module. A feedback is also given back to the microcontroller through thr ADC. Using this converted value the processor adjusts the period of the PWM wave.

The display is a resistive touch panel that has 4 leads, a pair on the top and the bottom and a pair on either side. Two resistive layers are seperated by a very small distance, when a force is applied the two layers are made to come in contact with each other. When we set one of the sides to Vcc and ground we can get a reading from the other two sides with which we can estimate the location of the press. The analog voltage value obtained is fed to an ADC and this converts the value into a digital value which the processor can interpret. We poll the touch screen periodically using OsDelay and see if there was a press. When there is a press, we send the signal received to the ADC for it to convert it into a digital value.

The ADC is shared with two peripherals namely, the HB LED and the touch screen. The base code that was given stops converting the feedback from the ADC as soon as it gets a value to be converted from the touch screen. The modification made, tries to share the ADC between the two peripheral and prioritise the conversion of the feedback from the HBLED over the conversion of the touch values.

A message queue is created and when the touch screen wants to pass the data to the ADC module, it passes it through the queue. The conversion takes place only when we have a HB LED conversion to be performed. We see if there is a enough time to make another ADC conversion, if so we go ahead and convert the value present in the queue, else we don't and let the touch screen stall at the point in the code till it gets a reply from the ADC.

It is advised to use OpenSDA as the debugger.

rtos's People

Contributors

kashyapravichandran avatar

Watchers

 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.