+ Post New Thread
Results 1 to 16 of 16
  1. #1
    Member level 1
    Points: 940, Level: 6

    Join Date
    Mar 2011
    Location
    Pakistan
    Posts
    40
    Helped
    0 / 0
    Points
    940
    Level
    6

    RTOS development for PIC

    Hello and AoA every1

    Kamal here, can anyone please guide me about the development of an RTOS?
    i have to design an RTOS as part of my FYP, and i have read number of books about RTOSes and i know lots of basics about RTOSes but the problem is the development which unfortunately i cant do and i'm unable to get/find any help about that.....i know RTOS, but want guidence about its development

    An early reply will be whole heatedly appreciated :)

    Regards
    Kamal

    ---------- Post added at 02:47 ---------- Previous post was at 02:46 ----------

    P.s. I have to develop an RTOS for PIC18

  2. #2
    Full Member level 6
    Points: 3,168, Level: 13
    Achievements:
    7 years registered

    Join Date
    Sep 2009
    Location
    Some where In INDIA
    Posts
    345
    Helped
    74 / 74
    Points
    3,168
    Level
    13

    Re: RTOS development for PIC

    Quote Originally Posted by bukhari917 View Post
    Hello and AoA every1
    By the way what is AoA???

    Kamal here, can anyone please guide me about the development of an RTOS?
    i have to design an RTOS as part of my FYP, and i have read number of books about RTOSes and i know lots of basics about RTOSes but the problem is the development which unfortunately i cant do and i'm unable to get/find any help about that.....i know RTOS, but want guidence about its development
    Kamal ... Do you mean to develop a project using RTOS for PIC-18 ???
    Or do you mean to develop "The RTOS" for PIC-18?

    An early reply will be whole heatedly appreciated :)

    Regards
    Kamal

    ---------- Post added at 02:47 ---------- Previous post was at 02:46 ----------

    P.s. I have to develop an RTOS for PIC18
    If your answer is the second one then please keep in mind it is not a small single-handed project.
    For a reference you can take the FreeRTOS as a model or base.
    Even the FreeRTOS supports PIC.

    Later you can add stuffs to that( modify ) and can say a variant of FreeRTOS.

    But if you want to do it from scratch, then it is too big for a final year project for a single person.



  3. #3
    Advanced Member level 5
    Points: 16,636, Level: 31

    Join Date
    Jul 2001
    Location
    Oberon
    Posts
    1,897
    Helped
    442 / 442
    Points
    16,636
    Level
    31

    Re: RTOS development for PIC

    https://www.edaboard.com/thread203855.html

    I have written an RTOS for the Pic24, 30, 33 16-bit micros and posted it on eda board here.
    I don't know if this will be much help for the Pic18 micros, but might give you some ideas.



    •   AltAdvertisement

        
       

  4. #4
    Member level 1
    Points: 940, Level: 6

    Join Date
    Mar 2011
    Location
    Pakistan
    Posts
    40
    Helped
    0 / 0
    Points
    940
    Level
    6

    Re: RTOS development for PIC

    Quote Originally Posted by bluehole View Post
    By the way what is AoA???.
    Well! AoA means Assalam o Alikum! a salutation ******* use when meet each others.It means "*** may protect you"


    Quote Originally Posted by bluehole View Post
    Kamal ... Do you mean to develop a project using RTOS for PIC-18 ???
    Or do you mean to develop "The RTOS" for PIC-18?
    I mean developing "The RTOS" for PIC-18



    Quote Originally Posted by bluehole View Post
    If your answer is the second one then please keep in mind it is not a small single-handed project.
    For a reference you can take the FreeRTOS as a model or base.
    Even the FreeRTOS supports PIC.
    Yes i have seen this.Thankyou for the link.Would you please explain how can i use it as "base"? Would you please elaborate this line?

    and if you mean using it as a base for my project, is it fulfilling the heading of my project "Development and Implementation of Real time operating system using PIC" ?

    Quote Originally Posted by bluehole View Post
    Later you can add stuffs to that( modify ) and can say a variant of FreeRTOS.

    But if you want to do it from scratch, then it is too big for a final year project for a single person.
    Yeah you are right its too big...they have demanded a very simple RTOS, which can be later upgraded...but my JOB is to develop an RTOS, which will be an RTOS...they havn't specified the extent of development.They simply demand a simple RTOS, which can be furthur upgraded with time.. :)[COLOR="Silver"]



    Quote Originally Posted by btbass View Post
    https://www.edaboard.com/thread203855.html

    I have written an RTOS for the Pic24, 30, 33 16-bit micros and posted it on eda board here.
    I don't know if this will be much help for the Pic18 micros, but might give you some ideas.
    WoW dear!

    Did you implement it from scratch?
    Let me elaborate it once.then i'l talk to you furthur about it.
    Thank you :)



    •   AltAdvertisement

        
       

  5. #5
    Full Member level 6
    Points: 3,168, Level: 13
    Achievements:
    7 years registered

    Join Date
    Sep 2009
    Location
    Some where In INDIA
    Posts
    345
    Helped
    74 / 74
    Points
    3,168
    Level
    13

    Re: RTOS development for PIC

    Quote Originally Posted by bukhari917 View Post
    Well! AoA means Assalam o Alikum! a salutation ******* use when meet each others.It means "*** may protect you"
    Nice and same to you.
    I mean developing "The RTOS" for PIC-18
    Yes i have seen this.Thankyou for the link.Would you please explain how can i use it as "base"? Would you please elaborate this line?
    and if you mean using it as a base for my project, is it fulfilling the heading of my project "Development and Implementation of Real time operating system using PIC" ?
    Well What I meant is refer that code and learn how it is been implemented, Next you write your own. As the project is Open-Source you can take the whole project or part of that.
    in my opinion you may take few header files for HW abstraction and write the rest of code by yourself. It will be a very good project and starting point. Hence you goal will be solved.

    NOTE: Please do mention if you take any part from any Open-Source project.
    In this way you give credit the original author.



  6. #6
    Member level 1
    Points: 940, Level: 6

    Join Date
    Mar 2011
    Location
    Pakistan
    Posts
    40
    Helped
    0 / 0
    Points
    940
    Level
    6

    Re: RTOS development for PIC

    Quote Originally Posted by bluehole View Post
    Nice and same to you.

    Well What I meant is refer that code and learn how it is been implemented, Next you write your own. As the project is Open-Source you can take the whole project or part of that.
    in my opinion you may take few header files for HW abstraction and write the rest of code by yourself. It will be a very good project and starting point. Hence you goal will be solved.

    NOTE: Please do mention if you take any part from any Open-Source project.
    In this way you give credit the original author.
    OK thnx.and did you made this from scratch or you also adopted an open source?
    and one more thing, could you please refer me a good book that you studied for this development.and actually i'm working on PIC18F and i'm not yet gone into the depth of its architecture :)



    •   AltAdvertisement

        
       

  7. #7
    Full Member level 6
    Points: 3,168, Level: 13
    Achievements:
    7 years registered

    Join Date
    Sep 2009
    Location
    Some where In INDIA
    Posts
    345
    Helped
    74 / 74
    Points
    3,168
    Level
    13

    Re: RTOS development for PIC

    Quote Originally Posted by bukhari917 View Post
    OK thnx.and did you made this from scratch or you also adopted an open source?
    and one more thing, could you please refer me a good book that you studied for this development.and actually i'm working on PIC18F and i'm not yet gone into the depth of its architecture :)
    Well I am not such a advanced programmer. I have written a small educational and research OS in C++ for x86. it is far from being complete. I have never tried any RTOS besides Linux and QNX. That to on PIC is a big no no from my side.

    But there is no harm to try out new adventures. I am thinking of trying out though.



  8. #8
    Member level 1
    Points: 940, Level: 6

    Join Date
    Mar 2011
    Location
    Pakistan
    Posts
    40
    Helped
    0 / 0
    Points
    940
    Level
    6

    Re: RTOS development for PIC

    Quote Originally Posted by bluehole View Post
    Well I am not such a advanced programmer. I have written a small educational and research OS in C++ for x86. it is far from being complete. I have never tried any RTOS besides Linux and QNX. That to on PIC is a big no no from my side.

    But there is no harm to try out new adventures. I am thinking of trying out though.
    Man!! Thankyou so much...I'm studying your's RTOS , and its really very helpful..well lets move on, hope we'l b in contect :)

    TC :)



  9. #9
    Full Member level 6
    Points: 3,168, Level: 13
    Achievements:
    7 years registered

    Join Date
    Sep 2009
    Location
    Some where In INDIA
    Posts
    345
    Helped
    74 / 74
    Points
    3,168
    Level
    13

    Re: RTOS development for PIC

    Quote Originally Posted by bukhari917 View Post
    Man!! Thankyou so much...I'm studying your's RTOS , and its really very helpful..well lets move on, hope we'l b in contect :)

    TC :)
    I don't have any RTOS I have a small Kernel named NanoOS hosted at googlecode.



  10. #10
    Advanced Member level 5
    Points: 16,636, Level: 31

    Join Date
    Jul 2001
    Location
    Oberon
    Posts
    1,897
    Helped
    442 / 442
    Points
    16,636
    Level
    31

    Re: RTOS development for PIC

    Yes, I wrote it from scratch.

    Maybe you should look at the 16-bit Pic micros like the Pic24f series.
    There is now not a lot of difference in cost compared to the Pic18's, but a massive leap in power with 16-bit registers and no limit to stack space but the memory size.



  11. #11
    Member level 3
    Points: 1,724, Level: 9

    Join Date
    Feb 2005
    Location
    Romania
    Posts
    56
    Helped
    10 / 10
    Points
    1,724
    Level
    9

    Re: RTOS development for PIC

    Hello,

    A very simple OS for small microcontroller you can create by yourself.
    With a timer you must create a time base. In the interrupt you set flags. In the main loop you read flags to triger the periodic task.
    Creating a periodic task is the core of the RTOS and in my opinion the main reason to use RTOS, to have a nice predetermined timing on the system.
    Using a downloaded RTOS bring some benefits but read understanding in core of OS is creating one from scratch .


    1 members found this post helpful.

  12. #12
    Member level 1
    Points: 940, Level: 6

    Join Date
    Mar 2011
    Location
    Pakistan
    Posts
    40
    Helped
    0 / 0
    Points
    940
    Level
    6

    Re: RTOS development for PIC

    OK.i wanted to know one thing, what if i use the timers in PIC18Fxxxx for 3/4 different tasks.I mean 1 timer is sensing temperature, other is lets say sensing pressure, third will control motor etc...and i'm giving proper time to each timer, so its seems like multitasking is being done, so can v call it a part of RTOS kernal?



  13. #13
    Member level 3
    Points: 1,724, Level: 9

    Join Date
    Feb 2005
    Location
    Romania
    Posts
    56
    Helped
    10 / 10
    Points
    1,724
    Level
    9

    Re: RTOS development for PIC

    The type of tasks you are enumerating are present on RTOS as events. Your main program is the idle task and it is being interrupted by events (interrupts generated by the timers).


    1 members found this post helpful.

  14. #14
    Junior Member level 2
    Points: 1,764, Level: 9

    Join Date
    Jun 2008
    Posts
    23
    Helped
    5 / 5
    Points
    1,764
    Level
    9

    Re: RTOS development for PIC

    there is another RTOS for PIC which is open source at OSA : Documentation [PIC24] .



  15. #15
    Member level 1
    Points: 940, Level: 6

    Join Date
    Mar 2011
    Location
    Pakistan
    Posts
    40
    Helped
    0 / 0
    Points
    940
    Level
    6

    Re: RTOS development for PIC

    Hello!

    Now please look at page # 530 of this book Advanced PIC Microcontroller Projects in C , i want to implement this code, I have Installed CCS v4.104 , but the link address given in the code "C:\NEWNES\PROGRAMS\rtos.h" is not in my PC plus code is not working...sm1 kindly help me what is missing??
    Reagrds
    Kamal



    •   AltAdvertisement

        
       

  16. #16
    Newbie level 1
    Points: 411, Level: 4

    Join Date
    Sep 2010
    Posts
    1
    Helped
    0 / 0
    Points
    411
    Level
    4

    Re: RTOS development for PIC

    Dear bukhari917,
    Sorry I have no experience with the RTOS used in that text book, but I have worked on another RTOS called PICos18. They have step by step tutorial. You may consider it if you could not get your current RTOS working.
    I have also developed a RTOS for PIC18 microcontroller from scratch. But since that is almost impossible to complete by 1 person in few months, I have actually ended up having A "multi-tasking kernel" instead of RTOS since my kernel uses round robin scheduling algorithm only and does not support the pre-emptive scheduling or other "more effective" scheduling algorithms.
    If you're to develop a RTOS from scratch, I can advice you to:
    1. Understand the basics of RTOS, I think you've already done so by reading that book.
    2. Get your hands on a real RTOS and understand how the thing works, (I think you're at this level. You may also consider PICos18, simply because it worked with me)
    3. Try to understand in more details how this "multi-tasking" thingy really works. You may consider a webinar by Microchip titled "Concept of Real time system part 1"
    4. Start building your own system by considering the very basic part of RTOS just as suggested by Mr. blind_man. You may consider Assembly to get the smallest code possible!
    5. Add to your kernel the other RTOS services 1 by 1.
    All the best!
    Last edited by mohamed.tajelsir; 25th May 2011 at 18:37.



--[[ ]]--