need help to develop project -RTOS, Interactive Keyboard & Display

Discussion in 'Embedded Systems and Microcontrollers' started by vead, May 19, 2017.

  1. vead

    Thread Starter Well-Known Member

    Nov 24, 2011
    701
    11
    Hello
    suppose a system have Microcontroler , LCD and LED and microcontroller connected with LCD display and keypad. Now I want to understand development of RTOS program with this example.. as my understanding I have done some work as best I can do for learning. someone experience can correct or modify my idea .
    1. when I power on system. system should be start automatically and display message "welcome" for 2 second and than it should be ask press any key
    2. . If I don't press any key within 8 seconds. system should be display message. you don't have permission to access the resources and system should be turn off
    3. if I press any key than display the message " you are member" within 10 seconds.
    4. if the message doesn't show within time limit 10 seconds than turn on led as warning and power off device
    I have seen many example, they are very complex. I want to understand with my example. I am looking help me basic idea
    please help me , thank you very much for your every advice and help
     
  2. MaxHeadRoom

    Expert

    Jul 18, 2013
    13,138
    3,620
    What are you programming in?
    What Micro?
    Start with the basic functions and expand from there using example programs from web sources.
    Max.
     
  3. vead

    Thread Starter Well-Known Member

    Nov 24, 2011
    701
    11
    really thank you very much for your response. I will use ARM Cortex-M microcontrollers and c programming
     
  4. Picbuster

    Active Member

    Dec 2, 2013
    543
    66
    smells at school work is that correct?
    Picbuster
     
  5. vead

    Thread Starter Well-Known Member

    Nov 24, 2011
    701
    11
    no, not school work. I am looking simple program so that's why I choose only LCD and LED. if you look my previous thread. you will see I am looking simple rtos program. and I have explained different example
     
  6. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,907
    1,789
    If your entire system is " LED and microcontroller connected with LCD display and keypad" then please explain your overwhelming requirement for an RTOS.

    With such a simple requirement set there is not a need for such.
     
  7. vead

    Thread Starter Well-Known Member

    Nov 24, 2011
    701
    11
    that is just example for learning . I already explain in my first post. someone experience can correct or modify my idea. I don't know that my example is suitable or not for rtos program. if I directly ask for the idea. someone could tell me that , do google search, read material .etc I have already done but not getting idea so that's why I made my example as my understanding. so what do you think what would be small and easy example of rtos for beginner ?
     
  8. nsaspook

    AAC Fanatic!

    Aug 27, 2009
    3,608
    3,738
    First make your program work correctly without RTOS concepts. Then separate the I/O functions from the processing and timing functions into modules using separate source and header files so you can see the data-flow between the modules. You then need to understand how these modules can operate as separate threads from the main processing thread using inter-processing data-flow communication methods (interrupts, buffers,variables, mutex, etc...) the RTOS provides.
     
    Last edited: May 19, 2017
    BR-549 and vead like this.
  9. vead

    Thread Starter Well-Known Member

    Nov 24, 2011
    701
    11
    can you give me suitable example like as I was trying to do in my first post
     
  10. nsaspook

    AAC Fanatic!

    Aug 27, 2009
    3,608
    3,738
    No, you need to work this out yourself if you want to understand it. It's for learning, LEARN.
    There is no spoon.
     
  11. vead

    Thread Starter Well-Known Member

    Nov 24, 2011
    701
    11
    ok I agree so can you tell me what's wrong with my example? first I am trying to implement only two features multitasking and time scheduling. I know what is multitasking and time scheduling. now I don't have idea where to start.I tried myself but you all are telling that my example is not suitable so that's why I want you to give me example. so I can do work in proper way.
     
  12. nsaspook

    AAC Fanatic!

    Aug 27, 2009
    3,608
    3,738
    Show actual work. (code) Forget multitasking and time scheduling for now. Make it work the way you currently understand programming. A simple state machine and software busy-loop timing loops is all you need for the processing logic if you understand the simple basic interfacing for the LCD, LED and keypad. If you don't understand and can't code the simple I/O interfaces, simple state machine and simple timing loops you will never understand RTOS concepts.
     
    Brian Griffin likes this.
  13. BobaMosfet

    Senior Member

    Jul 1, 2009
    137
    19
    @vead
    Learn about interrupts. Once you can write an interrupt that works, you'll begin to understand what to do for time scheduling, and multitasking.
     
    Brian Griffin likes this.
  14. Brian Griffin

    Member

    May 17, 2013
    47
    17
    All these doesn't need RTOS. Period.

    Buttons can be handled directly by using pin interrupts.

    There are various LCD screen with different controllers available. Again, the model number or type is needed to be stated.

    Others - draw up a flow chart or a state diagram, before starting to code the program.
     
  15. nsaspook

    AAC Fanatic!

    Aug 27, 2009
    3,608
    3,738
    To be fair this is (per the OP) a RTOS 'learning' exercise so it's typical to use a simple example to introduce more complex concepts in an incremental manner so you can build on what you already know. My request is for him to prove he understands the simple model first.
     
    Last edited: May 21, 2017
    vead likes this.
  16. be80be

    Distinguished Member

    Jul 5, 2008
    696
    103
  17. vead

    Thread Starter Well-Known Member

    Nov 24, 2011
    701
    11
    I have written code for LED blinking , Display message and I have written c code for calculator using LCD and Keypad. also I am reading some materials. and if I have any doubt I will ask the question ?
     
    Last edited: May 21, 2017
Loading...