design of RTOS using few features

Discussion in 'General Electronics Chat' started by vead, May 19, 2017 at 10:55 AM.

  1. vead

    vead

    Joined:
    Nov 27, 2011
    Messages:
    329
    Likes Received:
    8
    Hello everyone
    I have question in mind. is it possible to develop RTOS program for microcontroller using some features. suppose I want use only kernel, multitasking and scheduling to develop RTOS Program. I have seen whole program of RTOS is very complex. so that's why I want to understand with few features. while reading I found that all RTOS should have Kernel , multitasking and scheduling . Is it possible to start with some few features for easy understanding?
     
    vead, May 19, 2017 at 10:55 AM
    #1
    1. Advertisements

  2. vead

    BobK

    Joined:
    Jan 5, 2010
    Messages:
    6,196
    Likes Received:
    1,173
    Location:
    Worcester, MA
    Yes, you can make a mult-tasking kernel without other RTOS features. I made one for PIC16 series that featured only cooperative multitasking with round robin scheduling and a single byte of flags for synchronization.

    Bob
     
    BobK, May 19, 2017 at 6:52 PM
    #2
    vead likes this.
    1. Advertisements

  3. vead

    vead

    Joined:
    Nov 27, 2011
    Messages:
    329
    Likes Received:
    8
    Thank you very much for your response. can you tell me little bit. what you did in your project . what was the main purpose of your project.
     
    vead, May 19, 2017 at 7:27 PM
    #3
  4. vead

    BobK

    Joined:
    Jan 5, 2010
    Messages:
    6,196
    Likes Received:
    1,173
    Location:
    Worcester, MA
    The main purpose was academic, to see what I could do with a very tiny microcontroller. I used a PIC12F575 which is very small indeed, If I remember correctly, only 32 bytes of memory.

    I actually used it in a color changing LED application with a digital display and 3 button interface.

    The processor cannot get hold of the return address from the hardware stack, which makes pre-emptive multi-taking pretty much impossible. So, I used a software stack and cooperative multitasking. Each task must complete it's work then call the wait() function. You could set a timer and wait for it, or just wait until your next round in the round robin. So, the app I used it in had three tasks.

    1. The 3-color LED controller. This one was continuously changing the color of an RGB LED. It would set the next color, then set a timer for 10ms and call wait(). After 10ms it would get control again to set the next color.

    2. The display was a multiplexed LED display. It would set up the data for one of the digits, then call wait().

    3. The button handler would wait until any button was pressed, which caused an interrupt and set a flag that it was waiting for. It would then determine what button was pressed and, say, change the color pattern.


    Bob
     
    BobK, May 20, 2017 at 1:11 AM
    #4
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. vaishali

    RTOS

    vaishali, Feb 3, 2006, in forum: Electronic Components
    Replies:
    1
    Views:
    678
    Tim Dunne
    Feb 4, 2006
  2. StephensDigital@gmail.com

    OT:RTOS Developer Wanted

    StephensDigital@gmail.com, Mar 13, 2006, in forum: Electronic Design
    Replies:
    34
    Views:
    1,035
    Isaac Bosompem
    Mar 17, 2006
  3. Tube Audio

    Need UART for new design Nucleus RTOS

    Tube Audio, Apr 13, 2006, in forum: Electronic Design
    Replies:
    1
    Views:
    430
    Rene Tschaggelar
    Apr 13, 2006
  4. chandrasekhar.kundeti@gmail.com

    RTOS

    chandrasekhar.kundeti@gmail.com, Dec 31, 2006, in forum: Electronic Design
    Replies:
    26
    Views:
    1,123
    jasen
    Jan 14, 2007
  5. vead

    kernel and scheduling for RTOS

    vead, Jul 2, 2014, in forum: Electronics Homework Help
    Replies:
    5
    Views:
    439
    KrisBlueNZ
    Jul 2, 2014
  6. Alyaa
    Replies:
    2
    Views:
    554
    Alyaa
    Apr 4, 2015
  7. elango palanisamy

    suggest me an development board that supports linux,android,rtos porting ??

    elango palanisamy, Apr 26, 2015, in forum: Microcontrollers and Programming
    Replies:
    0
    Views:
    274
    elango palanisamy
    Apr 26, 2015
Loading...